# BIP-50: Reseed Beanstalk

- Space: [Beanstalk DAO](https://snapshot.box/s:beanstalkdao.eth.md)
- Author: 0x47a473Eb2bDfe6599dac638FFFE0D427d8Ad6888
- State: Passed
- Voting type: Basic
- Start: 2024-10-01 15:00 UTC
- End: 2024-10-08 15:00 UTC
- Votes: 61
- Open in Snapshot: https://snapshot.box/#/s:beanstalkdao.eth/proposal/0xb5f21487caf4e7b0ddd1ac536a4165ea21eb18348987aec95e1cb56148ca916d

## Results

- For: 47,902,822.63 voting power, 100.0%
- Against: 0 voting power, 0.0%

## Proposal

> Note that due to the Snapshot character limit, the Snapshot version of BIP-50 that follows is significantly abridged and includes many references to the complete BIP-50 proposal on Arweave that should be read here:
> 
> https://arweave.net/1QIJ2oHnaTcb3jqY3T7bC92KAS--CVLJmZlL5j_gI6s

## Proposer

Beanstalk Farms, Ben Weintraub, Brendan Sanderson

Proposer Wallet: [0xf9d183af486a973b7921ceb5fdc9908d12aab440](https://etherscan.io/verifySig/258112)

## Summary

1. Upgrade Beanstalk to include the following major features:
    * Secure Beanstalk, which implements function modifiers that maintain protocol wide invariants and adds them to most write functions in Beanstalk;
    * Generalized Convert, which introduces a new Convert function that uses Pipeline to Convert a set of arbitrary (non-Unripe) Deposits to 1 Deposit (including LP → LP Converts);
    * Generalized Flood, which implements Flood in a generalized fashion such that Flood can occur in multiple Wells at once;
    * Shipments, which introduces a generalized system for allocating new Bean mints to various components of Beanstalk; and
    * Tractor, which is a peer-to-peer transaction marketplace that allows third party operators to perform Beanstalk actions on behalf of a Farmer;
2. Upgrade Beanstalk to include the following various quality of life improvements:
    * Upgrade the Solidity version from v0.7.6 to v0.8.20;
    * Implement a generalized whitelist system that supports custom oracles, Gauge Point functions and Liquidity Weight functions that do not require a diamond cut to change for a given whitelisted asset;
        * Implement a generalized Chainlink oracle system such that a Well that has a non-Bean asset whose USD price can be queried via Chainlink can be whitelisted without a diamond cut;
        * Implement a generalized Uniswap V3 oracle system such that a Well that has a non-Bean asset whose price can be queried via Uniswap V3 can be whitelisted without a diamond cut, provided that the other token in the oracle pool has a Chainlink feed (e.g., WBTC/USDC on Uniswap V3 * USDC/USD Chainlink feed);
    * Change the control variable in the Morning Auction from 2 to 0.1 to slow down the increase in the Temperature;
    * Update the default Gauge Point function (used by all whitelisted LP tokens) to adjust the Gauge Points more aggressively the farther away the current % BDV distribution is away from optimal;
    * Update the Bean to Max LP Ratio to its minimum value upon Rain;
    * Add several view functions for getting Farmer's balances;
    * Redesign App Storage to improve developer experience and future proof new additions to contract storage;
    * Move several constants that have the potential to change into contract state;
    * Redesign reentrancy protection to support Pipeline and Depot;
    * Increase Stalk decimal precision by 1e6 to prevent micro Stalk from being lost;
    * Add a `TokenTransferred` event with data on sender and receiver addresses of Farm balance transfers;
3. Migrate Beanstalk from Ethereum mainnet to Arbitrum:
    * Pause Beanstalk on L1 mainnet;
    * Remove all L1 facets except for the DiamondCutFacet, DiamondLoupeFacet, OwnershipFacet and PauseFacet;
    * Upgrade L1 Beanstalk with a new TokenFacet and L2MigrationFacet that allows Circulating Beans to be migrated to L2;
    * Run initialization scripts that transfer whitelisted LP tokens from Beanstalk to the L1 BCM to be unwrapped and bridged to L2 BCM (BEAN:3CRV is migrated to BEAN:USDC on Arbitrum);
    * Deploy L2 Beanstalk;
    * Update L2 Beanstalk with the L1 state;
    * Deploy, add liquidity to and whitelist the following Wells (see Proposed Solution for details):
        * BEAN:USDC;
        * BEAN:USDT;
        * BEAN:WBTC;
        * BEAN:wstETH;
        * BEAN:WETH; and
        * BEAN:weETH;
    * Add all facets that include the upgrades described above (excluding FundraiserFacet, LegacyClaimWithdrawalFacet, CurveFacet and MigrationFacet) to L2 Beanstalk; and
    * Unpause L2 Beanstalk.
4. Update various processes and documentation such as Hypernative, Immunefi and the Disclosures to reflect the new state of Beanstalk.

## Links

* [BIP-50 GitHub PR](https://github.com/BeanstalkFarms/Beanstalk/pull/909)
* GitHub Commit Hash: [faa0ec60a455b0afdd20ad86f28f41cbc52c2e2d](https://github.com/BeanstalkFarms/Beanstalk/pull/909/commits/faa0ec60a455b0afdd20ad86f28f41cbc52c2e2d)
* [Safe Transaction](https://app.safe.global/transactions/tx?safe=eth:0xa9bA2C40b263843C04d344727b954A545c81D043&id=multisig_0xa9bA2C40b263843C04d344727b954A545c81D043_0x19f2d9211b0fe8a005ce12f76f147a95ed8bc14d54614848e0bb60c3d2b5a0bd)

## Problem

See the [full Arweave upload of BIP-50](https://arweave.net/1QIJ2oHnaTcb3jqY3T7bC92KAS--CVLJmZlL5j_gI6s#problem) to read the Problem section.

## Proposed Solution

See the [full Arweave upload of BIP-50](https://arweave.net/1QIJ2oHnaTcb3jqY3T7bC92KAS--CVLJmZlL5j_gI6s#proposed-solution) to read the Proposed Solution section.

## Technical Rationale

See the [full Arweave upload of BIP-50](https://arweave.net/1QIJ2oHnaTcb3jqY3T7bC92KAS--CVLJmZlL5j_gI6s#technical-rationale) to read the Technical Rationale section.

## Economic Rationale

See the [full Arweave upload of BIP-50](https://arweave.net/1QIJ2oHnaTcb3jqY3T7bC92KAS--CVLJmZlL5j_gI6s#economic-rationale) to read the Economic Rationale section.

## Contract Changes

See the [full Arweave upload of BIP-50](https://arweave.net/1QIJ2oHnaTcb3jqY3T7bC92KAS--CVLJmZlL5j_gI6s#contract-changes) to read the Contract Changes section.

## Beans Minted

See the [full Arweave upload of BIP-50](https://arweave.net/1QIJ2oHnaTcb3jqY3T7bC92KAS--CVLJmZlL5j_gI6s#beans-minted) to read the Beans Minted section.

## Audit

See the [full Arweave upload of BIP-50](https://arweave.net/1QIJ2oHnaTcb3jqY3T7bC92KAS--CVLJmZlL5j_gI6s#audit) to read the Audit section.

## Effective

After either:

* A two-thirds supermajority is reached; or
* The Voting Period ends and either (1) 50% of Stalk is voting For or (2) one-third of Stalk, plus the amount of Stalk voting Against, is voting For,

The L1 BCM will:

* Execute a diamond cut that removes the SiloFacet and wait for 2 Seasons to pass in order for all Deposits to Germinate (only if there are Germinating Deposits at the time of BIP passage);
* Execute the BIP-50 diamond cut, which:
    * Calls the `ReseedL2Migration` initialization contract, which:
        * Pauses L1 Beanstalk; and
        * Transfers all BEANETH, BEANwstETH and BEAN3CRV in L1 Beanstalk to the L1 BCM;
    * Removes all facets except for `DiamondCutFacet`, `DiamondLoupeFacet`, `OwnershipFacet` and `PauseFacet`; and
    * Adds the `L1TokenFacet` and `L2MigrationFacet`;
* Remove corresponding liquidity from the BEAN:WETH, BEAN:wstETH and BEAN:3CRV pools;
* Swap all 3CRV for USDC; and
* Send all WETH, wstETH and USDC to Arbitrum using the Arbitrum-native bridge.

In addition, a deployer will:
* Fetch the state of L1 Beanstalk at the end of the block in which the BIP-50 diamond cut is executed;
* Deploy the L2 Beanstalk diamond on Arbitrum (in a Paused state);
* Execute the series of scripts to: 
    * Initialize the state of L2 Beanstalk;
    * Deploy all whitelisted Wells;
    * Mint Beans to be added as liquidity to the L2 BCM;
    * Mint remaining Beans (for Bean Deposits, Ripe Beans, Farm Balances and Beans in Pod Orders) to L2 Beanstalk; and
    * Mint Unripe Beans and Unripe LP to L2 Beanstalk; and
* Transfer ownership of L2 Beanstalk to the L2 BCM.

After which the L2 BCM will:
* Execute a series of scripts that verify the state of L2 Beanstalk;
* Claim ownership of L2 Beanstalk;
* Add liquidity to the BEAN:WETH, BEAN:wstETH and BEAN:USDC Wells;
* Transfer the corresponding BEANWETH, BEANwstETH and BEANUSDC Well LP tokens to L2 Beanstalk;
* Add all the facets mentioned in the Contract Changes section; and
* Unpause L2 Beanstalk.

---

To vote or create proposals from an AI assistant, connect the Snapshot MCP at https://mcp.snapshot.box

