(w)stETH to rETH Treasury Diversification 🐮
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:
- Wrap the required
stETH
towstETH
so that it may be traded. - Create a
Safe
owned by the DAO treasury that is used as a staging contract for the TWAP. - Trigger the TWAP, with the resulting
rETH
from each swap being sent directly back to the DAO treasury.
Use of Safe
- Developers:
Safe
- Audits: See their Github Repository.
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:
- DAO Treasury sets an approval on
wstETH
for the to-be-createdSafe
. - The
Safe
is created and initialised. - 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
- Developer: mfw78 (funded by CowDAO Grants Program, and now a Core Contributor to CoW Protocol).
- Audits (jointly funded by
Safe
and CoW Protocol): Ackee, Gnosis Internal. - Other: Repository recently on-boarded to CoW Protocol GitHub organisation.
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:
- Approve the required amount of
stETH
for wrapping intowstETH
. - Wrap
stETH
intowstETH
. - Approve the to-be-created Safe to use the Executor's
wstETH
. - Create the trading
Safe
(owner: Exector, owners: 1). - Configure the
Safe
: i. SetComposableCoW
as the domain verifier forGPv2Settlement
(CoW Protocol signing). ii. Set the allowance forGPv2VaultRelayer
to spendwstETH
held by theSafe
. iii. UsetransferFrom
to pull funds from theExecutor
which what was already approved at (3). iv. Create theTWAP
order - Confirm revocation of all allowances that were given to the
Safe
by theExecutor
.
(w)stETH to rETH Treasury Diversification 🐮
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:
- Wrap the required
stETH
towstETH
so that it may be traded. - Create a
Safe
owned by the DAO treasury that is used as a staging contract for the TWAP. - Trigger the TWAP, with the resulting
rETH
from each swap being sent directly back to the DAO treasury.
Use of Safe
- Developers:
Safe
- Audits: See their Github Repository.
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:
- DAO Treasury sets an approval on
wstETH
for the to-be-createdSafe
. - The
Safe
is created and initialised. - 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
- Developer: mfw78 (funded by CowDAO Grants Program, and now a Core Contributor to CoW Protocol).
- Audits (jointly funded by
Safe
and CoW Protocol): Ackee, Gnosis Internal. - Other: Repository recently on-boarded to CoW Protocol GitHub organisation.
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:
- Approve the required amount of
stETH
for wrapping intowstETH
. - Wrap
stETH
intowstETH
. - Approve the to-be-created Safe to use the Executor's
wstETH
. - Create the trading
Safe
(owner: Exector, owners: 1). - Configure the
Safe
: i. SetComposableCoW
as the domain verifier forGPv2Settlement
(CoW Protocol signing). ii. Set the allowance forGPv2VaultRelayer
to spendwstETH
held by theSafe
. iii. UsetransferFrom
to pull funds from theExecutor
which what was already approved at (3). iv. Create theTWAP
order - Confirm revocation of all allowances that were given to the
Safe
by theExecutor
.