Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Whitelist BEANwstETH and Migrate to urBEANwstETH #731

Closed
hellofromguy opened this issue Dec 21, 2023 · 1 comment
Closed

RFC: Whitelist BEANwstETH and Migrate to urBEANwstETH #731

hellofromguy opened this issue Dec 21, 2023 · 1 comment
Labels
⛓ Contracts Related to Beanstalk and ecosystem contracts 📜 RFC Formal protocol RFCs

Comments

@hellofromguy
Copy link
Contributor

hellofromguy commented Dec 21, 2023

RFC: Whitelist BEANwstETH and Migrate to urBEANwstETH

Authors

Brendan Sanderson, Ben Weintraub, Guy, Brean

Summary

  • Deploy a BEAN:wstETH Constant Product 2 Well with an updated Multi Flow Pump*;
  • Propose to add the BEAN:wstETH LP token to the Deposit, Convert and Minting Whitelists (gauge points TBD); and
  • Migrate urBEANETH to urBEANwstETH.

*As a result of EBIP-9, an updated version of Multi Flow that solves the static reserve ratio issue is being designed and implemented. The new Multi Flow should be audited before it is deployed, and thus before any new Wells are deployed. See BeanstalkFarms/Basin#126

Problem

Beanstalk could be offering higher yield opportunities to Bean liquidity providers (and Unripe LP holders) a la the ETH staking yield with minimal additional trust assumptions.

The opportunities for Bean liquidity providers to receive Stalk and Seed rewards is currently limited. A wider variety of options increases utility for Silo Depositors, particularly with the introduction of Generalized Convert.

Solution

Whitelist a BEAN:wstETH Constant Product 2 Well with an updated Multi Flow Pump in the Silo (gauge points TBD).

Migrate urBEANETH to urBEANwstETH.

wstETH:USD Oracle Specification

TBD — notes below:

Two types of stETH:

  1. stETH – Rebasing
  2. wstETH – Non-rebasing → increases in value

Basin does not have a Well Implementation that tracks rebasing well. Thus, we will use wstETH.

Design

Beanstalk requires a wstETH:USD oracle in order to calculate deltaB in the BEAN:wstETH Well.

The wstETH:USD oracle reads from 4 data sources:

  • A: wstETH:stETH Redemption Rate: (0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0)
  • B: stETH:USD Chainlink Oracle: (0xCfE54B5cD566aB89272946F602D76Ea879CAb4a8)
  • C: wstETH:ETH Uniswap Pool: (0xDC24316b9AE028F1497c275EB9192a3Ea0f67022)
  • D: stETH:ETH Redemption: Always 1:1

It then computes the wstETH:ETH price in 3 ways:

  • wstETH -> ETH via Chainlink: C * A
  • wstETH -> ETH via stETH:ETH Curve Pool: C * B
  • wstETH -> ETH via stETH redemption: C * D

Migration Process

Migrate the BEANETH Well LP tokens that underly the urBEANETH token to BEANwstETH Well LP tokens. In doing so, the liquidity underlying urBEANETH is migrated to the BEANwstETH Well and the urBEANETH token becomes the urBEANwstETH token (albeit, with the same token address).

Transaction # Protocol Description
1 Beanstalk Execute the BIP Diamond Cut and transfer underlying urBEANETH to the BCM
2 Basin Remove BEANETH liquidity as Bean and WETH proportionate to the ratio of the pool
3 CoW Swap Swap WETH into stETH using TWAP order
4 Lido Wrap stETH into wstETH
5 Basin Add Beans from Step (2) and wstETH from Step (4) as liquidity to the BEANwstETH Well
6 Beanstalk Add BEANwstETH LP as underlying token for the new urBEANwstETH

During the migration process, attempts to Deposit, Convert or Chop Unripe assets will revert. After the migration process is complete, Conversions between urBEAN and urBEANwstETH will Convert in/out of the BEANwstETH Well instead of the BEANETH Well.

The cost of slippage during Step (3) is passed on to Unripe LP holders.

@Brean0
Copy link
Contributor

Brean0 commented Aug 11, 2024

#758 addresses this issue.

@Brean0 Brean0 closed this as completed Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⛓ Contracts Related to Beanstalk and ecosystem contracts 📜 RFC Formal protocol RFCs
Projects
None yet
Development

No branches or pull requests

2 participants