ProposalsProposal 365

(w)stETH to rETH Treasury Diversification 🐮

Cancelled
For
31
Against
0
Abstain
0
Quorum: 83
Proposed by
0x2910...727E
, sponsored by
0x4754...C7e9

Description

Following the recent proposal to test CronFi’s TWAMM solution for LST diversification of Nouns treasury, we at CoW Protocol would like to propose testing execution using our unique batch auction process before proceeding with the full 7k ETH amount.

There’s been interest in diversifying Nouns DAO treasury, specifically stETH→rETH. Recently some twitter avatars have posted a good analysis of the 500 ETH TWAMM trade, specifically, that the trade resulted in 518.51 rETH received for 500 wstETH (a whopping 1.25% slippage for a stable swap!). We believe CoW Protocol will provide a much more competitive execution price, that is compatible with fair market prices.

Background

CoW Protocol has been using a multi-token batch auction on Ethereum mainnet for over two years, facilitating >$27.3B of trading volume. CoW Protocol uniquely allows its users to get best execution prices even with a lax slippage tolerance thanks to 15 competitive solvers participating in an auction mechanism that protects the users by granting the right to execute the trade to the solver offering maximal price improvement.

CoW Protocol is used by a number of DAOs for their trading operations including ENS, Aave, Nexus Mutual, Gnosis, Karpatkey, Olympus DAO, Badger DAO, Yearn and more.

Advantages

CoW Protocol pioneered intent-based trading since its inception in early 2021. This allows users to define order parameters without specifying the actual execution path (calldata). Users should expect the most optimised execution route to be chosen by the winning solver at the time of execution.

Considerations

Given a sell order of 500 wstETH→rETH there are several options for order placement that can provide different properties. We'll focus on a TWAP order setup although it seems to not be necessary in a smaller 500 ETH trade - the purpose is to demonstrate how a larger order could be set up.

For a 500 wstETH→rETH we propose to use a TWAP order of 5 equal parts worth 100 wstETH each. This may result in an execution up to 525 rETH.

TWAP Conditional order

  • Launch date: August 17th, 2023. See twitter post.
  • Transactional volume: ~$4.2M. See dune query.
  • Value held within ExtensibleFallbackHandler-upgraded Safes: ~$12.3M

The TWAP implementation uses a constant limit price across each. Given the stability of wstETH→rETH, the limit price may be set in advance with a high confidence that this will be representative at the time the proposal is executed (and for the duration of the TWAP).

Order parameters suggested for this proposal:

  • Limit price: 1 wstETH = 1.038 rETH. This includes 1% slippage tolerance to allow for charging a fee from the sell token and to get higher confidence in execution. It is still expected to be executed with a much lower slippage in practice. See the above mentioned dune dashboard's 'order surplus' whereby the order's slippage is protected.
  • 5 equal parts of 100 wstETH
  • Time intervals of two hours between parts

Methodology

To achieve this TWAP, the proposed transaction bundle will:

  1. Wrap the required stETH to wstETH so that it may be traded.
  2. Create a Safe owned by the DAO treasury that is used as a staging contract for the TWAP.
  3. Trigger the TWAP, with the resulting rETH from each swap being sent directly back to the DAO treasury.

Use of Safe

The Safe is used as a staging area for the funds used in the TWAP. As CoW Protocol uses intent based trading, the owner of the order needs to sign their intent (done using a private key for an EOA, done using EIP-1271 for a smart contract).

With this requirement in mind, the DAO treasury contract for Nouns doesn't support EIP-1271. This is why a Safe is used in combination with ComposableCoW (detailed below).

The Safe that is created in the proposal bundle ensures that the only owner is set to the DAO Treasury. At all times, the funds remain under the direct control of the DAO treasury with the same timelock conditions.

Execution Risk

In the transaction bundle funds are sent atomically to a newly created Safe. This means that the Safe's address needs to be calculated beforehand. This is done using CREATE2 logic, therefore the Safe is created at a deterministic address. The flow:

  1. DAO Treasury sets an approval on wstETH for the to-be-created Safe.
  2. The Safe is created and initialised.
  3. The funds are PULLED from the DAO Treasury to the Safe.

Critically, with the above methodology there is no ability for funds to be sent to an address where they are not retrievable.

CAUTION: This candidate proposal assumes successful passage of Proposal #359 AND no intermediate proposal that interacts with the new treasury's balance of wstETH.

Use of ComposableCoW / TWAP

ComposableCoW is a conditional smart order framework that was incubated by the CoW Grants Program. TWAP is an order type implemented in the ComposableCoW framework. The contracts are thoroughly tested and audited. To date, volume processed exceeds ~$4.2M.

Using ComposableCoW, a smart contract (such as the Safe deployed in the proposal) is able to autonomously indicate its intent to trade. This intent is monitored by a Watch Tower (currently a Tenderly Web3 Action, deployed by the CoW Protocol team), with the intent relayed to the CoW Protocol API. In this framework - for TWAP, unlike Milkman - the smart contract specifies the entire order structure to be submitted to the API. There are no trust assumptions placed in the Watch Tower (besides the Watch Tower not running, leading to a griefing attack, but CoW Protocol for reputational reasons are incentivised to keep the Watch Tower operational).

Differences compared to Milkman

Both were funded by the CoW Protocol Grants Program. Milkman seeks to solve the issue of an autonomous swap from ABC→XYZ tokens, whereas ComposableCoW provides an entire framework for producing conditional orders. TWAP is an example of a conditional order built with this framework - allowing a large trade to settle in multiple parts over time, minimising price impact.

Proposal Operations

The operations in the proposal are:

  1. Approve the required amount of stETH for wrapping into wstETH.
  2. Wrap stETH into wstETH.
  3. Approve the to-be-created Safe to use the Executor's wstETH.
  4. Create the trading Safe (owner: Exector, owners: 1).
  5. Configure the Safe: i. Set ComposableCoW as the domain verifier for GPv2Settlement (CoW Protocol signing). ii. Set the allowance for GPv2VaultRelayer to spend wstETH held by the Safe. iii. Use transferFrom to pull funds from the Executor which what was already approved at (3). iv. Create the TWAP order
  6. Confirm revocation of all allowances that were given to the Safe by the Executor.