# Agronomics Handbook

The **Agronomics Handbook** is a collection of technical documentation about Beanstalk.

Beanstalk forms the monetary basis of an Arbitrum-native, rent-free economy facilitated by the seigniorage of its native fiat currency, a stablecoin called Bean.

Beanstalk strives to create product market fit on both a technical and economic level.

Beanstalk pioneers a path forward for devising more efficient and complex systems. Beanstalk is implemented in [Solidity v0.8.20](https://docs.soliditylang.org/en/v0.8.20/) for intended use in the [EVM](https://ethereum.org/en/developers/docs/evm/). Beanstalk leverages [EIP-2535](https://eips.ethereum.org/EIPS/eip-2535) to minimize gas costs and complexity.

The contract code can be found below. Beanstalk is deployed at [`0xD1A0060ba708BC4BCD3DA6C37EFa8deDF015FB70`](https://arbiscan.io/address/0xD1A0060ba708BC4BCD3DA6C37EFa8deDF015FB70).

{% embed url="<https://github.com/BeanstalkFarms/Beanstalk>" %}

* If you are looking for non-technical documentation about Beanstalk, check out the [Farmers' Almanac](https://docs.bean.money/almanac).
* If you are looking for comprehensive formulas behind Beanstalk's mechanics, check out the [Beanstalk whitepaper](https://bean.money/beanstalk.pdf).
* If you have any other questions while browsing the Agronomics Handbook, join the Beanstalk Discord and ask in the **(#🪵・development)** channel!

Please share any feedback on the Agronomics Handbook in the **(#📜・docs-feedback)** channel in Discord and stay tuned for updates in **(#📜・docs-updates)**. You can submit a pull request to the Agronomics Handbook yourself [here](https://github.com/BeanstalkFarms/Agronomics-Handbook).

### Links

* [Technical Introduction](/developers/overview/introduction)
* [Development Ethos](/developers/overview/development-ethos)
* [Protocol Overview](/developers/protocol/overview)
* [Beanstalk on GitHub](https://github.com/BeanstalkFarms/Beanstalk)
* [Contract Addresses](https://docs.bean.money/almanac/protocol/contracts)
* [Glossary](https://docs.bean.money/almanac/protocol/glossary)


# Introduction

Beanstalk is a permissionless fiat stablecoin protocol built on Arbitrum.

Beanstalk forms the monetary basis of an Arbitrum-native, rent-free economy facilitated by the seigniorage of its native fiat currency, a stablecoin called Bean.

Beanstalk's primary objective is to incentivize independent market participants to regularly cross the price of 1 Bean across its value peg of $1 in a sustainable fashion. The stability of the Bean price relative to its value peg is a function of the creditworthiness of Beanstalk—Beanstalk attracts lenders when the price of a Bean is below its value peg to remove Beans from the supply and increase their price.

When the Bean price is too high, Beanstalk mints new Beans and distributes them to various ecosystem participants in a deterministic fashion. This inflation is [the positive carry](https://docs.bean.money/almanac/introduction/why-beanstalk#carrying-costs) that the Beanstalk economy is based on.

Beanstalk implements several novel mechanisms including a first-in-first-out (FIFO) [debt model](https://docs.bean.money/almanac/farm/field#pods) supplemented by [an on-chain order book](https://docs.bean.money/almanac/farm/market#the-pod-market), [a time-weighted staking structure](https://docs.bean.money/almanac/farm/silo#the-stalk-system) that increases the opportunity cost of withdrawing the longer an asset stays deposited in the DAO and [a convert mechanism](https://docs.bean.money/almanac/peg-maintenance/convert) that allows participants to perform peg maintenance while those assets are staked.

Beanstalk strives to create product market fit on both a technical and economic level. In order to service an entire ecosystem, Beanstalk needs to provide a cheap, composable and interoperable interface. However, as protocols become more sophisticated and blockspace more crowded, smart contract architecture complexity can quickly become overwhelming.

Beanstalk pioneers a path forward for devising more efficient and complex systems. Beanstalk is implemented in [Solidity v0.8.20](https://docs.soliditylang.org/en/v0.8.20/) for intended use in the [EVM](https://ethereum.org/en/developers/docs/evm/). Beanstalk leverages [EIP-2535](https://eips.ethereum.org/EIPS/eip-2535) to minimize gas costs and complexity.

Beanstalk consists of 2 main contracts:

* Beanstalk - The protocol responsible for peg maintenance implemented as an [EIP-2535](https://eips.ethereum.org/EIPS/eip-2535) multi-facet proxy.
* Bean – The stablecoin implemented as an [ERC-20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) token.

### Contracts

Beanstalk is deployed at [`0xD1A0060ba708BC4BCD3DA6C37EFa8deDF015FB70`](https://arbiscan.io/address/0xD1A0060ba708BC4BCD3DA6C37EFa8deDF015FB70).

Bean is deployed at [`0xBEA0005B8599265D41256905A9B3073D397812E4`](https://arbiscan.io/address/0xBEA0005B8599265D41256905A9B3073D397812E4).

All relevant contract addresses can be found on the [Contracts](https://docs.bean.money/almanac/protocol/contracts) page of the [Farmers' Almanac](https://docs.bean.money/almanac).


# Development Ethos

Decentralized blockchains like Ethereum impose extreme computational and storage limitations. While centralized computation solutions allow the execution of advanced statistical models on gigabytes of data, decentralized systems force users to pay for every byte stored and basic arithmetic operation performed on-chain.

Decentralized systems will scale infinitely over time, eventually allowing users to perform large scale machine learning operations on decentralized architectures. However, it's imperative to start building, experimenting with and iterating on the financial primitives that will define the foundations of permissionless ecosystems. Otherwise, it is likely that they will merely mimic those of the centralized world. Beanstalk is an attempt at implementing a permissionless fiat currency designed to become the basis of the rent-free economy that decentralized primitives are ushering in.&#x20;

> *“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” – Antoine de Saint-Exupéry*

No one wants to be limited, but resource scarcity forces innovation. For example, because Ethereum does not lend itself to trading on order books, Automated Market Makers (AMMs) like [Uniswap](https://uniswap.org/) and [Bancor](https://home.bancor.network/) created liquidity pools based on a predefined pricing curve to create an efficient exchange format (instead of a high frequency order book).&#x20;

AMMs are still being iterated and innovated on. Uniswap created an order book/AMM hybrid with Uniswap V3. [Curve](https://curve.fi/) implemented capital efficient pricing curves. Bancor built an omnipool, providing impermanent loss protection. [Basin](https://basin.exchange/) supports a 0% (customizable) fee AMM.

Open source protocols are a public good. More than [250](https://defillama.com/forks) protocols have forked Uniswap V2 to try to improve on its model. Some may call it competitive, but it is also collaborative. Each implementation is more advanced than its previous iteration and is made possible through increasingly efficient allocation of EVM resources.

Question everything, be critical, and collaborate.


# EIP-2535 Diamond

The Beanstalk contract is a Diamond – a multi-facet proxy defined in [EIP-2535](https://eips.ethereum.org/EIPS/eip-2535) that can implement functionality from numerous different Facet contracts.&#x20;

All the Facets share a common storage through the [`AppStorage`](https://dev.to/mudgen/appstorage-pattern-for-state-variables-in-solidity-3lki) pattern. Functionality is shared between Facets through internal Libraries.

Understanding EIP-2535 really helps to understand Beanstalk. This page serves as a resource hub for EIP-2535.

#### What is a Diamond?

* [EIP-2535](https://eips.ethereum.org/EIPS/eip-2535)
* [Understanding Diamonds on Ethereum](https://dev.to/mudgen/understanding-diamonds-on-ethereum-1fb)
* [How Diamond Upgrades Work](https://dev.to/mudgen/how-diamond-upgrades-work-417j)

#### Implementation Tips for Diamonds (which Beanstalk uses)

* [AppStorage Pattern for State Variables in Solidity](https://dev.to/mudgen/appstorage-pattern-for-state-variables-in-solidity-3lki)
* [How to Share Functions Between Facets of a Diamond](https://dev.to/mudgen/how-to-share-functions-between-facets-of-a-diamond-1njb)
* [Accessing State Variables in Libraries](https://dev.to/mudgen/solidity-libraries-can-t-have-state-variables-oh-yes-they-can-3ke9)

#### Why use a Diamond?

* [Ethereum's Maximum Contract Size Limit is Solved with the Diamond Standard](https://dev.to/mudgen/ethereum-s-maximum-contract-size-limit-is-solved-with-the-diamond-standard-2189)
* [🌱 Beanstalk 🤝 EIP-2535 💎](https://publius.money/blog/2021-09-24-beanstalk-eip-2535)
* [Ethereum Diamonds Solve These Problems](https://dev.to/mudgen/ethereum-diamonds-solve-these-problems-3fmp)

#### More Information on Diamonds

* [Beanstalk on Louper, The Ethereum Diamond Inspector](https://louper.dev/diamond/0xc1e088fc1323b20bcbee9bd1b9fc9546db5624c5)
* [EIP-2535 Diamonds Discord](https://discord.gg/kQewPw2)
* [Nick Mudge <> Publius Podcast](https://www.youtube.com/watch?v=3-RUl12lPnI)


# App Storage

Because Beanstalk is a single contract, all of the Facets can share a common state through the [`AppStorage`](https://dev.to/mudgen/appstorage-pattern-for-state-variables-in-solidity-3lki) pattern.

Each Facet should define the `AppStorage` storage variable in the base contract and define **no other** `internal` or `public` state variables.

```solidity
AppStorage internal s;
```

The `AppStorage` struct can be found in the [`AppStorage.sol`](https://github.com/BeanstalkFarms/Beanstalk/tree/master/protocol/contracts/beanstalk/storage) file.

When adding new state variables, always add them to the end of the `AppStorage` struct to ensure consistent mapping of state variables to storage slots. When deprecating an unnecessary state variables, either replace it with a different variable denoting that the state variable is deprecated or leave it as is.

In the EVM, data is accessed 32 bytes at a time (known as a slot). Because of this, in Beanstalk, many state variables are packed within the `AppStorage` struct to reduce gas costs. For example, say that in function `foo`, the state of 2 `uint256` values is changed. Changing a non-zero value to another non-zero value costs 10000 gas (`2 * 5000`). If the 2 values could be stored in `uint128`s instead (meaning the data is in one slot), 2100 gas is shaved off, as the state slot is now warm. (If a slot is touched for the first time in a transaction, it is turned from cold to warm for the rest of that transaction. Warm touches are cheaper than cold touches.)


# Internal Balances

### What are Internal Balances? <a href="#what-are-internal-balances" id="what-are-internal-balances"></a>

Beanstalk uses an Internal Balances system largely inspired by [Balancer's Vault](https://docs.balancer.fi/getting-started/faqs/the-vault#what-are-internal-user-balances). With Internal Balances, Beanstalk is able to store an any ERC-20 token on behalf of a user. Beanstalk stores that the user has that ERC-20 token in [`AppStorage`](/developers/overview/app-storage). All functions within Beanstalk that either use a user's ERC-20 tokens or send ERC-20 tokens to a user can send/receive the ERC-20 tokens from the user's Internal Balance and/or External Balance (the user's wallet).

Internal Balances can significantly reduce transaction costs for using tokens that remain in Beanstalk. As more protocols utilize Internal Balances, the gas savings can compound.

{% hint style="warning" %}
In the Beanstalk ecosystem, **Internal Balances** are referred to as **Farm Balances**. Similarly, **External Balances** (balances in the user's wallet) are referred to as **Circulating Balances**. See [Terminology Discrepancies](/developers/misc/terminology-discrepancies).
{% endhint %}

### Relevant Contracts <a href="#associated-contracts" id="associated-contracts"></a>

* [`LibTransfer.sol`](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/libraries/Token/LibTransfer.sol)
* [`LibBalance.sol`](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/libraries/Token/LibBalance.sol)

### To / From

`LibTransfer` uses the following structs in order to denote the location(s) from which tokens will be used in a function.

```solidity
enum From {
    EXTERNAL,
    INTERNAL,
    EXTERNAL_INTERNAL,
    INTERNAL_TOLERANT
}
```

* `EXTERNAL`: Beanstalk will receive tokens from the user's External Balance;
* `INTERNAL`: Beanstalk will receive tokens from the user's Internal Balance;
* `EXTERNAL_INTERNAL`: Beanstalk will receive tokens from the user's Internal Balance and will receive from their External Balance if there is not enough in the Internal Balance; and
* `INTERNAL_TOLERANT`: Beanstalk will receive tokens from the user's Internal Balance and will not fail if there is not enough in their Internal Balance.

```solidity
enum To {
    EXTERNAL,
    INTERNAL
}
```

* `EXTERNAL` Beanstalk will send tokens to the user's External Balance; and
* `INTERNAL` Beanstalk will send tokens to the user's Internal Balance.

### Transferring Internal / External Balances <a href="#transferring-internal-external-balances" id="transferring-internal-external-balances"></a>

At any time, a user can transfer, add or remove ERC-20 tokens from their Internal Balance through the `transferToken` function in the [`TokenFacet`](/developers/protocol/depot/token-facet). `transferToken` is a general transfer method that allows full control of the tokens start/end location (i.e internal to internal, internal to external, external to internal, external to external).

```solidity
function transferToken(
    IERC20 token,
    address recipient,
    uint256 amount,
    LibTransfer.From fromMode,
    LibTransfer.To toMode
) external payable;
```

### Sending Internal / External Balances <a href="#sending-internal-external-balances" id="sending-internal-external-balances"></a>

A function that sends ERC-20 tokens to users can implement Internal Balances by adding the `To` enum in `LibTransfer` to a function's signature.

Then call `sendToken` in `LibTransfer` instead of directly calling the ERC-20 function `transferFrom`.

```solidity
function sendToken(
    IERC20 token,
    uint256 amount,
    address recipient,
    To mode
) internal;
```

### Receiving Internal / External Balances <a href="#receiving-internal-external-balances" id="receiving-internal-external-balances"></a>

A function that receives ERC-20 tokens from users can implement Internal Balances by adding the `From` enum in `LibTransfer` to a function's signature.

Then call `receiveToken` in `LibTransfer` instead of directly calling the ERC-20 function `transfer`.

```solidity
function receiveToken(
    IERC20 token,
    uint256 amount,
    address recipient,
    To mode
) internal;
```

For protocols that are building on top of Beanstalk and want to interact with Internal Balances, they can utilize the functions given in [`TokenFacet`](/developers/protocol/depot/token-facet), rather than the library itself.


# Overview

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

Beanstalk can be broken down into 7 different Modules consisting of 25 Facets:

* [Sun](/developers/protocol/sun) (1 Facet)
* [Silo](/developers/protocol/silo) (10 Facets)
* [Field](/developers/protocol/field) (2 Facets)&#x20;
* [Barn](/developers/protocol/barn) (2 Facets)
* [Market](/developers/protocol/market) (1 Facet)
* [Farm](/developers/protocol/depot) (5 Facets)
* [Diamond](/developers/protocol/diamond) (4 Facets)

### Sun

The Sun handles moving time forward in Beanstalk. It advances Beanstalk to the next Season.

The Sun consists of 1 Facet:

* [`SeasonFacet`](/developers/protocol/sun/season-facet) -> Contains the `gm` function.

### Silo

The Silo offers a passive yield opportunity in the form of Bean seigniorage to Farmers who Deposit Beans and other whitelisted assets. Upon Deposit in the Silo, Farmers receive Stalk and Seeds based on the Bean Denominated Value (BDV) Deposited and the asset Deposited.

The Silo consists of 10 Facets:

* [`SiloFacet`](/developers/protocol/silo/silo-facet) -> Where Farmers Deposit, Withdraw, Claim and Transfer assets in/from the Silo.
* [`BDVFacet`](/developers/protocol/silo/bdv-facet) -> Handles logic for retrieving the BDV of some amount of a whitelisted asset.
* [`WhitelistFacet`](/developers/protocol/silo/whitelist-facet) -> Handles the addition and removal of tokens from the [Deposit Whitelist](https://docs.bean.money/almanac/farm/silo#deposit-whitelist).
* [`ConvertFacet`](/developers/protocol/silo/convert-facet) -> Where Farmers Convert a Deposit of a whitelisted asset to a Deposit of another whitelisted asset.
* [`ConvertGettersFacet`](/developers/protocol/silo/convert-facet-1) -> Contains view functions for Convert data.
* [`EnrootFacet`](/developers/protocol/silo/convert-facet-2) -> Where Farmers Enroot their Unripe Deposits.
* [`ApprovalFacet`](/developers/protocol/silo/approval-facet) -> Contains logic for Deposit approvals and permits.
* [`MetadataFacet`](/developers/protocol/silo/metadata-facet) -> Contains on-chain metadata for the Deposit ERC-1155 tokens.
* [`MigrationFacet`](/developers/protocol/silo/migration-facet) -> Where Farmers migrate to the latest Silo accounting system.
* [`LegacyClaimWithdrawalFacet`](/developers/protocol/silo/legacy-claim-withdrawal-facet) -> Facilitates backwards compatibility for Farmers with unclaimed Withdrawals before the [Silo V3 upgrade](https://bean.money/bip-36).

### Field

The Field is Beanstalk's native credit facility. Anytime Beanstalk is willing to borrow Beans from the market, it issues Soil in the Field. Beans are Sown in exchange for Pods, the Beanstalk-native debt asset. Loans to Beanstalk are issued with a fixed interest rate, known as the Temperature, and an unknown maturity date.

Pods become Harvestable Pods that can be Harvested (redeemed) for 1 Bean each on a First In, First Out (FIFO) basis. There is no penalty for waiting to Harvest Pods.

The Field consists of 2 Facets:

* [`FieldFacet`](/developers/protocol/field/field-facet) -> Where Farmers Sow Beans into Pods and Harvest Pods into Beans.
* [`FundraiserFacet`](/developers/protocol/field/fundraiser-facet) -> Where Farmers create and fund Fundraisers through Sowing non-Bean assets into Pods.

### Barn

The Barn was built after Beanstalk was exploited on April 17, 2022. The Barn distributes Bean rewards to those who hold Fertilizer tokens from participation in the Barn Raise. It also handles the Chopping of Unripe Beans and Unripe LP into their underlying assets at a potential penalty.

{% hint style="warning" %}
In the Beanstalk ecosystem,&#x20;

* **Unfertilized Beans** are referred to as **Sprouts**;
* **Fertilized Beans** are referred to as **Rinsable Sprouts** that can be **Rinsed**; and
* **Underlying** assets are referred to as **Ripe** assets. &#x20;

See [Terminology Discrepancies](/developers/misc/terminology-discrepancies).
{% endhint %}

Unfertilized Beans become Fertilized Beans that can be claimed (redeemed) for 1 Bean each on a pari passu basis. There is no penalty for waiting to claim Fertilized Beans.

The Barn consists of 2 Facets:

* [`FertilizerFacet`](/developers/protocol/barn/fertilizer-facet) -> Where Farmers buy Fertilizer with USDC and claim Beans earned from Fertilizer.
* [`UnripeFacet`](/developers/protocol/barn/unripe-facet) -> Allows Farmers to Chop Unripe assets into their underlying assets at a potential penalty.

### Market

The Market houses various DEXs for zero fee trading. Currently only Pods can be traded on the Market.

Pods can be bought and sold in a decentralized, trustless fashion on the [Pod Market](https://docs.bean.money/almanac/farm/market#the-pod-market). The Pod Market creates liquidity for Pods through an on-chain order book.

Sellers can List Pods or Fill open Pod Orders placed by buyers. Buyers can Order Pods or Fill open Pod Listings placed by sellers.

The Market consists of 1 Facet:

* [`MarketplaceFacet`](/developers/protocol/market/marketplace-facet) -> Contains the Pod Market where Farmers create, Fill and Cancel Pod Listings and Orders, as well as transfer Pods.

### Farm

The Farm allows Farmers to call multiple functions in a single transaction and use assets between different function in a composable manner, without those assets every leaving Beanstalk (thanks to [Internal Balances](/developers/overview/internal-balances)).

The Farm consists of 5 Facets:

* [`FarmFacet`](/developers/protocol/depot/farm-facet) -> Contains the `farm` function, which allows Farmers to call a series of functions together within Beanstalk.
* [`DepotFacet`](/developers/protocol/depot/depot-facet) -> Wraps the standalone [Pipeline](https://evmpipeline.org/) contract, providing access to Pipeline from Beanstalk through the use of the `farm` function.
* [`TokenFacet`](/developers/protocol/depot/token-facet) -> Supports transferring assets between Internal and External Balances and between different accounts. Also supports Wrap/Unwrap logic for ETH.
* [`TokenSupportFacet`](/developers/protocol/depot/token-support-facet) -> Handles token permits.
* [`CurveFacet`](/developers/protocol/depot/curve-facet) -> Provides an interface to exchange and add/remove liquidity on Curve directly through Beanstalk.

### Diamond

The Diamond Module controls and manages the Beanstalk contract by providing functionality to upgrade and view supported functions in Beanstalk. It also controls which address owns the Beanstalk contract.

The Diamond Module consists of 4 Facets:

* [`DiamondCutFacet`](/developers/protocol/diamond/diamond-cut-facet) -> Provides functionality for the owner to add/remove/replace functions within the Beanstalk contract.
* [`DiamondLoupeFacet`](/developers/protocol/diamond/diamond-loupe-facet) -> Allows anyone to see the available functions within Beanstalk.
* [`OwnershipFacet`](/developers/protocol/diamond/ownership-facet) -> Manages which address owns Beanstalk.
* [`PauseFacet`](/developers/protocol/diamond/pause-facet) -> Allows the owner of Beanstalk to Pause/Unpause Beanstalk.


# Sun

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Sun advances Beanstalk to the next Season through the `sunrise` function in the Season Facet. Every time an hour passes, `sunrise` can be called 1 more time.

The Season Facet has [several subcontracts](https://github.com/BeanstalkFarms/Beanstalk/tree/master/protocol/contracts/beanstalk/sun/SeasonFacet):

* [`Oracle.sol`](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/farm/facets/SeasonFacet/Oracle.sol) -> Calculates the time weighted average number of Beans that Bean is above/below its value peg in all pools on the [Oracle Whitelist](https://docs.bean.money/farm/sun#oracle-whitelist).
* [`Weather.sol`](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/farm/facets/SeasonFacet/Weather.sol) -> Changes the Max Temperature (interest rate) depending on the Bean price, debt level and demand for Soil.
* [`Sun.sol`](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/farm/facets/SeasonFacet/Sun.sol) -> Sets the Soil for the next Season and mints new Beans if `Oracle` returns `deltaB > 0` and distributes them as follows:
  * Up to 1/3 to Active Fertilizer holders (see [Barn](/developers/protocol/barn));
  * Up to 1/2 of the remaining amount to Pod holders (see [Field](/developers/protocol/field)); and
  * The rest to Stalkholders in the Silo (see [Silo](/developers/protocol/silo)).

`sunrise` does the following steps:

1. Increments the Season number;
2. Calls `Oracle` to get `deltaB`;
3. Calls `Weather` to adjust the Max Temperature and checks for Rain and Season of Plenty;
4. Calls `Sun` to set the Soil and mint Beans if `deltaB > 0`; and
5. Pays `msg.sender` Beans for paying the transaction fee associated with calling the function.

{% hint style="warning" %}
In the Beanstalk ecosystem,

* **Rain** is referred to as **Oversaturation**; and
* **Season of Plenty** is referred to as **Flood**.

See [Terminology Discrepancies](/developers/misc/terminology-discrepancies).
{% endhint %}


# Season Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Season Facet contains the `gm` function and handles all logic for Season changes.

## Call Functions

### [Sunrise](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/SeasonFacet.sol#L37)

```solidity
function sunrise() external payable returns (uint256);
```

Advances Beanstalk to the next Season, sending reward Beans to the caller's Circulating balance.

| Return Type | Description                               |
| ----------- | ----------------------------------------- |
| `uint256`   | The number of Beans minted to the caller. |

### [GM](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/SeasonFacet.sol#L47)

```solidity
function gm(
    address account,
    LibTransfer.To mode
) public payable returns (uint256);
```

Advances Beanstalk to the next Season, sending reward Beans to a specified address and balance.

| Parameter | Type      | Description                                                                                       |
| --------- | --------- | ------------------------------------------------------------------------------------------------- |
| `account` | `address` | Indicates to which address reward Beans should be sent.                                           |
| `mode`    | `To`      | The balance to transfer Beans to; see [`LibTransfer.To`](/developers/overview/internal-balances). |

| Return Type | Description                               |
| ----------- | ----------------------------------------- |
| `uint256`   | The number of Beans minted to the caller. |

## View Functions

### [Season](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/SeasonFacet.sol#L69)

```solidity
function season() public view returns (uint32);
```

Returns the current Season number.

| Return Type | Description                |
| ----------- | -------------------------- |
| `uint32`    | The current Season number. |

### [Paused](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/SeasonFacet.sol#L76)

```solidity
function paused() public view returns (bool);
```

Returns whether Beanstalk is Paused. When Paused, `sunrise` cannot be called.

| Return Type | Description                  |
| ----------- | ---------------------------- |
| `bool`      | Whether Beanstalk is Paused. |

### [Time](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/SeasonFacet.sol#L83)

```solidity
function time() external view returns (Storage.Season memory);
```

Returns the Season struct.

| Return Type | Description                                                           |
| ----------- | --------------------------------------------------------------------- |
| `Season`    | The Season struct in [App Storage](/developers/overview/app-storage). |

### [Above Peg](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/SeasonFacet.sol#L90)

```solidity
function abovePeg() external view returns (bool);
```

Returns whether Beanstalk started this Season above or below peg.

| Return Type | Description                                               |
| ----------- | --------------------------------------------------------- |
| `bool`      | Whether Beanstalk started this Season above or below peg. |

### [Sunrise Block](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/SeasonFacet.sol#L97)

```solidity
function sunriseBlock() external view returns (uint32);
```

Returns the block during which the current Season started.

| Return Type | Description                                        |
| ----------- | -------------------------------------------------- |
| `uint32`    | The block during which the current Season started. |

### [Season Time](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/SeasonFacet.sol#L105)

```solidity
function seasonTime() public view virtual returns (uint32);
```

Returns the expected Season number given the current block timestamp. The `sunrise` function can be called when `seasonTime() > season()`.

| Return Type | Description                                                   |
| ----------- | ------------------------------------------------------------- |
| `uint32`    | The expected Season number given the current block timestamp. |

### [Weather](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/Weather.sol#L75)

```solidity
function weather() public view returns (Storage.Weather memory);
```

Returns the Weather struct.

| Return Type | Description                                                                    |
| ----------- | ------------------------------------------------------------------------------ |
| `Weather`   | Returns the Weather struct in [App Storage](/developers/overview/app-storage). |

### [Rain](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/Weather.sol#L82)

```solidity
function rain() public view returns (Storage.Rain memory);
```

Returns the Rain struct.

| Return Type | Description                                                                 |
| ----------- | --------------------------------------------------------------------------- |
| `Rain`      | Returns the Rain struct in [App Storage](/developers/overview/app-storage). |

### [Plenty Per Root](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/Weather.sol#L89)

```solidity
function plentyPerRoot(uint32 season) external view returns (uint256);
```

Returns the Season of Plenty (SOP) rewards per Root for the given Season.

| Parameter | Type     | Description                                   |
| --------- | -------- | --------------------------------------------- |
| `season`  | `uint32` | The Season to fetch SOP rewards per Root for. |

| Return Type | Description                           |
| ----------- | ------------------------------------- |
| `uint256`   | The SOP rewards for the given Season. |

### [Total deltaB](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/Oracle.sol#L28)

```solidity
function totalDeltaB() external view returns (int256 deltaB);
```

Returns the cumulative deltaB across all pools on the Oracle Whitelist.

| Return Value | Type     | Description            |
| ------------ | -------- | ---------------------- |
| `deltaB`     | `int256` | The cumulative deltaB. |

### [Pool deltaB](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/Oracle.sol#L35)

```solidity
function poolDeltaB(address pool) external view returns (int256);
```

Returns the deltaB for a given pool.

| Parameter | Type      | Description               |
| --------- | --------- | ------------------------- |
| `pool`    | `address` | The address of the pool . |

| Return Value | Description                    |
| ------------ | ------------------------------ |
| `int256`     | The deltaB for the given pool. |

### [Well Oracle Snapshot](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/Oracle.sol#L55)

```solidity
function wellOracleSnapshot(address well) external view returns (bytes memory snapshot);
```

Returns the last Well oracle snapshot for a given Well.

| Parameter | Type      | Description                                      |
| --------- | --------- | ------------------------------------------------ |
| `well`    | `address` | The address of the pool to get the snapshot for. |

<table><thead><tr><th>Type</th><th data-hidden>Description</th><th data-hidden>Return Value</th></tr></thead><tbody><tr><td><code>int256</code></td><td>The last Curve oracle snapshot for <code>well</code>.</td><td><code>snapshot</code></td></tr></tbody></table>

### [Curve Oracle](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/Oracle.sol#L63)

```solidity
function curveOracle() external view returns (Storage.CurveMetapoolOracle memory co);
```

Returns the last Curve oracle data snapshot for the BEAN:3CRV pool.

<table><thead><tr><th>Return Value</th><th>Type</th><th>Description</th><th data-hidden>Description</th><th data-hidden>Return Value</th></tr></thead><tbody><tr><td><code>co</code></td><td><code>Storage.CurveMetapoolOracle</code></td><td>Last Curve oracle data snapshot.</td><td>The deltaB for the given pool.</td><td><code>co</code></td></tr></tbody></table>

## Events

### [Sunrise](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/SeasonFacet.sol#L22) <a href="#event-sunrise" id="event-sunrise"></a>

```solidity
event Sunrise(uint256 indexed season);
```

Emitted when the Season changes.

| Parameter | Type      | Description            |
| --------- | --------- | ---------------------- |
| `season`  | `uint256` | The new Season number. |

### [Incentivization](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/SeasonFacet.sol#L29) <a href="#event-incentivization" id="event-incentivization"></a>

```solidity
event Incentivization(address indexed account, uint256 beans);
```

Emitted when Beanstalk pays Beans to the `sunrise` caller.

| Parameter | Type      | Description                                      |
| --------- | --------- | ------------------------------------------------ |
| `account` | `address` | The address to which the reward Beans were sent. |
| `beans`   | `uint256` | The amount of Beans paid as a reward.            |

### [Reward](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/Sun.sol#L43) <a href="#event-reward" id="event-reward"></a>

```solidity
event Reward(uint32 indexed season, uint256 toField, uint256 toSilo, uint256 toFertilizer);
```

Emitted during Sunrise when Beans are distributed to the Field, the Silo, and Fertilizer.

| Parameter      | Type      | Description                                            |
| -------------- | --------- | ------------------------------------------------------ |
| `season`       | `uint32`  | The Season in which Beans were distributed.            |
| `toField`      | `uint256` | The number of Beans distributed to the Field.          |
| `toSilo`       | `uint256` | The number of Beans distributed to the Silo.           |
| `toFertilizer` | `uint256` | The number of Beans distributed to Fertilizer holders. |

### [Soil](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/Sun.sol#L55) <a href="#event-soil" id="event-soil"></a>

```solidity
event Soil(uint32 indexed season, uint256 soil);
```

Emitted during Sunrise when Beanstalk adjusts the amount of available Soil.

| Parameter | Type      | Description                            |
| --------- | --------- | -------------------------------------- |
| `season`  | `uint32`  | The Season in which Soil was adjusted. |
| `soil`    | `uint256` | The new amount of Soil available.      |

### [Weather Change](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/Weather.sol#L51) <a href="#event-weather-change" id="event-weather-change"></a>

```solidity
event WeatherChange(uint256 indexed season, uint256 caseId, int8 change);
```

Emitted when the Weather (now [Temperature](/developers/misc/terminology-discrepancies)) changes.

| Parameter | Type      | Description                                                                                                                     |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `season`  | `uint256` | The current Season.                                                                                                             |
| `caseId`  | `uint256` | The "[Weather Case](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/farm/init/InitDiamond.sol#L41)". |
| `change`  | `int8`    | The change in Temperature from the previous value.                                                                              |

### [Season of Plenty](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/sun/SeasonFacet/Weather.sol#L63) <a href="#event-season-of-plenty" id="event-season-of-plenty"></a>

```solidity
event SeasonOfPlenty(
    uint256 indexed season,
    uint256 amount,
    uint256 toField
);
```

Emitted when Beans are minted during the Season of Plenty.

| Parameter | Type      | Description                                                                |
| --------- | --------- | -------------------------------------------------------------------------- |
| `season`  | `uint256` | The Season in which Beans were minted for distribution.                    |
| `amount`  | `uint256` | The amount of 3CRV which was received for swapping Beans.                  |
| `toField` | `uint256` | The amount of Beans which were distributed to remaining Pods in the Field. |


# Silo

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

Farmers can Deposit assets on the [Deposit Whitelist](https://docs.bean.money/farm/silo#deposit-whitelist) into the Silo in exchange for Stalk and Seeds. The number of Stalk and Seeds received is dependent on the BDV at the time of Deposit, the Stalk per BDV and the Seeds per BDV. Stalk entitles Farmers to a pro-rata portion of Bean seignorage distributed to the Silo and Seeds grown into 0.0001 Stalk each Season.

A Farmer can Withdraw at any time, but must forfeit all Stalk and Seeds associated with the Deposit. All Withdrawals are subject to an unlock period (currently set to the remainder of the current Season). Once a Withdraw is complete, it can be Claimed at any time.

Farmers can also convert a Deposited asset into a different one via the Convert function if the ability to convert between those two assets is on the [Convert Whitelist](https://docs.bean.money/peg-maintenance/convert#convert-whitelist). Each Convert type must be approved via governance and the Convert functionality must be added to `LibConvert`.

#### Adding and Removing Assets on the Deposit Whitelist

Assets can only be Deposited into the Silo if the assets are on the Deposit Whitelist. A token is considered on the Deposit Whitelist if it has a non-zero Silo Settings in Beanstalk’s storage. Silo Settings for each asset on the Deposit Whitelist are stored in the `s.ss` mapping in [`AppStorage`](/developers/overview/app-storage) defined as:

```solidity
struct SiloSettings {
    bytes4 selector;
    uint32 seeds;
    uint32 stalk;
}

mapping(address => Storage.SiloSettings) ss;
```

* The key used in the mapping is the ERC-20 token address.
* `selector` is a function selector that calculates the BDV of a given `amount` of the token. `selector` should be an encoded `external view` function added to the Beanstalk diamond. BDV is represented with 6 decimal places.
* `seeds` is the number of Seeds per BDV that a Farmer receives for Depositing this asset. For example, `seeds` is 2 for Bean and 4 for BEAN:3CRV LP tokens.
* `stalk` is the number of Stalk per BDV that a Farmer receives for Depositing this asset. Because Stalk has 10 decimals compared to the 6 that BDV has, 10,000 equals 1. `stalk` is 10,000 for both Bean and BEAN:3CRV LP tokens.

Tokens can be added to the Deposit Whitelist via BIP. In order to Whitelist a token, an address, BDV function selector, Stalk per BDV and Seeds per BDV must be included in the proposal. The BDV function selector must either already be added to Beanstalk or be added as a part of the BIP.

Similarly, tokens can be Dewhitelisted (removed from the Deposit Whitelist) via BIP.

#### Bean Denominated Value

All Deposited assets are valued based on the Bean Denominated Value (BDV) at the time Deposit. Each asset on the Deposit Whitelist has a unique BDV function in the [`BDVFacet`](/developers/protocol/silo/bdv-facet) to calculate the BDV of a given amount of the asset.

#### Stalk and Seeds

Stalk entitles the Farmer to a pro rata portion of at least 1/3 of Bean mints and 1 Stalk is 1 vote in Governance. Beans mints allocated to the Silo are called Earned Beans. Farmers also receive 1 Earned Stalk and 2 Earned Seeds for each Earned Bean.

Each Seed grows 0.0001 Stalk every Season. Stalk grown from Seeds is called Grown Stalk.

There are 3 types of Stalk:

* Stalk -> Stalk stored in a Farmer’s account storage. Stalk is acquired by Depositing, Converting, Updating or Planting.
* Earned Stalk -> A Farmer receives 1 Earned Stalk for each Earned Bean. Earned Stalk automatically compounds and receives a portion of Bean mints. Earned Stalk is claimed as part of the `plant` function, which turns it into Stalk. Because it is considered active, Earned Stalk has already been minted and it is included in the `totalStalk` and `balanceOfStalk` counts. To the Farmer, Earned Stalk is no different from Stalk and just serves as an indicator of how much Stalk has been earned through Bean seignorage since the last `plant` call.
* Grown Stalk -> 0.0001 Grown Stalk is grown from every Seed each Season. Grown Stalk is **not** considered active and thus does not receive a pro rata portion of Bean mints. It is claimed via the `update` function in Beanstalk, which turns it into Stalk. Because Grown Stalk is not active, Stalk isn’t minted until Grown Stalk is updated and thus Grown Stalk is **not** included in the `totalStalk` and `balanceOfStalk` counts.

{% hint style="warning" %}
In the Beanstalk ecosystem, **Update** (i.e., updating Grown Stalk) is referred to as **Mow** (i.e., Mowing Grown Stalk). See [Terminology Discrepancies](/developers/misc/terminology-discrepancies).
{% endhint %}

There are 2 types of Seeds:

* Seeds → Seeds stored in a Farmer’s account storage. Seeds are acquired by Depositing, Planting and in certain cases, Converting.&#x20;
* Earned Seeds → A Farmer receives 2 Earned Seeds for each Earned Bean. Earned Seeds are **not** active. Earned Seeds can be claimed via the `plant` function, which turns them into Seeds. Because Earned Seeds are **not** active, they are not included in the `totalSeeds` or `balanceOfSeeds` function.

{% hint style="warning" %}
In the Beanstalk ecosystem, **Earned Seeds** are referred to as **Plantable Seeds**. See [Terminology Discrepancies](/developers/misc/terminology-discrepancies).
{% endhint %}

#### Deposit

Farmers can deposit Whitelisted ERC-20 tokens in the Silo in exchange for Stalk and Seeds via the `deposit` function. `deposit` first calls the BDV function selector stored in Storage to calculate the BDV of the Deposit. It then distributes Stalk and Seeds to the Farmer based on the Stalk per BDV and Seeds per BDV.

A Deposit is stored in the current Season to record at what Season the Seeds associated with the Deposit started accruing Grown Stalk. The total Seeds and Stalk associated with a Deposit can be calculated as:

```solidity
seeds = depositBdv * s.ss[token].seeds;
stalk = depositBdv * s.ss[token].stalk + (currentSeason - depositSeason) * seeds
```

Deposits are stored in the Account storage as:

```solidity
mapping(address => mapping(uint32 => Deposit)) deposits;

struct Deposit {
    uint128 amount;
    uint128 bdv;
}
```

* The mapping is from token address to Season to Deposit.
* `amount` is the amount of tokens in the Deposit. A Farmer can Withdraw up to `amount`.
* `bdv` is the BDV of the amount of tokens at the time of Deposit.

#### Withdraw

Farmers can Withdraw any Deposit via the `withdrawDeposit` or `withdrawDeposits` functions. When a Farmer Withdraws, they specific the token, the Season(s) of the Deposit(s) and the corresponding amount(s) to Withdraw.

In order to Withdraw a Deposit, a Farmer must burn all of the Stalk and Seeds associated with the Deposit.

A Withdraw is locked for a certain number of Seasons. This number is stored in `s.season.withdrawSeasons`. This number is equal to the # of full Seasons required for Withdraw plus 1. The plus 1 accounts for the partial Season that Farmer Withdraws in.

The Season of a Withdrawal is equal to the Season at which the Withdrawal can be Claimed (Not the Season that the Withdrawal is initiated).

A Withdraw is in the following mapping:

```solidity
mapping(address => mapping(uint32 => uint256)) withdrawals;
```

* The mapping is from token address to Season to amount.

#### Claim Withdrawal

Farmers can Claim Withdrawals that have been unlocked via the `claimWithdrawal` and `claimWithdrawals` functions. A Withdrawal is Claimable if the current Season is greater than or equal to the Season of the Withdrawal. A Withdrawal is Claimed by specifying the token and Season(s) of the Withdrawals to Claim. When a Withdrawals is Claimed, the Withdrawal is deleted and the Farmer receives the corresponding amount of the underlying token.

#### Convert

Farmers can Convert one asset on the Deposit Whitelist (Token A) to another asset on the Deposit Whitelist (Token B) if Converting from Token A to Token B is on the Convert Whitelist. `convert` takes in a `convertData` payload that stores the encoded Convert data payload. Convert data is encoded so that different Convert types can have different parameters as necessary. However, each Convert type must specify at least the Convert type and the amount to Convert. Farmers must also specify the Season(s) of Deposits and corresponding amounts to Convert.

Convert does 3 main actions:

1. Converts some amount of Token A to Token B via `LibConvert`;
2. Removes Deposits of Token A equal to the amount of Token A that was Converted; and
3. Adds a Deposit of Token B equal to the amount received in Convert.

Convert uses the maximum of the BDV of Token A and Token B so that BDV is never lost. Thus, the Farmer won’t lose any Stalk during Convert, but may still gain Stalk depending the BDV of Token B. Seeds can be gained or lost depending on the Seeds per BDV of Token B versus Token A.

Grown Stalk is preserved during Convert and the Season that Converted assets are Deposited into is depending on the number of Grown Stalk:

```solidity
depositSeason = currentSeason - (grownStalk / depositSeeds)
```

Converts may have a maximize amount that can be converted from Token A to Token B. For instance, Deposited Beans can only be converted into Deposited BEAN:3CRV LP tokens if the price in the BEAN:3CRV pool is greater than $1 after the Convert. This can be retrieved via the `getMaxAmountIn` function.

The `getAmountOut` function returns the expected output amount of a given Convert.

New Converts can be approved via adding new Convert types to `LibConvertData` and adding the Convert case to `LibConvert`.


# Silo Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Silo Facet handles Depositing, Withdrawing, and transferring Deposits (whitelisted assets in the Silo).

Stems keep track of when the Deposit was created. When the Deposit was created determines how much Grown Stalk per BDV the Deposit has.

## Call Functions

### [Deposit](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloFacet.sol#L48)

```solidity
function deposit(
    address token,
    uint256 _amount,
    LibTransfer.From mode
) 
    external 
    payable 
    nonReentrant 
    mowSender(token)
    returns (uint256 amount, uint256 bdv, int96 stem);
```

Deposits ERC20 token into internal Farmer balances.

| Parameter | Type      | Description                                                                                               |
| --------- | --------- | --------------------------------------------------------------------------------------------------------- |
| `token`   | `address` | Address of the token to Deposit.                                                                          |
| `_amount` | `uint256` | Amount of the token to be Deposited.                                                                      |
| `mode`    | `From`    | The balance to transfer the token from; see [`LibTransfer.From`](/developers/overview/internal-balances). |

| Return value | Type      | Description                    |
| ------------ | --------- | ------------------------------ |
| `amount`     | `address` | Amount of the token Deposited. |
| `bdv`        | `uint256` | BDV of the Deposit.            |
| `stem`       | `int96`   | Stem of the Deposit.           |

### [Withdraw Deposit](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloFacet.sol#L90)

```solidity
function withdrawDeposit(
    address token,
    int96 stem,
    uint256 amount
    LibTransfer.To mode
) external payable mowSender(token) nonReentrant;
```

Withdraws a single Deposit.

| Parameter | Type      | Description                                                                                           |
| --------- | --------- | ----------------------------------------------------------------------------------------------------- |
| `token`   | `address` | Address of ERC20 being Withdrawn.                                                                     |
| `stem`    | `int96`   | Stem of the Deposit to Withdraw.                                                                      |
| `amount`  | `uint256` | Tokens to be Withdrawn.                                                                               |
| `mode`    | `To`      | The balance to transfer the token to; see [`LibTransfer.To`](/developers/overview/internal-balances). |

### [Withdraw Deposits](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloFacet.sol#L114)

```solidity
function withdrawDeposits(
    address token,
    int96[] calldata stems,
    uint256[] calldata amounts,
    LibTransfer.To mode
) external payable mowSender(token) nonReentrant;
```

Withdraws multiple Deposits.

| Parameter | Type        | Description                                                                                           |
| --------- | ----------- | ----------------------------------------------------------------------------------------------------- |
| `token`   | `address`   | Address of ERC20 being Withdrawn.                                                                     |
| `stems`   | `int96[]`   | Stems of the Deposits to Withdraw.                                                                    |
| `amounts` | `uint256[]` | Array of token amounts to Withdraw from corresponding `stems`.                                        |
| `mode`    | `To`        | The balance to transfer the token to; see [`LibTransfer.To`](/developers/overview/internal-balances). |

### [Transfer Deposit](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloFacet.sol#L142)

```solidity
function transferDeposit(
    address sender,
    address recipient,
    address token,
    int96 stem,
    uint256 amount
) public payable nonReentrant returns (uint256 bdv);
```

Transfers single Farmer's Deposit.

| Parameter   | Type      | Description                                   |
| ----------- | --------- | --------------------------------------------- |
| `sender`    | `address` | Source of Deposit.                            |
| `recipient` | `address` | Destination of Deposit.                       |
| `token`     | `address` | Address of Deposited ERC20 being transferred. |
| `stem`      | `int96`   | Stem of Deposit to Transfer.                  |
| `amount`    | `uint256` | Amount of tokens to transfer.                 |

| Return Value | Type      | Description                   |
| ------------ | --------- | ----------------------------- |
| `bdv`        | `uint256` | BDV now owned by `recipient`. |

### [Transfer Deposits](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloFacet.sol#L174)

```solidity
function transferDeposits(
    address sender,
    address recipient,
    address token,
    int96[] calldata stem,
    uint256[] calldata amounts
) public payable nonReentrant returns (uint256[] memory bdvs);
```

Transfers multiple Farmer Deposits.

| Parameter   | Type        | Description                                                        |
| ----------- | ----------- | ------------------------------------------------------------------ |
| `sender`    | `address`   | Source of Deposit.                                                 |
| `recipient` | `address`   | Destination of Deposit.                                            |
| `token`     | `address`   | Address of ERC20 being transferred.                                |
| `stem`      | `int96[]`   | Stems of Deposits to transfer.                                     |
| `amounts`   | `uint256[]` | Array of token amounts to transfer based on corresponding `stems`. |

| Return Value | Type        | Description                                |
| ------------ | ----------- | ------------------------------------------ |
| `bdvs`       | `uint256[]` | Array of BDVs of each Deposit transferred. |

### [Safe Transfer From](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloFacet.sol#L208)

```solidity
function safeTransferFrom(
    address sender, 
    address recipient, 
    uint256 depositId, 
    uint256 amount,
    bytes calldata
) external;
```

Transfer a single Deposit, conforming to the ERC1155 standard.

| Parameter   | Type      | Description                    |
| ----------- | --------- | ------------------------------ |
| `sender`    | `address` | Source of Deposit.             |
| `recipient` | `address` | Destination of Deposit.        |
| `depositId` | `uint256` | ID of Deposit to transfer.     |
| `amount`    | `uint256` | Amount of ERC1155 to transfer. |

### [Safe Batch Transfer From](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloFacet.sol#L239)

```solidity
function safeBatchTransferFrom(
    address sender, 
    address recipient, 
    uint256[] calldata depositIds, 
    uint256[] calldata amounts, 
    bytes calldata
) external;
```

Transfer a single Deposit, conforming to the ERC1155 standard.

| Parameter    | Type        | Description                                                             |
| ------------ | ----------- | ----------------------------------------------------------------------- |
| `sender`     | `address`   | Source of Deposit.                                                      |
| `recipient`  | `address`   | Destination of Deposit.                                                 |
| `depositIds` | `uint256[]` | Array of IDs of Deposits to transfer.                                   |
| `amounts`    | `uint256[]` | Array of amounts of ERC1155 to transfer, corresponding to `depositIds`. |

### Yield Distribution

### [Mow](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloFacet.sol#L270)

```solidity
function mow(address account, address token) external payable;
```

Claim Grown Stalk for an account for a particular whitelisted asset.

| Parameter | Type      | Description                          |
| --------- | --------- | ------------------------------------ |
| `account` | `address` | Address to Mow for.                  |
| `token`   | `address` | Address of ERC20 Deposit to Mow for. |

### [Mow Multiple](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloFacet.sol#L275)

```solidity
function mowMultiple(address account, address[] calldata tokens) external payable;
```

Mow for multiple whitelisted assets for an account.

| Parameter | Type        | Description                                      |
| --------- | ----------- | ------------------------------------------------ |
| `account` | `address`   | Address to Mow for.                              |
| `tokens`  | `address[]` | Array of addresses of ERC20 Deposits to Mow for. |

### [Plant](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloFacet.sol#L297)

```solidity
function plant() 
    external payable returns (uint256 beans, int96 stem);
```

Claim Earned Beans and their associated Stalk and Plantable Seeds for `msg.sender`.

| Return Value | Type      | Description                   |
| ------------ | --------- | ----------------------------- |
| `beans`      | `uint256` | Amount of Earned Beans given. |
| `stem`       | `int96`   | Stem of the new Deposit.      |

### [Claim Plenty](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloFacet.sol#L304)

```solidity
function claimPlenty() external payable;
```

Claims rewards from a Flood (Season of Plenty) for `msg.sender`.

## View Functions

### Utilities

### [Last Update](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L58)

```solidity
function lastUpdate(address account) public view returns (uint32);
```

Get the last Season in which `account` updated their Silo.

| Return Type | Description                               |
| ----------- | ----------------------------------------- |
| `uint32`    | Last Season `account` updated their Silo. |

### Silo Totals

### [Total Stalk](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L67)

```solidity
function totalStalk() public view returns (uint256);
```

Returns the total supply of Stalk. Does NOT include Grown Stalk.

| Return Type | Description            |
| ----------- | ---------------------- |
| `uint256`   | Total supply of Stalk. |

### [Total Roots](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L74)

```solidity
function totalRoots() public view returns (uint256);
```

Returns the total supply of Roots.

| Return Type | Description                |
| ----------- | -------------------------- |
| `uint256`   | The total supply of Roots. |

### [Total Earned Beans](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L84)

```solidity
function totalEarnedBeans() public view returns (uint256);
```

Returns the total supply of Earned Beans.

| Return Type | Description                   |
| ----------- | ----------------------------- |
| `uint256`   | Total supply of Earned Beans. |

### Silo Account Balances

### [Balance Of Stalk](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L97)

```solidity
function balanceOfStalk(address account) public view returns (uint256);
```

Returns the balance of Stalk for a particular Farmer. Does NOT include Grown Stalk; does include Earned Stalk.

| Parameter | Type      | Description                          |
| --------- | --------- | ------------------------------------ |
| `account` | `address` | Farmer to get the Stalk balance for. |

| Return Type | Description                 |
| ----------- | --------------------------- |
| `uint256`   | Stalk balance of `account`. |

### [Balance Of Roots](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L115)

```solidity
function balanceOfRoots(address account) public view returns (uint256);
```

Returns the balance of Roots for a particular Farmer.

| Parameter | Type      | Description                          |
| --------- | --------- | ------------------------------------ |
| `account` | `address` | Farmer to get the Roots balance for. |

| Return Type | Description                 |
| ----------- | --------------------------- |
| `uint256`   | Roots balance of `account`. |

### [Balance Of Grown Stalk](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L126)

```solidity
function balanceOfGrownStalk(address account, address token)
    public
    view
    returns (uint256);
```

Returns the balance of Grown Stalk for `account`. Grown Stalk is earned each Season from BDV and must be Mown to add it to a user's Stalk balance.

| Parameter | Type      | Description                                |
| --------- | --------- | ------------------------------------------ |
| `account` | `address` | Farmer to get the Grown Stalk balance for. |

| Return Type | Description                       |
| ----------- | --------------------------------- |
| `uint256`   | Grown Stalk balance of `account`. |

### [Grown Stalk for Deposit](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L146)

```solidity
function grownStalkForDeposit(
    address account,
    address token,
    int96 stem
)
    public
    view
    returns (uint grownStalk);
```

Returns the balance of Grown Stalk for a single deposit of `token` in `stem` for `account`.

| Parameter | Type      | Description                                                      |
| --------- | --------- | ---------------------------------------------------------------- |
| `account` | `address` | Farmer that owns the Deposit to get the Grown Stalk balance for. |
| `token`   | `address` | ERC20 token address of the Deposit.                              |
| `stem`    | `int96`   | Stem of the Deposit.                                             |

| Return Value | Type   | Description              |
| ------------ | ------ | ------------------------ |
| `grownStalk` | `uint` | Grown Stalk for Deposit. |

### [Balance Of Earned Beans](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L162)

```solidity
function balanceOfEarnedBeans(address account)
    public
    view
    returns (uint256 beans);
```

Returns the balance of Earned Beans for a Farmer.

| Parameter | Type      | Description                                |
| --------- | --------- | ------------------------------------------ |
| `account` | `address` | Farmer to get the Earned Bean balance for. |

| Return Value | Type      | Description                       |
| ------------ | --------- | --------------------------------- |
| `beans`      | `uint256` | Earned Bean balance of `account`. |

### [Balance Of Earned Stalk](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L217)

```solidity
function balanceOfEarnedStalk(address account)
    public
    view
    returns (uint256)
```

Return the `account` balance of Earned Stalk, the Stalk associated with Earned Beans.

| Parameter | Type      | Description                                 |
| --------- | --------- | ------------------------------------------- |
| `account` | `address` | Farmer to get the Earned Stalk balance for. |

| Return Type | Description                        |
| ----------- | ---------------------------------- |
| `uint256`   | Earned Stalk balance of `account`. |

### [Balance Of Deposited BDV](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L228)

```solidity
function balanceOfDepositedBdv(address account, address token)
    external
    view
    returns (uint256 depositedBdv);
```

Return the balance of Deposited BDV of a whitelisted asset for a given Farmer.

| Parameter | Type      | Description                                                |
| --------- | --------- | ---------------------------------------------------------- |
| `account` | `address` | Farmer to get the Deposited BDV balance for.               |
| `token`   | `address` | Whitelisted asset to get the balance of Deposited BDV for. |

<table><thead><tr><th>Return Value</th><th>Type</th><th>Description</th><th data-hidden>Description</th><th data-hidden>Return Value</th></tr></thead><tbody><tr><td><code>depositedBdv</code></td><td><code>uint256</code></td><td>Balance of Deposited BDV given <code>account</code> and <code>token</code>.</td><td>Earned Stalk balance of <code>account</code>.</td><td><code>depositedBdv</code></td></tr></tbody></table>

### [Get Last Mowed Stem](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L239)

```solidity
function getLastMowedStem(address account, address token)
    external
    view
    returns (int96 lastStem);
```

Return the Stem at the time that a Farmer last Mowed a particular whitelisted asset.

| Parameter | Type      | Description                                       |
| --------- | --------- | ------------------------------------------------- |
| `account` | `address` | Farmer to get the last Mowed Stem for.            |
| `token`   | `address` | Whitelisted asset to get the last Mowed Stem for. |

| Return Value |         | Description                                  |
| ------------ | ------- | -------------------------------------------- |
| `lastStem`   | `int96` | Last Mowed Stem for `token` given `account`. |

### [Get Mow Status](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L252)

```solidity
function getMowStatus(address account, address token)
    external
    view
    returns (Account.MowStatus memory mowStatus);
```

Return the Mow Status struct of `token` for a given `account`.

| Parameter | Type      | Description                                   |
| --------- | --------- | --------------------------------------------- |
| `account` | `address` | Farmer to get the Mow Status of.              |
| `token`   | `address` | Token to get the Mow Status of `account` for. |

<table><thead><tr><th width="214">Type</th><th data-hidden>Description</th><th data-hidden>Return Value</th></tr></thead><tbody><tr><td><code>Account.MowStatus</code></td><td>Mow Status struct of <code>token</code> for <code>account</code>.</td><td><code>mowStatus</code></td></tr></tbody></table>

### Season of Plenty (Flood)

### [Last Season Of Plenty](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L266)

```solidity
function lastSeasonOfPlenty() public view returns (uint32);
```

Returns the last Season that a Season of Plenty started.

| Return Value | Description                          |
| ------------ | ------------------------------------ |
| `uint32`     | The last Season it started Flooding. |

### [Balance Of Plenty](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L274)

```solidity
function balanceOfPlenty(address account)
    public
    view
    returns (uint256 plenty);
```

Returns the Farmer's balance of unclaimed 3CRV earned from the Season of Plenty.

| Parameter | Type      | Description                                   |
| --------- | --------- | --------------------------------------------- |
| `account` | `address` | Farmer to get the unclaimed 3CRV balance for. |

| Return Value | Type      | Description                          |
| ------------ | --------- | ------------------------------------ |
| `plenty`     | `uint256` | Unclaimed 3CRV balance of `account`. |

### [Balance Of Rain Roots](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L286)

```solidity
function balanceOfRainRoots(address account) public view returns (uint256);
```

Returns the `account` balance of Roots the last time it was Raining during a Silo update.

| Parameter | Type      | Description                             |
| --------- | --------- | --------------------------------------- |
| `account` | `address` | Farmer to get "Rain Roots" balance for. |

| Return Value | Description                                          |
| ------------ | ---------------------------------------------------- |
| `uint256`    | Root balance last time it was Raining for `account`. |

### [Balance of SOP](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L294)

```solidity
function balanceOfSop(address account)
    external
    view
    returns (AccountSeasonOfPlenty memory sop);
```

Returns the `account` Season of Plenty related state variables.

| Parameter | Type      | Description                                    |
| --------- | --------- | ---------------------------------------------- |
| `account` | `address` | Farmer to get SOP related state variables for. |

| Return Value | Type                    | Description                                    |
| ------------ | ----------------------- | ---------------------------------------------- |
| `sop`        | `AccountSeasonOfPlenty` | Struct containing SOP related state variables. |

### Stems

### [Stem Tip for Token](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L320)

```solidity
function stemTipForToken(address token)
    public
    view
    returns (int96 _stemTip);
```

Returns the "stemTip", or cumulative Grown Stalk Per BDV of a given Deposited asset since whitelist, for a given whitelisted token.

| Parameter | Type      | Description                          |
| --------- | --------- | ------------------------------------ |
| `token`   | `address` | ERC20 token to get the Stem tip for. |

| Return Value | Type    | Description                       |
| ------------ | ------- | --------------------------------- |
| `_stemTip`   | `int96` | Returns the Stem tip for `token`. |

### [Season to Stem](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L334)

```solidity
function seasonToStem(address token, uint32 season)
    public
    view
    returns (int96 stem);
```

Get the Stem associated with a particular Deposit (via its token and Season). Kept for legacy reasons.

| Parameter | Type      | Description                 |
| --------- | --------- | --------------------------- |
| `token`   | `address` | ERC20 token of the Deposit. |
| `season`  | `uint32`  | Season of the Deposit.      |

| Return Value | Type    | Description          |
| ------------ | ------- | -------------------- |
| `stem`       | `int96` | Stem of the Deposit. |

### [Get Seeds per Token](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L349)

```solidity
function getSeedsPerToken(address token) public view virtual returns (uint256);
```

Gets the Seeds per token for legacy whitelisted assets. Calling with an non-legacy token will return 0, even after the token is whitelisted. Kept for legacy reasons.

| Parameter | Type      | Description                        |
| --------- | --------- | ---------------------------------- |
| `token`   | `address` | Legacy token to get the Seeds for. |

| Return Type | Description                 |
| ----------- | --------------------------- |
| `uint256`   | Seeds for the legacy token. |

### [Stem Start Season](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L356)

```solidity
function stemStartSeason() public view virtual returns (uint16);
```

Returns the Season in which Beanstalk initialized [Silo V3](https://bean.money/bip-36), i.e., the Season in which Stems were initialized.

| Return Type | Description                             |
| ----------- | --------------------------------------- |
| `uint16`    | Season in which Stems were initialized. |

### [Migration Needed](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L363)

```solidity
function migrationNeeded(address account) public view returns (bool);
```

Returns whether or not a Farmer needs to migrate to [Silo V3](https://bean.money/bip-36).

| Parameter | Type      | Description                                 |
| --------- | --------- | ------------------------------------------- |
| `account` | `address` | Farmer to check if migration is needed for. |

| Return Type | Description                                           |
| ----------- | ----------------------------------------------------- |
| `bool`      | Whether or not `account` needs to migrate to Silo V3. |

### [In Vesting Period](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloExit.sol#L375)

```solidity
function inVestingPeriod() public view returns (bool);
```

Returns if Earned Beans from the previous `gm` call are still vesting. Vesting Earned Beans cannot be received via `plant` until the Vesting Period is over, and will be forfeited if a Farmer Withdraws during the Vesting Period.

| Return Type | Description                                                                         |
| ----------- | ----------------------------------------------------------------------------------- |
| `bool`      | Whether or not Earned Beans from the previous `gm` function call are still vesting. |

### Getters

### [Get Deposit](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L408)

```solidity
function getDeposit(
    address account,
    address token,
    int96 stem
) external view returns (uint256, uint256)
```

Find the amount and BDV of `token` that a Farmer has Deposited in a given Stem.

| Parameter | Type      | Description                     |
| --------- | --------- | ------------------------------- |
| `account` | `address` | Farmer to get Deposit data for. |
| `token`   | `address` | ERC20 token of the Deposit.     |
| `stem`    | `int96`   | Stem of the Deposit.            |

| Return Value | Description                      |
| ------------ | -------------------------------- |
| `uint256`    | Number of tokens in the Deposit. |
| `uint256`    | BDV of the Deposit.              |

### [Get Total Deposited](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L419)

```solidity
function getTotalDeposited(address token) external view returns (uint256);
```

Get the total amount of `token` currently Deposited in the Silo across all Farmers.

| Parameter | Type      | Description                |
| --------- | --------- | -------------------------- |
| `token`   | `address` | Whitelisted token address. |

| Return Type | Description                                    |
| ----------- | ---------------------------------------------- |
| `uint256`   | Total number of `token` Deposited in the Silo. |

### [Get Total Deposited BDV](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L426)

```solidity
function getTotalDepositedBdv(address token) external view returns (uint256);
```

Get the total BDV of `token` currently Deposited in the Silo across all Farmers.

| Parameter | Type      | Description                |
| --------- | --------- | -------------------------- |
| `token`   | `address` | Whitelisted token address. |

| Return Type | Description                                 |
| ----------- | ------------------------------------------- |
| `uint256`   | Total BDV of `token` Deposited in the Silo. |

### [Token Settings](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L440)

```solidity
function tokenSettings(address token)
    external
    view
    returns (Storage.SiloSettings memory);
```

Get the `Storage.SiloSettings` for a whitelisted token.

| Parameter | Type      | Description                |
| --------- | --------- | -------------------------- |
| `token`   | `address` | Whitelisted token address. |

| Return Type            | Description                             |
| ---------------------- | --------------------------------------- |
| `Storage.SiloSettings` | Struct with Silo variables for `token`. |

### [BDV](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/SiloFacet.sol#L308)

```solidity
function bdv(address token, uint256 amount)
    external
    view
    returns (uint256 _bdv);
```

Returns the total BDV of a number of tokens on the Deposit Whitelist.

| Parameter | Type      | Description                    |
| --------- | --------- | ------------------------------ |
| `token`   | `address` | The whitelisted token address. |
| `amount`  | `uint256` | The number of tokens.          |

<table><thead><tr><th>Type</th><th data-hidden>Description</th><th data-hidden>Return Value</th></tr></thead><tbody><tr><td><code>uint256</code></td><td>The total BDV of <code>amount</code> number of <code>token</code>.</td><td><code>_bdv</code></td></tr></tbody></table>

### ERC-1155

### [Balance Of](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L455)

```solidity
function balanceOf(
    address account, 
    uint256 depositId
) external view returns (uint256 amount);
```

Gets the amount of tokens in a Deposit type for a given Farmer.

| Parameter   | Type      | Description                            |
| ----------- | --------- | -------------------------------------- |
| `account`   | `address` | Farmer to get Deposit amount for.      |
| `depositId` | `uint256` | Deposit ID corresponding to `account`. |

| Return Type | Description                                       |
| ----------- | ------------------------------------------------- |
| `amount`    | Amount of tokens in a Deposit type for `account`. |

### [Balance Of Batch](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L465)

```solidity
function balanceOfBatch(
    address[] calldata accounts, 
    uint256[] calldata depositIds
) external view returns (uint256[] memory);
```

Gets an array of amounts corresponding to Deposits.

| Parameter    | Type        | Description                                      |
| ------------ | ----------- | ------------------------------------------------ |
| `accounts`   | `address[]` | List of Farmers.                                 |
| `depositIds` | `uint256[]` | List of Deposit IDs corresponding to `accounts`. |

| Return Type | Description                                             |
| ----------- | ------------------------------------------------------- |
| `uint256[]` | Array of amounts corresponding to the list of Deposits. |

### [Get Deposit ID](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L483)

```solidity
function getDepositId(
    address token, 
    int96 stem
) external pure returns (uint256);
```

Gets the Deposit ID given an whitelisted token address and Stem.

| Parameter | Type      | Description                |
| --------- | --------- | -------------------------- |
| `token`   | `address` | Whitelisted token address. |
| `stem`    | `int96`   | Stem of the Deposit.       |

| Return Type | Description                        |
| ----------- | ---------------------------------- |
| `uint256`   | Deposit ID of `token` with `stem`. |

## Events

### [Plant](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/Silo.sol#L37) <a href="#event-plant" id="event-plant"></a>

```solidity
event Plant(
    address indexed account,
    uint256 beans
);
```

Emitted when the deposit associated with the Earned Beans of `account` are Planted.

| Parameter | Type      | Description                             |
| --------- | --------- | --------------------------------------- |
| `account` | `address` | Farmer that Planted their Earned Beans. |
| `beans`   | `uint256` | The amount of Earned Beans claimed.     |

### [Claim Plenty](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/Silo.sol#L52) <a href="#event-claim-plenty" id="event-claim-plenty"></a>

```solidity
event ClaimPlenty(
    address indexed account,
    uint256 plenty
);
```

Emitted when 3CRV paid to `account` during a Flood is claimed.

| Parameter | Type      | Description                              |
| --------- | --------- | ---------------------------------------- |
| `account` | `address` | Farmer that claimed the assets.          |
| `plenty`  | `uint256` | The amount of 3CRV claimed by `account`. |

### [Stalk Balance Changed](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/Silo.sol#L71) <a href="#event-stalk-balance-changed" id="event-stalk-balance-changed"></a>

```solidity
event StalkBalanceChanged(
    address indexed account,
    int256 delta,
    int256 deltaRoots
);
```

Emitted when `account` gains or loses Stalk.

| Parameter    | Type      | Description                             |
| ------------ | --------- | --------------------------------------- |
| `account`    | `address` | The Farmer whose Stalk balance changed. |
| `delta`      | `int256`  | The change in Stalk.                    |
| `deltaRoots` | `int256`  | The change in Roots.                    |

### [Add Deposit](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L44) <a href="#event-add-deposit" id="event-add-deposit"></a>

```solidity
event AddDeposit(
    address indexed account,
    address indexed token,
    int96 stem,
    uint256 amount,
    uint256 bdv
);
```

Emitted when `account` adds a single Deposit to the Silo. There is no `AddDeposits` event because there is currently no operation in which Beanstalk creates multiple Deposits in different Stems.

| Parameter | Type      | Description                                                         |
| --------- | --------- | ------------------------------------------------------------------- |
| `account` | `address` | The Farmer that added a Deposit to Beanstalk.                       |
| `token`   | `address` | Whitelisted token address.                                          |
| `stem`    | `int96`   | The Stem of the Deposit.                                            |
| `amount`  | `uint256` | Token amount of the Deposit.                                        |
| `bdv`     | `uint256` | The BDV associated with `amount` of `token` at the time of Deposit. |

### [Remove Deposit](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L62) <a href="#event-remove-deposit" id="event-remove-deposit"></a>

```solidity
event RemoveDeposit(
    address indexed account,
    address indexed token,
    int96 stem,
    uint256 amount,
    uint256 bdv
);
```

Emitted when `account` removes a single Deposit from the Silo. Occurs during Withdraw and Convert.

| Parameter | Type      | Description                           |
| --------- | --------- | ------------------------------------- |
| `account` | `address` | The Farmer whose Deposit was removed. |
| `token`   | `address` | Whitelisted token address.            |
| `stem`    | `int96`   | The Stem of the Deposit.              |
| `amount`  | `uint256` | The token amount of the Deposit.      |
| `bdv`     | `uint256` | The BDV associated with the Deposit.  |

### [Remove Deposits](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L81) <a href="#event-remove-deposits" id="event-remove-deposits"></a>

```solidity
event RemoveDeposits(
    address indexed account,
    address indexed token,
    int96[] stems,
    uint256[] amounts,
    uint256 amount,
    uint256[] bdvs
);
```

Emitted when `account` removes multiple Deposits from the Silo. Occurs during Withdraw and Convert.

| Parameter | Type        | Description                                                                    |
| --------- | ----------- | ------------------------------------------------------------------------------ |
| `account` | `address`   | The Farmer whose Deposit was removed.                                          |
| `token`   | `address`   | Whitelisted token address.                                                     |
| `stems`   | `uint32[]`  | Stems of the Deposits.                                                         |
| `amounts` | `uint256[]` | The token amounts of the Deposits, corresponding to `stems`.                   |
| `amount`  | `uint256`   | Sum of `amounts`.                                                              |
| `bdvs`    | `uint256[]` | The BDVs associated with the Deposits, corresponding to `stems` and `amounts`. |

### [Transfer Single](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L101) <a href="#event-remove-deposits" id="event-remove-deposits"></a>

```solidity
event TransferSingle(
    address indexed operator,
    address indexed from,
    address indexed to,
    uint256 id,
    uint256 value
);
```

ERC-1155 event. Emitted when a Deposit is created, removed, or transferred.

| Parameter  | Type      | Description                                        |
| ---------- | --------- | -------------------------------------------------- |
| `operator` | `address` | The address that performed the operation.          |
| `from`     | `address` | The address the Deposit is being transferred from. |
| `to`       | `address` | The address the Deposit is being transferred to.   |
| `id`       | `uint256` | The Deposit ID of the Deposit.                     |
| `value`    | `uint256` | The amount of the Deposit.                         |

### [Transfer Batch](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L120) <a href="#event-remove-deposits" id="event-remove-deposits"></a>

```solidity
event TransferBatch(
    address indexed operator,
    address indexed from,
    address indexed to,
    uint256[] ids,
    uint256[] values
);
```

ERC-1155 event. Emitted when multiple deposits are withdrawn or transferred.

| Parameter  | Type        | Description                                        |
| ---------- | ----------- | -------------------------------------------------- |
| `operator` | `address`   | The address that performed the operation.          |
| `from`     | `address`   | The address the Deposit is being transferred from. |
| `to`       | `address`   | The address the Deposit is being transferred to.   |
| `ids`      | `uint256[]` | The Deposit IDs of the Deposits.                   |
| `values`   | `uint256[]` | The amounts of the Deposits.                       |

### [Remove Withdrawals](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L47) <a href="#event-remove-withdrawals" id="event-remove-withdrawals"></a>

```solidity
event RemoveWithdrawals(
    address indexed account,
    address indexed token,
    uint32[] seasons,
    uint256 amount
);
```

Legacy event. This event is kept for backwards compatibility in order for the ABI to generate properly.

| Parameter | Type       | Description                          |
| --------- | ---------- | ------------------------------------ |
| `account` | `address`  | Farmer that claimed the Withdrawals. |
| `token`   | `address`  | Whitelisted token address.           |
| `seasons` | `uint32[]` | Seasons of claimed Withdrawn assets. |
| `amount`  | `uint256`  | Amount of claimed asset.             |

### [Remove Withdrawal](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol#L53) <a href="#event-remove-withdrawal" id="event-remove-withdrawal"></a>

```solidity
event RemoveWithdrawal(
    address indexed account,
    address indexed token,
    uint32 season,
    uint256 amount
);
```

Legacy event. This event is kept for backwards compatibility in order for the ABI to generate properly.

| Parameter | Type      | Description                         |
| --------- | --------- | ----------------------------------- |
| `account` | `address` | Farmer that claimed the Withdrawal. |
| `token`   | `address` | Whitelisted token address.          |
| `season`  | `uint32`  | Seasons of claimed Withdrawn asset. |
| `amount`  | `uint256` | Amount of claimed asset.            |


# BDV Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The BDV Facet holds functions to get the BDV for each whitelisted Silo asset.

## Call Functions

None.

## View Functions

### [Curve to BDV](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/BDVFacet.sol#L24)

```solidity
function curveToBDV(uint256 amount) public view returns (uint256);
```

Returns the BDV of a number of BEAN:3CRV LP tokens.

| Parameter | Type      | Description                          |
| --------- | --------- | ------------------------------------ |
| `amount`  | `uint256` | Number of tokens to get the BDV for. |

| Return Value | Description                                              |
| ------------ | -------------------------------------------------------- |
| `uint256`    | The total BDV of `amount` number of BEAN:3CRV LP tokens. |

### [Bean to BDV](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/BDVFacet.sol#L31)

```solidity
function beanToBDV(uint256 amount) public pure returns (uint256);
```

Returns the BDV of a number of Beans (1 Bean = 1 BDV).

| Parameter | Type      | Description                          |
| --------- | --------- | ------------------------------------ |
| `amount`  | `uint256` | Number of tokens to get the BDV for. |

| Return Value | Description                                |
| ------------ | ------------------------------------------ |
| `uint256`    | The total BDV of `amount` number of Beans. |

### [Unripe LP to BDV](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/BDVFacet.sol#L38)

```solidity
function unripeLPToBDV(uint256 amount) public view returns (uint256);
```

Returns the total BDV of a number of Unripe BEAN:3CRV LP tokens.

| Parameter | Type      | Description                          |
| --------- | --------- | ------------------------------------ |
| `amount`  | `uint256` | Number of tokens to get the BDV for. |

| Return Value | Description                                                     |
| ------------ | --------------------------------------------------------------- |
| `uint256`    | The total BDV of `amount` number of Unripe BEAN:3CRV LP tokens. |

### [Unripe Bean to BDV](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/BDVFacet.sol#L47)

```solidity
function unripeBeanToBDV(uint256 amount) public view returns (uint256);
```

Returns the total BDV of a number of Unripe Beans.

| Parameter | Type      | Description                          |
| --------- | --------- | ------------------------------------ |
| `amount`  | `uint256` | Number of tokens to get the BDV for. |

| Return Value | Description                                       |
| ------------ | ------------------------------------------------- |
| `uint256`    | The total BDV of `amount` number of Unripe Beans. |

### [Well BDV](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/BDVFacet.sol#L57)

```solidity
function wellBdv(address token, uint256 amount)
    external
    view
    returns (uint256);
```

Returns the total BDV of a number of Well LP tokens given a Well LP token.

| Parameter | Type      | Description                    |
| --------- | --------- | ------------------------------ |
| `token`   | `address` | The whitelisted token address. |
| `amount`  | `uint256` | The number of tokens.          |

| Return Value | Description                                  |
| ------------ | -------------------------------------------- |
| `uint256`    | The total BDV of `amount` number of `token`. |

## Events

None.


# Whitelist Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

Whitelist Facet handles the whitelisting/dewhitelisting of assets on the [Deposit Whitelist](https://docs.bean.money/almanac/farm/silo#deposit-whitelist).

## Call Functions

### [Dewhitelist Token](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/WhitelistFacet.sol#L56)

```solidity
function dewhitelistToken(address token) external payable;
```

Dewhitelists tokens on the Deposit Whitelist. A token can no longer be Deposited in the Silo after dewhitelisting. Can only be called by the owner of Beanstalk.

| Parameter | Type      | Description                       |
| --------- | --------- | --------------------------------- |
| `token`   | `address` | The token address to dewhitelist. |

### [Whitelist Token](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/WhitelistFacet.sol#L71)

```solidity
function whitelistToken(
    address token,
    bytes4 selector,
    uint32 stalkIssuedPerBdv,
    uint32 stalkEarnedPerSeason
) external payable;
```

Adds a token to the Deposit Whitelist. Can only be called by the owner of Beanstalk.

| Parameter              | Type      | Description                                    |
| ---------------------- | --------- | ---------------------------------------------- |
| `token`                | `address` | The token address to whitelist.                |
| `selector`             | `bytes4`  | The selector for the BDV function of `token`.  |
| `stalkIssuedPerBdv`    | `uint32`  | Stalk per BDV for `token` issued upon Deposit. |
| `stalkEarnedPerSeason` | `uint32`  | Grown Stalk per BDV per Season for `token`.    |

### [Whitelist Token with Encode Type](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/WhitelistFacet.sol#L96)

```solidity
function whitelistTokenWithEncodeType(
    address token,
    bytes4 selector,
    uint32 stalkIssuedPerBdv,
    uint32 stalkEarnedPerSeason,
    bytes1 encodeType
) external payable;
```

Adds a token to the Deposit Whitelist with an `encodeType`. Can only be called by the owner of Beanstalk.

| Parameter              | Type      | Description                                                          |
| ---------------------- | --------- | -------------------------------------------------------------------- |
| `token`                | `address` | The token address to whitelist.                                      |
| `selector`             | `bytes4`  | The selector for the BDV function of `token`.                        |
| `stalkIssuedPerBdv`    | `uint32`  | Stalk per BDV for `token` issued upon Deposit.                       |
| `stalkEarnedPerSeason` | `uint32`  | Grown Stalk per BDV per Season for `token`.                          |
| `encodeType`           | `bytes1`  | The encode type that should be used to encode the BDV function call. |

### [Update Stalk per BDV per Season for Token](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/WhitelistFacet.sol#L119C8-L119C8)

```solidity
function updateStalkPerBdvPerSeasonForToken(
    address token,
    uint32 stalkEarnedPerSeason
) external payable;
```

Changes the Grown Stalk per BDV per Season for a token on the Deposit Whitelist. Can only be called by the owner of Beanstalk.

| Parameter              | Type      | Description                                 |
| ---------------------- | --------- | ------------------------------------------- |
| `token`                | `address` | The token address on the Deposit Whitelist. |
| `stalkEarnedPerSeason` | `uint32`  | The new Grown Stalk per BDV per Season.     |

## View Functions

None.

## Events

### [Whitelist Token](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/WhitelistFacet.sol#L27) <a href="#event-whitelist-token" id="event-whitelist-token"></a>

```solidity
event WhitelistToken(
    address indexed token,
    bytes4 selector,
    uint32 stalkEarnedPerSeason,
    uint256 stalkIssuedPerBdv
);
```

Emitted when a token is added to the Deposit Whitelist.

| Parameter              | Type      | Description                                    |
| ---------------------- | --------- | ---------------------------------------------- |
| `token`                | `address` | The whitelisted token address.                 |
| `selector`             | `bytes4`  | The selector for the BDV function of `token`.  |
| `stalkEarnedPerSeason` | `uint32`  | Grown Stalk per BDV per Season for `token`.    |
| `stalkIssuedPerBdv`    | `uint256` | Stalk per BDV for `token` issued upon Deposit. |

### [Update Stalk per BDV per Season](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/WhitelistFacet.sol#L40) <a href="#event-dewhitelist-token" id="event-dewhitelist-token"></a>

```solidity
event UpdatedStalkPerBdvPerSeason(
    address indexed token,
    uint32 stalkEarnedPerSeason,
    uint32 season
);
```

Emitted when the Grown Stalk per BDV per Season for a token on the Deposit Whitelist is changed.&#x20;

| Parameter              | Type      | Description                                   |
| ---------------------- | --------- | --------------------------------------------- |
| `token`                | `address` | The token address on the Deposit Whitelist.   |
| `stalkEarnedPerSeason` | `uint32`  | The new Grown Stalk per BDV per Season.       |
| `season`               | `uint32`  | The current Season at the time of the change. |

### [Dewhitelist Token](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/WhitelistFacet.sol#L50) <a href="#event-dewhitelist-token" id="event-dewhitelist-token"></a>

```solidity
event DewhitelistToken(address indexed token);
```

Emitted when a token is removed from the Deposit Whitelist.

| Parameter | Type      | Description                      |
| --------- | --------- | -------------------------------- |
| `token`   | `address` | The dewhitelisted token address. |


# Convert Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Convert Facet handles Conversions between assets in the Silo and Enrooting Unripe Deposits.

## Call Functions

### [Convert](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ConvertFacet.sol#L67)

```solidity
function convert(
    bytes calldata convertData,
    int96[] memory stems,
    uint256[] memory amounts
)
    external
    payable
    nonReentrant
    returns (int96 toStem, uint256 fromAmount, uint256 toAmount, uint256 fromBdv, uint256 toBdv);
```

Convert allows a user to Convert from one Deposited asset to another, given that the Conversion is on the Convert Whitelist. For example, a Farmer can Convert LP into Bean only when the Bean price is below peg, and vice versa. Read more about [Convert in the Farmers' Almanac](https://docs.bean.money/almanac/peg-maintenance/convert).

| Parameter     | Type        | Description                                        |
| ------------- | ----------- | -------------------------------------------------- |
| `convertData` | `bytes`     | Input parameters to determine the Conversion type. |
| `stems`       | `int98[]`   | The Stems of the Deposits to Convert.              |
| `amounts`     | `uint256[]` | The amounts within each Deposit to Convert.        |

| Return Value | Type      | Description                             |
| ------------ | --------- | --------------------------------------- |
| `toStem`     | `int96`   | The new Stems of the Converted Deposit. |
| `fromAmount` | `uint256` | The amount of tokens Converted from.    |
| `toAmount`   | `uint256` | The amount of tokens Converted to.      |
| `fromBdv`    | `uint256` | The BDV of the Deposits Converted from. |
| `toBdv`      | `uint256` | The BDV of the Deposits Converted to.   |

## View Functions

None.

## Events

### [Convert](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ConvertFacet.sol#L28) <a href="#event-convert" id="event-convert"></a>

```solidity
event Convert(
    address indexed account,
    address fromToken,
    address toToken,
    uint256 fromAmount,
    uint256 toAmount
);
```

Emitted upon each Conversion.

| Parameter    | Type      | Description                                |
| ------------ | --------- | ------------------------------------------ |
| `account`    | `address` | Address of Farmer that Converted.          |
| `fromToken`  | `address` | Whitelisted token that was Converted from. |
| `toToken`    | `address` | Whitelisted token that was Converted to.   |
| `fromAmount` | `uint256` | Amount of `fromToken` Converted.           |
| `toAmount`   | `uint256` | Amount of `toAmount` Converted to.         |

### [Remove Deposit](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ConvertFacet.sol#L36) <a href="#event-remove-deposits" id="event-remove-deposits"></a>

```solidity
event RemoveDeposit(
    address indexed account,
    address indexed token,
    int96 stem,
    uint256 amount,
    uint256 bdv
);
```

Emitted when `account` removes a single Deposit from the Silo. Occurs during Withdraw and Convert.

| Parameter | Type      | Description                           |
| --------- | --------- | ------------------------------------- |
| `account` | `address` | The Farmer whose Deposit was removed. |
| `token`   | `address` | Whitelisted token address.            |
| `stem`    | `int96`   | The Stem of the Deposit.              |
| `amount`  | `uint256` | The token amount of the Deposit.      |
| `bdv`     | `uint256` | The BDV associated with the Deposit.  |

### [Remove Deposits](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ConvertFacet.sol#L44) <a href="#event-remove-deposits" id="event-remove-deposits"></a>

```solidity
event RemoveDeposits(
    address indexed account,
    address indexed token,
    int96[] stems,
    uint256[] amounts,
    uint256 amount,
    uint256[] bdvs
);
```

Emitted when `account` removes multiple Deposits from the Silo. Occurs during Withdraw and Convert.

| Parameter | Type        | Description                                                      |
| --------- | ----------- | ---------------------------------------------------------------- |
| `account` | `address`   | The Farmer whose Deposits were removed.                          |
| `token`   | `address`   | Whitelisted token address.                                       |
| `stems`   | `int96[]`   | Stems of the Deposits.                                           |
| `amounts` | `uint256[]` | The token amounts of the Deposits, corresponding to `stems`.     |
| `amount`  | `uint256`   | Sum of `amounts`.                                                |
| `bdvs`    | `uint256[]` | The BDVs associated with the Deposits, corresponding to `stems`. |


# Convert Getters Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Convert Getters Facet contains view functions for Convert data.

## Call Functions

None.

## View Functions

### [Get Max Amount In](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ConvertGettersFacet.sol#L19)

```solidity
function getMaxAmountIn(address tokenIn, address tokenOut)
    external
    view
    returns (uint256 amountIn);
```

Estimate the maximum number of tokens that can currently be Converted from `tokenIn` to `tokenOut`.&#x20;

| Parameter  | Type      | Description                                        |
| ---------- | --------- | -------------------------------------------------- |
| `tokenIn`  | `address` | The whitelisted token to estimate Converting from. |
| `tokenOut` | `address` | The whitelisted token to estimate Converting to.   |

| Return Value | Type      | Description                                                                                |
| ------------ | --------- | ------------------------------------------------------------------------------------------ |
| `amountIn`   | `uint256` | The maximum number of tokens that can currently be Converted from `tokenIn` to `tokenOut`. |

### [Get Amount Out](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ConvertGettersFacet.sol#L30)

```solidity
function getAmountOut(
    address tokenIn,
    address tokenOut,
    uint256 amountIn
) external view returns (uint256 amountOut);
```

Estimate the amount of tokens received from Converting `tokenIn` to `tokenOut` given an amount of `tokenIn`.

| Parameter  | Type      | Description                                        |
| ---------- | --------- | -------------------------------------------------- |
| `tokenIn`  | `address` | The whitelisted token to estimate Converting from. |
| `tokenOut` | `address` | The whitelisted token to estimate Converting to.   |

| Return Value | Type      | Description                                                                       |
| ------------ | --------- | --------------------------------------------------------------------------------- |
| `amountOut`  | `uint256` | The amount of `tokenOut` received from a Conversion from `tokenIn` to `tokenOut`. |

## Events

None.


# Enroot Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Enroot Facet handles logic for Enrooting Unripe Deposits.

## Call Functions

### [Enroot Deposit](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/EnrootFacet.sol#L57)

```solidity
function enrootDeposit(
    address token,
    int96 stem,
    uint256 amount
) external payable nonReentrant mowSender(token);
```

Claims outstanding Revitalized Stalk and Seeds and updates BDV of a single Unripe Deposit.

| Parameter | Type      | Description                        |
| --------- | --------- | ---------------------------------- |
| `token`   | `address` | Address of whitelist Unripe ERC20. |
| `stem`    | `int96`   | Stem of Deposit to Enroot.         |
| `amount`  | `uint256` | Amount to Enroot.                  |

### [Enroot Deposits](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/EnrootFacet.sol#L116)

```solidity
function enrootDeposits(
    address token,
    int96[] calldata stems,
    uint256[] calldata amounts
) external payable nonReentrant mowSender(token);
```

Claims outstanding Revitalized Stalk and Seeds and updates BDV of multiple Unripe Deposits.

| Parameter | Type        | Description                                          |
| --------- | ----------- | ---------------------------------------------------- |
| `token`   | `address`   | Address of whitelist Unripe ERC20.                   |
| `stems`   | `int96[]`   | Array of Stems of Deposits to Enroot.                |
| `amounts` | `uint256[]` | Array of amounts (corresponding to Stems) to Enroot. |

## View Functions

None.

## Events

### [Remove Deposit](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/EnrootFacet.sol#L22) <a href="#event-remove-deposits" id="event-remove-deposits"></a>

```solidity
event RemoveDeposit(
    address indexed account,
    address indexed token,
    int96 stem,
    uint256 amount,
    uint256 bdv
);
```

Emitted when `account` removes a single Deposit from the Silo. Occurs during Withdraw and Convert.

| Parameter | Type      | Description                           |
| --------- | --------- | ------------------------------------- |
| `account` | `address` | The Farmer whose Deposit was removed. |
| `token`   | `address` | Whitelisted token address.            |
| `stem`    | `int96`   | The Stem of the Deposit.              |
| `amount`  | `uint256` | The token amount of the Deposit.      |
| `bdv`     | `uint256` | The BDV associated with the Deposit.  |

### [Remove Deposits](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/EnrootFacet.sol#L30) <a href="#event-remove-deposits" id="event-remove-deposits"></a>

```solidity
event RemoveDeposits(
    address indexed account,
    address indexed token,
    int96[] stems,
    uint256[] amounts,
    uint256 amount,
    uint256[] bdvs
);
```

Emitted when `account` removes multiple Deposits from the Silo. Occurs during Withdraw and Convert.

| Parameter | Type        | Description                                                      |
| --------- | ----------- | ---------------------------------------------------------------- |
| `account` | `address`   | The Farmer whose Deposits were removed.                          |
| `token`   | `address`   | Whitelisted token address.                                       |
| `stems`   | `int96[]`   | Stems of the Deposits.                                           |
| `amounts` | `uint256[]` | The token amounts of the Deposits, corresponding to `stems`.     |
| `amount`  | `uint256`   | Sum of `amounts`.                                                |
| `bdvs`    | `uint256[]` | The BDVs associated with the Deposits, corresponding to `stems`. |


# Approval Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Approval Facet handles all approval and permit related functions for the Silo.

## Call Functions

### Approvals

### [Approve Deposit](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ApprovalFacet.sol#L46)

```solidity
function approveDeposit(
    address spender,
    address token,
    uint256 amount
) external payable nonReentrant;
```

Approves an address to access a Farmer's Deposit.

| Parameter | Type      | Description                   |
| --------- | --------- | ----------------------------- |
| `spender` | `address` | Address to be given approval. |
| `token`   | `address` | Address of ERC20.             |
| `amount`  | `uint256` | Amount to be approved.        |

### [Increase Deposit Allowance](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ApprovalFacet.sol#L63)

```solidity
function increaseDepositAllowance(
    address spender, 
    address token, 
    uint256 addedValue
) public virtual nonReentrant returns (bool);
```

Increases transfer allowance of a Deposit.

| Parameter    | Type      | Description                            |
| ------------ | --------- | -------------------------------------- |
| `spender`    | `address` | Address to increase approval for.      |
| `token`      | `address` | Address of ERC20.                      |
| `addedValue` | `uint256` | Additional approval value to be given. |

| Return Value | Description                               |
| ------------ | ----------------------------------------- |
| `bool`       | If the allowance increase was successful. |

### [Decrease Deposit Allowance](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ApprovalFacet.sol#L84)

```solidity
function decreaseDepositAllowance(
    address spender, 
    address token, 
    uint256 subtractedValue
) public virtual nonReentrant returns (bool);
```

Decreases transfer allowance of a Deposit.

| Parameter         | Type      | Description                             |
| ----------------- | --------- | --------------------------------------- |
| `spender`         | `address` | Address to decrease approval for.       |
| `token`           | `address` | Address of ERC20.                       |
| `subtractedValue` | `uint256` | Amount of approval value to be removed. |

| Return Value | Description |
| ------------ | ----------- |
| `bool`       | Success.    |

### Permits

Farm balances and Silo Deposits support [EIP-2612 permits](https://eips.ethereum.org/EIPS/eip-2612), which allows Farmers to delegate use of their Farm balances and Silo Deposits through permits without the need for a separate transaction.

### [Permit Deposits](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ApprovalFacet.sol#L115)

```solidity
function permitDeposits(
    address owner,
    address spender,
    address[] calldata tokens,
    uint256[] calldata values,
    uint256 deadline,
    uint8 v,
    bytes32 r,
    bytes32 s
) external payable nonReentrant;
```

Permits multiple Deposits.

| Parameter  | Type        | Description                                            |
| ---------- | ----------- | ------------------------------------------------------ |
| `owner`    | `address`   | Owner of the Deposit.                                  |
| `spender`  | `address`   | Address to permit.                                     |
| `tokens`   | `address[]` | Array of ERC20s to permit.                             |
| `values`   | `uint256[]` | Array of amount (corresponding to `tokens`) to permit. |
| `deadline` | `uint256`   | Expiration of signature (Unix time).                   |
| `v`        | `uint8`     | Recovery ID.                                           |
| `r`        | `bytes32`   | ECDSA signature output.                                |
| `s`        | `bytes32`   | ECDSA signature output.                                |

### [Permit Deposit](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ApprovalFacet.sol#L143)

```solidity
function permitDeposit(
    address owner,
    address spender,
    address token,
    uint256 value,
    uint256 deadline,
    uint8 v,
    bytes32 r,
    bytes32 s
) external payable nonReentrant;
```

Permits a single Deposit.

| Parameter  | Type      | Description                          |
| ---------- | --------- | ------------------------------------ |
| `owner`    | `address` | Owner of the Deposit.                |
| `spender`  | `address` | Address to permit.                   |
| `token`    | `address` | ERC20 to permit.                     |
| `value`    | `uint256` | Amount of `token` to permit.         |
| `deadline` | `uint256` | Expiration of signature (Unix time). |
| `v`        | `uint8`   | Recovery ID.                         |
| `r`        | `bytes32` | ECDSA signature output.              |
| `s`        | `bytes32` | ECDSA signature output.              |

### [Set Approval for All](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ApprovalFacet.sol#L187)

```solidity
function setApprovalForAll(
    address spender, 
    bool approved
) external;
```

Set ERC-1155 approvals. Grants or revokes permission to `operator` to transfer the caller’s tokens, according to `approved`.

| Parameter  | Type      | Description                      |
| ---------- | --------- | -------------------------------- |
| `spender`  | `address` | Address to approve spending for. |
| `approved` | `bool`    | Whether or not to approve.       |

## View Functions

### [Deposit Permit Nonces](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ApprovalFacet.sol#L160)

```solidity
function depositPermitNonces(address owner) public view virtual returns (uint256);
```

Returns the current nonce for Deposit permits.

| Parameter | Type      | Description           |
| --------- | --------- | --------------------- |
| `owner`   | `address` | Owner of the Deposit. |

| Return Value | Description                        |
| ------------ | ---------------------------------- |
| `uint256`    | Current nonce for Deposit permits. |

### [Deposit Permit Domain Separator](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ApprovalFacet.sol#L167)

```solidity
function depositPermitDomainSeparator() external view returns (bytes32);
```

Returns the domain separator for the current chain ([link](https://docs.openzeppelin.com/contracts/3.x/api/drafts#EIP712-_domainSeparatorV4--)).

| Return Value | Description                                 |
| ------------ | ------------------------------------------- |
| `bytes32`    | The domain separator for the current chain. |

### [Deposit Allowance](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ApprovalFacet.sol#L178)

```solidity
function depositAllowance(
    address owner,
    address spender,
    address token
) public view virtual returns (uint256);
```

Returns how much of a `token` Deposit that `spender` can transfer on behalf of `owner`.

| Parameter | Type      | Description                                    |
| --------- | --------- | ---------------------------------------------- |
| `owner`   | `address` | Owner of the Deposit.                          |
| `spender` | `address` | The address that can spend the Deposit.        |
| `token`   | `address` | The token Deposit that `spender` can transfer. |

| Return Value | Description                                                                  |
| ------------ | ---------------------------------------------------------------------------- |
| `uint256`    | The `token` Deposit amount that `spender` can transfer on behalf of `owner`. |

### [Is Approved for All](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ApprovalFacet.sol#L195)

```solidity
function isApprovedForAll(
    address _owner, 
    address _operator
) external view returns (bool);
```

Returns true if `_operator` is approved to transfer `_owner`'s Deposit.

| Parameter   | Type      | Description             |
| ----------- | --------- | ----------------------- |
| `_owner`    | `address` | Owner of the Deposit.   |
| `_operator` | `address` | Spender of the Deposit. |

| Return Value | Description                                                    |
| ------------ | -------------------------------------------------------------- |
| `bool`       | True if `_operator` is approved to transfer `_owner`'s tokens. |

## Events

### [Deposit Approval](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ApprovalFacet.sol#L26) <a href="#event-deposit-approval" id="event-deposit-approval"></a>

```solidity
event DepositApproval(
    address indexed owner,
    address indexed spender,
    address token,
    uint256 amount
);
```

Emitted when a Deposit is approved to spend by another account.

| Parameter | Type      | Description                                    |
| --------- | --------- | ---------------------------------------------- |
| `owner`   | `address` | Owner of the Deposit.                          |
| `spender` | `address` | Spender of the Deposit.                        |
| `token`   | `address` | Deposit token that can be spent.               |
| `amount`  | `uint256` | Amount of the Deposit token that can be spent. |

### [Approval for All](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ApprovalFacet.sol#L32) <a href="#event-deposit-approval" id="event-deposit-approval"></a>

```solidity
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
```

Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to `approved` ([link](https://docs.openzeppelin.com/contracts/3.x/api/token/erc1155#IERC1155-ApprovalForAll-address-address-bool-)).

| Parameter  | Type      | Description                              |
| ---------- | --------- | ---------------------------------------- |
| `account`  | `address` | Owner of the Deposit.                    |
| `operator` | `address` | Spender of the Deposit.                  |
| `approved` | `address` | Whether or not the Deposit was approved. |


# Metadata Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Metadata Facet provides metadata for the ERC-1155 Silo Deposits. Deposit IDs are a `uint256` that is the concatenation of the token address and the Stem.

## Call Functions

None.

## View Functions

### [URI](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/metadata/MetadataFacet.sol#L34)

```solidity
function uri(uint256 depositId) external view returns (string memory);
```

Returns the URI for a given Deposit ID.

| Parameter   | Type      | Description                    |
| ----------- | --------- | ------------------------------ |
| `depositId` | `uint256` | Deposit ID to get the URI for. |

| Return Type | Description                      |
| ----------- | -------------------------------- |
| `string`    | URI of Deposit with `depositId`. |

### [Name](https://github.com/BeanstalkFarms/Beanstalk/blob/893c99d21a2d87c96280f66601a6db8900e5b7d1/protocol/contracts/beanstalk/metadata/MetadataFacet.sol#L58)

```solidity
function name() external pure returns (string memory);
```

Returns the name of the collection for OpenSea compatibility.

| Return Type | Description                     |
| ----------- | ------------------------------- |
| `string`    | Name of the OpenSea collection. |

### [Symbol](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/metadata/MetadataFacet.sol#L62)

```solidity
function symbol() external pure returns (string memory);
```

Returns the ticker of the collection for OpenSea compatibility.

| Return Type | Description                       |
| ----------- | --------------------------------- |
| `string`    | Ticker of the OpenSea collection. |

### [Image URI](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/metadata/MetadataImage.sol#L30)

```solidity
function imageURI(uint256 depositId) public view returns (string memory);
```

Returns the image URI for a given Deposit ID.

| Parameter   | Type      | Description                          |
| ----------- | --------- | ------------------------------------ |
| `depositId` | `uint256` | Deposit ID to get the image URI for. |

| Return Type | Description                            |
| ----------- | -------------------------------------- |
| `string`    | Image URI of Deposit with `depositId`. |

## Events

### [URI](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/metadata/MetadataFacet.sol#L25C5-L25C49)

```solidity
event URI(string _uri, uint256 indexed _id);
```

Not currently emitted.

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `_uri`    | `string`  | URI.        |
| `_id`     | `uint256` | Deposit ID. |


# Migration Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Migration Facet contains functions related to [Silo V3](https://bean.money/bip-36). Farmers are required to migrate to the new accounting system created by the Silo V3 upgrade.

## Call Functions

### [Mow and Migrate](https://github.com/BeanstalkFarms/Beanstalk/blob/9f286e1f1b1e67bc40d35aaf4b16e5c6d83ebdd9/protocol/contracts/beanstalk/silo/MigrationFacet.sol#L41)

```solidity
function mowAndMigrate(
    address account, 
    address[] calldata tokens, 
    uint32[][] calldata seasons,
    uint256[][] calldata amounts,
    uint256 stalkDiff,
    uint256 seedsDiff,
    bytes32[] calldata proof
) external payable;
```

Migrates a Farmer's Deposits from the old (Seasons based) to the new Silo (Stems based) accounting system.

When migrating an account, a user must submit all of the account's Deposits or the migration will not pass because the Seed check will fail. The Seed check adds up the BDV of all submitted Deposits, multiplies by the corresponding Seed amount for each token type, then compares that to the total Seeds stored for that user. If everything matches, the migration is valid.

| Parameter   | Type          | Description                                                                    |
| ----------- | ------------- | ------------------------------------------------------------------------------ |
| `account`   | `address`     | Address of the account to migrate.                                             |
| `tokens`    | `address[]`   | Array of whitelisted token addresses to migrate.                               |
| `seasons`   | `uint256[][]` | The Seasons for the Deposits.                                                  |
| `amounts`   | `uint256[][]` | The amounts of those Deposits which are to be migrated.                        |
| `stalkDiff` | `uint256`     | Discrepancy between the calculated Stalk and the actual Stalk the account has. |
| `seedsDiff` | `uint256`     | Discrepancy between the calculated Seeds and the actual Seeds the account has. |
| `proof`     | `bytes32[]`   | The Merkle proof that confirms `stalkDiff` and `seedsDiff`.                    |

### [Mow and Migrate No Deposits](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/MigrationFacet.sol#L63)

```solidity
function mowAndMigrateNoDeposits(address account) external payable;
```

Migrate an account to Silo V3 that has no Deposits.

| Parameter | Type      | Description                        |
| --------- | --------- | ---------------------------------- |
| `account` | `address` | Address of the account to migrate. |

## View Functions

### [Balance Of Legacy Seeds](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/MigrationFacet.sol#L67)

```solidity
function balanceOfLegacySeeds(address account) external view returns (uint256);
```

Gets balance of Seeds for a Farmer that hasn't migrated.

| Parameter | Type      | Description         |
| --------- | --------- | ------------------- |
| `account` | `address` | A Farmer's address. |

| Return Value | Description                                |
| ------------ | ------------------------------------------ |
| `uint256`    | Balance of Seeds for an unmigrated Farmer. |

### [Balance Of Grown Stalk up to Stems Deployment](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/MigrationFacet.sol#L71)

```solidity
function balanceOfGrownStalkUpToStemsDeployment(address account)
    external
    view
    returns (uint256);
```

Gets a Farmer's balance of Grown Stalk at the time of Stems deployment (Silo V3 upgrade).

| Parameter | Type      | Description        |
| --------- | --------- | ------------------ |
| `account` | `address` | Address of Farmer. |

| Return Value | Description                                                        |
| ------------ | ------------------------------------------------------------------ |
| `uint256`    | Grown Stalk balance for `account` at the time of Stems deployment. |

### [Get Deposit Legacy](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/MigrationFacet.sol#L90)

```solidity
function getDepositLegacy(
    address account,
    address token,
    uint32 season
) external view returns (uint128, uint128);
```

Locate the token amount and BDV for a Farmer's Deposit in legacy storage.

| Parameter | Type      | Description                                   |
| --------- | --------- | --------------------------------------------- |
| `account` | `address` | Address of Farmer.                            |
| `token`   | `address` | Whitelisted token address to get Deposit for. |
| `season`  | `uint32`  | Season of the Deposit in legacy storage.      |

| Return Value | Description                                         |
| ------------ | --------------------------------------------------- |
| `uint128`    | Amount of `token` of the Deposit in legacy storage. |
| `uint128`    | BDV of the Deposit in legacy storage.               |

## Events

None.


# Legacy Claim Withdrawal Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Legacy Claim Withdrawal Facet allows anyone to Claim and read Withdrawals. [Silo V3](https://bean.money/bip-36) removed the Withdrawal Freeze from the Silo. Withdrawing now directly sends ERC-20 tokens to the Farmer's Farm or Circulating balances instead of creating a Withdrawal.

Although new Withdrawals cannot be created, the claim Withdrawal functionality has been preserved in this facet to allow pre-existing unclaimed Withdrawals to still be claimed.

## Call Functions

### [Claim Withdrawal](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/LegacyClaimWithdrawalFacet.sol#L35)

```solidity
function claimWithdrawal(
    address token,
    uint32 season,
    LibTransfer.To mode
) external payable nonReentrant;
```

Claims tokens from a Withdrawal.

| Parameter | Type      | Description                                                                                                |
| --------- | --------- | ---------------------------------------------------------------------------------------------------------- |
| `token`   | `address` | Address of whitelisted token.                                                                              |
| `season`  | `uint32`  | Season of Withdrawal to claim.                                                                             |
| `mode`    | `To`      | The balance to transfer claimed assets to; see [`LibTransfer.To`](/developers/overview/internal-balances). |

### [Claim Withdrawals](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/LegacyClaimWithdrawalFacet.sol#L50)

```solidity
function claimWithdrawals(
    address token,
    uint32[] calldata seasons,
    LibTransfer.To mode
) external payable nonReentrant;
```

Claims tokens from multiple Withdrawals.

| Parameter | Type       | Description                                                                                                |
| --------- | ---------- | ---------------------------------------------------------------------------------------------------------- |
| `token`   | `address`  | Address of whitelisted token.                                                                              |
| `seasons` | `uint32[]` | Array of Seasons to claim.                                                                                 |
| `mode`    | `To`       | The balance to transfer claimed assets to; see [`LibTransfer.To`](/developers/overview/internal-balances). |

## View Functions

### [Get Withdrawal](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/LegacyClaimWithdrawalFacet.sol#L66)

```solidity
function getWithdrawal(
    address account,
    address token,
    uint32 season
) external view returns (uint256);
```

Get the amount of `token` in the Withdrawal `season` for `account`.

| Parameter | Type      | Description                       |
| --------- | --------- | --------------------------------- |
| `account` | `address` | Farmer to get the Withdrawal for. |
| `token`   | `address` | Token address of the Withdrawal.  |
| `season`  | `uint32`  | Season of the Withdrawal.         |

| Return Value | Description                                                     |
| ------------ | --------------------------------------------------------------- |
| `uint256`    | Amount of `token` Withdrawn for the Farmer in the given Season. |

### [Get Total Withdrawn](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/SiloFacet/LegacyClaimWithdrawalFacet.sol#L78)

```solidity
function getTotalWithdrawn(address token) external view returns (uint256);
```

Get the total amount of `token` currently Withdrawn from the Silo across all Farmers.

| Parameter | Type      | Description                  |
| --------- | --------- | ---------------------------- |
| `token`   | `address` | The Withdrawn token address. |

| Return Value | Description                        |
| ------------ | ---------------------------------- |
| `uint256`    | Total amount of Withdrawn `token`. |

## Events

None.


# Field

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Field is Beanstalk's credit facility. Beanstalk relies on a decentralized set of creditors to maintain Bean price stability.

Anytime Beanstalk is willing to issue debt, there is Soil in the Field. Soil represents the number of Beans that Beanstalk is currently willing to borrow.

Anytime there is Soil in the Field, Farmers can Sow Beans in exchange for Pods. Pods are stored in Plots and placed at the end of the Pod Line.

Pods become Harvestable on a First In, First Out (FIFO) basis when `deltaB > 0` over the course of a Season. Assuming there are Unharvestable Pods and Unfertilized Beans, 1/3 of Bean mints turn Pods into Harvestable Pods, which can be Harvested (redeemed) for Beans via the `harvest()` function. When a Plot is Harvested, it is deleted from storage.

Pods are implemented using 3 indices:

* `podIndex` -> The total number of Pods ever created.
* `harvestableIndex` -> The total number of Pods that ever became Harvestable.
* `harvestedIndex` -> The total number of Pods ever Harvested.

When Beans are Sown, a Plot is created at the current `podIndex` with `beans * (1 + weather)`. Pods and `podIndex` are incremented by the number of Pods.

When Pods become Harvestable, `harvestableIndex` is incremented by the number of newly Harvestable Pods. Plots are Harvestable if the index of a Plot is less than `harvestableIndex`. Plots can be partially Harvested, in which case Beanstalk deletes the first part of the Plot and creates a new Plot at the `harvestableIndex`. When a Plot is Harvested, the `harvestedIndex` increases by the number of Harvested Pods.

<figure><img src="https://1489145838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlndPiqG60XIdTDQRAzIy%2Fuploads%2FqUiQAsE2k1Oq4R0dAwUs%2Fpod-line.png?alt=media&amp;token=eb35603d-4039-4711-be1e-6aa5ca1e10f0" alt=""><figcaption></figcaption></figure>

## Fundraiser

Fundraisers allow Beanstalk to raise non-Bean stablecoins to pay for services on behalf of the protocol, such as audits. Fundraisers can be created through the `createFundraiser()` function by Beanstalk or the owner of the contract.

Each Fundraiser requires:

1. The token address of the non-Bean token being raised;
2. The amount of tokens being raised; and
3. The address to send the tokens to upon completion of the Fundraiser.

Farmers `fund()` Fundraisers by transferring the non-Bean stablecoin to Beanstalk and in exchange receive Pods at the current Weather at the end of the Pod Line. Funding is akin to Sowing, but instead of burning Beans, Beanstalk is raising a non-Bean stable coin.

Once all of the Funds have been raised, the tokens are transferred to the payee address stored in the Fundraiser.

You can find links to past BIPs that created Fundraisers [here](https://docs.bean.money/almanac/protocol/fundraiser).


# Field Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Field Facet is where Beans are Sown.

## Call Functions

### [Sow](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L82)

```solidity
function sow(
    uint256 beans,
    uint256 minTemperature,
    LibTransfer.From mode
)
    external
    payable
    returns (uint256 pods);
```

Sow Beans in exchange for Pods.

| Parameter        | Type      | Description                                                                                           |
| ---------------- | --------- | ----------------------------------------------------------------------------------------------------- |
| `beans`          | `uint256` | The number of Beans to Sow.                                                                           |
| `minTemperature` | `uint256` | The minimum Temperature at which to Sow.                                                              |
| `mode`           | `From`    | The balance to transfer Beans from; see [`LibTransfer.From`](/developers/overview/internal-balances). |

| Return Value | Type      | Description                  |
| ------------ | --------- | ---------------------------- |
| `pods`       | `uint256` | The number of Pods received. |

### [Sow With Min](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L103)

```solidity
function sowWithMin(
    uint256 beans,
    uint256 minTemperature,
    uint256 minSoil,
    LibTransfer.From mode
) public payable returns (uint256 pods);
```

Sow Beans in exchange for Pods. Use at least `minSoil`.

| Parameter        | Type      | Description                                                                                               |
| ---------------- | --------- | --------------------------------------------------------------------------------------------------------- |
| `beans`          | `uint256` | The number of Beans to Sow.                                                                               |
| `minTemperature` | `uint256` | The minimum Temperature at which to Sow.                                                                  |
| `minSoil`        | `uint256` | The minimum amount of Soil to use; reverts if there is less than this much Soil available upon execution. |
| `mode`           | `From`    | The balance to transfer Beans from; see [`LibTransfer.From`](/developers/overview/internal-balances).     |

| Return Value | Type      | Description                  |
| ------------ | --------- | ---------------------------- |
| `pods`       | `uint256` | The number of Pods received. |

### [Harvest](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L163)

```solidity
function harvest(uint256[] calldata plots, LibTransfer.To mode)
    external
    payable;
```

Harvest Pods from the Field.

| Parameter | Type        | Description                                                                                       |
| --------- | ----------- | ------------------------------------------------------------------------------------------------- |
| `plots`   | `uint256[]` | List of Plot IDs to Harvest.                                                                      |
| `mode`    | `To`        | The balance to transfer Beans to; see [`LibTransfer.To`](/developers/overview/internal-balances). |

## View Functions

### [Pod Index](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L232)

```solidity
function podIndex() public view returns (uint256);
```

Returns the total number of Pods ever minted.

| Return Type | Description                           |
| ----------- | ------------------------------------- |
| `uint256`   | The total number of Pods ever minted. |

### [Harvestable Index](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L239)

```solidity
function harvestableIndex() public view returns (uint256);
```

Returns the index below which Pods are Harvestable.

| Return Type | Description                                 |
| ----------- | ------------------------------------------- |
| `uint256`   | The index below which Pods are Harvestable. |

### [Total Pods](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L247)

```solidity
function totalPods() public view returns (uint256);
```

Returns the number of outstanding Pods. Includes Pods that are currently Harvestable but have not yet been Harvested.

| Return Type | Description                     |
| ----------- | ------------------------------- |
| `uint256`   | The number of outstanding Pods. |

### [Total Harvested](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L254)

```solidity
function totalHarvested() public view returns (uint256);
```

Returns the number of Pods that have ever been Harvested.

| Return Type | Description                                       |
| ----------- | ------------------------------------------------- |
| `uint256`   | The number of Pods that have ever been Harvested. |

### [Total Harvestable](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L264)

```solidity
function totalHarvestable() public view returns (uint256);
```

Returns the number of Pods that are currently Harvestable but have not yet been Harvested.

| Return Type | Description                                                                        |
| ----------- | ---------------------------------------------------------------------------------- |
| `uint256`   | The number of Pods that are currently Harvestable but have not yet been Harvested. |

### [Total Unharvestable](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L271)

```solidity
function totalUnharvestable() public view returns (uint256);
```

Returns the number of Pods that are not yet Harvestable.

| Return Type | Description                                      |
| ----------- | ------------------------------------------------ |
| `uint256`   | The number of Pods that are not yet Harvestable. |

### [Plot](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L279)

```solidity
function plot(address account, uint256 index)
    public
    view
    returns (uint256);
```

Returns the number of Pods remaining in a Plot.

| Parameter | Type      | Description                   |
| --------- | --------- | ----------------------------- |
| `account` | `address` | The account that owns a Plot. |
| `index`   | `uint256` | The ID of a Plot.             |

| Return Type | Description                             |
| ----------- | --------------------------------------- |
| `uint256`   | The number of Pods remaining in a Plot. |

### [Total Soil](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L324)

```solidity
function totalSoil() external view returns (uint256);
```

Returns the total available Soil.

| Return Type | Description               |
| ----------- | ------------------------- |
| `uint256`   | The total available Soil. |

### [Yield](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L346)

```solidity
function yield() external view returns (uint32);
```

Returns the current yield (aka "Temperature") offered by Beanstalk when burning Beans in exchange for Pods.

| Return Type | Description                                                                     |
| ----------- | ------------------------------------------------------------------------------- |
| `uint32`    | The current yield offered by Beanstalk when burning Beans in exchange for Pods. |

### [Temperature](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L356)

```solidity
function temperature() external view returns (uint256);
```

Returns the current Temperature, the interest rate offered by Beanstalk in exchange for Sowing Beans.

| Return Value | Description              |
| ------------ | ------------------------ |
| `uint256`    | The current Temperature. |

### [Max Temperature](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L366)

```solidity
function maxTemperature() external view returns (uint256);
```

Returns the Maximum Temperature that Beanstalk is willing to offer this Season.

| Return Type | Description              |
| ----------- | ------------------------ |
| `uint256`   | The Maximum Temperature. |

### [Remaining Pods](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L375)

```solidity
function remainingPods() external view returns (uint256);
```

Returns the remaining Pods that could be issued this Season.

| Return Value | Description                                          |
| ------------ | ---------------------------------------------------- |
| `uint256`    | The remaining Pods that could be issued this Season. |

## Events

### [Sow](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L37) <a href="#event-sow" id="event-sow"></a>

```solidity
event Sow(
    address indexed account,
    uint256 index,
    uint256 beans,
    uint256 pods
);
```

Emitted from `LibDibbler.sowNoSoil` when an `account` creates a Plot. A Plot is a set of Pods created in from a single `sow` or `fund` call.

| Parameter | Type      | Description                                          |
| --------- | --------- | ---------------------------------------------------- |
| `account` | `address` | The account that Sowed Beans for Pods.               |
| `index`   | `uint256` | The Place in Line of the Plot.                       |
| `beans`   | `uint256` | The amount of Beans burnt to create the Plot.        |
| `pods`    | `uint256` | The amount of Pods associated with the created Plot. |

### [Harvest](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L50) <a href="#event-harvest" id="event-harvest"></a>

```solidity
event Harvest(address indexed account, uint256[] plots, uint256 beans);
```

Emitted when `account` claims the Beans associated with Harvestable Pods.

| Parameter | Type        | Description                                   |
| --------- | ----------- | --------------------------------------------- |
| `account` | `address`   | The account that owns the `plots`.            |
| `plots`   | `uint256[]` | The indices of Plots that were Harvested.     |
| `beans`   | `uint256`   | The amount of Beans transferred to `account`. |

### [Pod Listing Cancelled](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FieldFacet.sol#L57) <a href="#event-pod-listing-cancelled" id="event-pod-listing-cancelled"></a>

```solidity
event PodListingCancelled(address indexed account, uint256 index);
```

Emitted when a Pod Listing is Cancelled.

| Parameter | Type      | Description                               |
| --------- | --------- | ----------------------------------------- |
| `account` | `address` | The account that created the Pod Listing. |
| `index`   | `uint256` | The index of the Plot listed.             |


# Fundraiser Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Fundraiser Facet dandles the creation, funding, and completion of [Fundraisers](https://docs.bean.money/almanac/protocol/fundraiser).

## Call Functions

### [Fund](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FundraiserFacet.sol#L105)

```solidity
function fund(
    uint32 id,
    uint256 amount,
    LibTransfer.From mode
) external payable nonReentrant returns (uint256);
```

Fund a Fundraiser in exchange for Pods.

| Parameter | Type      | Description                                                                                     |
| --------- | --------- | ----------------------------------------------------------------------------------------------- |
| `id`      | `uint32`  | The Fundraiser ID.                                                                              |
| `amount`  | `uint256` | Amount of `fundraisers[id].token` to provide.                                                   |
| `mode`    | `From`    | Balance to spend tokens from; see [`LibTransfer.From`](/developers/overview/internal-balances). |

| Return Type | Description                  |
| ----------- | ---------------------------- |
| `uint256`   | The number of Pods received. |

### [Create Fundraiser](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FundraiserFacet.sol#L66)

```solidity
function createFundraiser(
    address payee,
    address token,
    uint256 amount
) external payable;
```

Creates a Fundraiser. Can only be called by the owner of Beanstalk.

| Parameter | Type      | Description                                                                       |
| --------- | --------- | --------------------------------------------------------------------------------- |
| `payee`   | `address` | The address to which funds are delivered at the end of the Fundraiser.            |
| `token`   | `address` | The address of the token that can be sent to the Fundraiser in exchange for Pods. |
| `amount`  | `uint256` | The amount of `token` that is being raised.                                       |

## View Functions

### [Remaining Funding](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FundraiserFacet.sol#L169)

```solidity
function remainingFunding(uint32 id) public view returns (uint256);
```

Returns the remaining number of tokens to raise.

| Parameter | Type     | Description        |
| --------- | -------- | ------------------ |
| `id`      | `uint32` | The Fundraiser ID. |

| Return Type | Description                              |
| ----------- | ---------------------------------------- |
| `uint256`   | The remaining number of tokens to raise. |

### [Total Funding](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FundraiserFacet.sol#L173)

```solidity
function totalFunding(uint32 id) public view returns (uint256);
```

Returns the total amount of tokens raised so far.

| Parameter | Type     | Description        |
| --------- | -------- | ------------------ |
| `id`      | `uint32` | The Fundraiser ID. |

| Return Type | Description                               |
| ----------- | ----------------------------------------- |
| `uint256`   | The total amount of tokens raised so far. |

### [Funding Token](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FundraiserFacet.sol#L177)

```solidity
function fundingToken(uint32 id) public view returns (address);
```

Returns the address of the token that can be sent to the Fundraiser.

| Parameter | Type     | Description        |
| --------- | -------- | ------------------ |
| `id`      | `uint32` | The Fundraiser ID. |

| Return Type | Description                                                  |
| ----------- | ------------------------------------------------------------ |
| `address`   | The address of the token that can be sent to the Fundraiser. |

### [Fundraiser](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FundraiserFacet.sol#L181)

```solidity
function fundraiser(uint32 id)
    public
    view
    returns (Storage.Fundraiser memory);
```

Returns the Fundraiser struct.

| Parameter | Type     | Description        |
| --------- | -------- | ------------------ |
| `id`      | `uint32` | The Fundraiser ID. |

| Return Type  | Description                                                                       |
| ------------ | --------------------------------------------------------------------------------- |
| `Fundraiser` | Returns the Fundraiser struct in [App Storage](/developers/overview/app-storage). |

### [Number Of Fundraisers](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FundraiserFacet.sol#L189)

```solidity
function numberOfFundraisers() public view returns (uint32);
```

Returns the number of Fundraisers.

| Return Type | Description                |
| ----------- | -------------------------- |
| `uint32`    | The number of Fundraisers. |

## Events

### [Create Fundraiser](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FundraiserFacet.sol#L33) <a href="#event-create-fundraiser" id="event-create-fundraiser"></a>

```solidity
event CreateFundraiser(
    uint32 indexed id,
    address fundraiser,
    address token,
    uint256 amount
);
```

Emitted when a Fundraiser is created.

| Parameter    | Type      | Description                                                                       |
| ------------ | --------- | --------------------------------------------------------------------------------- |
| `id`         | `uint32`  | The Fundraiser ID.                                                                |
| `fundraiser` | `address` | The address to which funds are delivered.                                         |
| `token`      | `address` | The address of the token that can be sent to the Fundraiser in exchange for Pods. |
| `amount`     | `uint256` | The amount of `token` that is being raised.                                       |

### [Fund Fundraiser](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FundraiserFacet.sol#L46) <a href="#event-fund-fundraiser" id="event-fund-fundraiser"></a>

```solidity
event FundFundraiser(
    address indexed account,
    uint32 indexed id,
    uint256 amount
);
```

Emitted when a Farmer calls `fund`.

| Parameter | Type      | Description                                    |
| --------- | --------- | ---------------------------------------------- |
| `account` | `address` | The address of the Farmer.                     |
| `id`      | `uint32`  | The Fundraiser ID.                             |
| `amount`  | `uint256` | The amount of `token` that `account` provided. |

### [Complete Fundraiser](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/field/FundraiserFacet.sol#L56) <a href="#event-complete-fundraiser" id="event-complete-fundraiser"></a>

```solidity
event CompleteFundraiser(uint32 indexed id);
```

Emitted when a Fundraiser is fully funded.

| Parameter | Type     | Description        |
| --------- | -------- | ------------------ |
| `id`      | `uint32` | The Fundraiser ID. |


# Barn

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

On April 17, 2022, Beanstalk was exploited via a governance attack. The attacker used a flash loan to exploit the protocol’s then on-chain governance mechanism and transferred all of the Deposited assets in the Silo to an address they controlled, resulting in a theft of \~$77M in non-Bean assets.

Upon exploit, Beanstalk was Paused and the on-chain governance mechanism was removed. Stalkholders voted [via Snapshot](https://snapshot.org/#/beanstalkfarms.eth/proposal/0xb87854d7f6f40f0877a1333028eab829b213fbcce03f16f9dd3832c8a98ab99b) on how Beanstalk should proceed.

The Barn is the Beanstalk recapitalization facility used to Replant Beanstalk. The Barn Raise started on June 6, 2022 while the protocol was offline and continues until the recapitalization target has been reached.

The Barn is consists of 2 Facets:

* [Fertilizer Facet](/developers/protocol/barn/fertilizer-facet)
* [Unripe Facet](/developers/protocol/barn/unripe-facet)

### Fertilizer

Fertilizer is a semi-fungible limited debt issuance to recapitalize $77M in stolen liquidity.

At the beginning of the Barn Raise, there was 77M Available Fertilizer. Available Fertilizer is the number of Fertilizer that can be bought from Beanstalk in exchange for 1 USDC each. Fertilizer becomes Active when it is bought, at which point the ERC-1155 Fertilizer token is minted.&#x20;

Active Fertilizer entitles holders to a pro rata portion of 1/3 of Bean mints.

Fertilizer is minted with a given % Humidity. Humidity is dependent on the Season during which the Fertilizer is minted. During Season 6074 (the Season Beanstalk was Paused at), the Humidity was 500%. The next Season, Humidity was set to 250% and decreased 0.5% every Season until it reached 20%. The Humidity will remain at 20% until all Fertilizer is sold.

Each Fertilizer entitles its holder up to `1 + humidity` Unfertilized Beans. Unfertilized Beans become Fertilized Beans when Beans are distributed to Active Fertilizer holders. When Fertilizer has no more corresponding Unfertilized Beans, it becomes Used and no longer receives Bean mints.&#x20;

To track Active Fertilizer, Beanstalk has a global variable `s.bpf`, which is the cumulative Beans Per Fertilizer (BPF) paid back over all Seasons. Fertilizer is indexed by `endBpf = s.bpf + 1 + humidity` at the time of minting. This indicates that once `s.bpf` reaches `endBpf`, the Fertilizer becomes Used. Beanstalk sorts all non-zero Fertilizer ids by `endBpf` in `s.nextFid`. This is a linked list where `s.fFirst` is the start of the list and `s.fLast` is the end of the list.&#x20;

Every Season, Beanstalk increments `s.bpf` by the number of new Bean mints distributed to Fertilizer holders divided by `s.activeFertilizer`. Note that Beanstalk integrates `s.bpf` over `s.activeFertilizer`—every time `s.bpf` reaches `s.fFirst`, `s.activeFertilizer` decreases by the supply of Fertilizer with an id of `s.fFirst`. The first item is then popped off the linked list and `s.fFirst` is set to the next item. When `s.fFirst == 0`, Beanstalk stops paying Beans to Fertilizer as all Fertilizer is either Used or Available (and thus `s.activeFertilizer == 0`).

Fertilizer can be claimed via the `claimFertilizer` function (it is also claimed automatically whenever Fertilizer is transferred). The Fertilizer contract stores the `lastBpf` value for each token id that the Farmer owns. When a Farmer claims Fertilizer, Beanstalk computes how many Beans have been Fertilized since the last time the Farmer Fertilized that id with: `min(s.bpf, s.nextFid[id]) – lastBpf`. It then gives the Farmer that many Beans for each Fertilizer they have of that id.

#### Pre-Replant Fertilizer

Before Beanstalk was Replanted, Fertilizer was deployed as `FertilizerPreMint.sol`, which transferred USDC from the caller to [the Beanstalk Community Multisig (BCM) address](https://app.safe.global/eth:0xa9bA2C40b263843C04d344727b954A545c81D043) in exchange for Fertilizer. The Fertilizer was issued at the id `6_000_000` as the Humidity was 500% before Replant.

When Beanstalk was Replanted, the BCM called the `addFertilizerOwner` function that handled the process of adding liquidity to the BEAN:3CRV pool and minting new Beans for all of the Fertilizer minted prior to Replant.

At the same time, the Fertilizer contract was upgraded to [`Fertilizer.sol`](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/tokens/Fertilizer/Fertilizer.sol). This moved the `mintFertilizer()` functionality from the Fertilizer contract to Beanstalk itself. From this point forward, Beanstalk automatically adds new liquidity for Unripe LP holders and new Beans for Unripe Bean holders in the same transaction that Fertilizer is minted in.

### **Unripe Assets**

Upon Replant, Farmers who held Beans in the block prior to the exploit received 1 Unripe Bean for every pre-exploit Bean; Farmers who held whitelisted LP Tokens in the block prior to the exploit received 1 Unripe BEAN:3CRV LP for every 1 BDV of each pre-exploit whitelisted LP Token.

As Fertilizer is sold, Beans are distributed to all Unripe Bean holders pro rata (and BEAN:3CRV LP is distributed to all Unripe LP holders) using the shares and underlying token model that [EIP-4626](https://eips.ethereum.org/EIPS/eip-4626) uses for yield-bearing tokens. The Unripe tokens are the Shares and Beans/LP are the underlying assets. The underlying portion will continue to increase as Fertilizer is minted in exchange for USDC.

Farmers can Chop their Unripe assets at any point for a penalized percent of the corresponding underlying tokens. The penalized percent is equal to the percent of Unfertilized Beans that have been Fertilized. This can be computed as `s.fertilizedIndex / s.unfertilizedIndex`.


# Fertilizer Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Fertilizer Facet handles the minting of Fertilizer and Beans paid to Fertilizer holders.

## Call Functions

### [Claim Fertilized Beans](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L32)

```solidity
function claimFertilized(uint256[] calldata ids, LibTransfer.To mode)
    external
    payable;
```

WIP

| Parameter | Type        | Description |
| --------- | ----------- | ----------- |
| `ids`     | `uint256[]` | WIP         |
| `mode`    | `To`        | WIP         |

### [Mint Fertilizer](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L40)

```solidity
function mintFertilizer(
    uint128 amount,
    uint256 minLP,
    LibTransfer.From mode
) external payable;
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `amount`  | `uint128` | WIP         |
| `minLP`   | `uint256` | WIP         |
| `mode`    | `From`    | WIP         |

### [Add Fertilizer Owner](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L61)

```solidity
function addFertilizerOwner(
    uint128 id,
    uint128 amount,
    uint256 minLP
) external payable;
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `id`      | `uint128` | WIP         |
| `amount`  | `uint128` | WIP         |
| `minLP`   | `uint256` | WIP         |

### [Pay Fertilizer](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L75)

```solidity
function payFertilizer(address account, uint256 amount) external payable
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `account` | `address` | WIP         |
| `amount`  | `uint256` | WIP         |

## View Functions

### [Total Fertilized Beans](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L85)

```solidity
function totalFertilizedBeans() external view returns (uint256 beans);
```

WIP

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `beans`      | `uint256` | WIP         |

### [Total Unfertilized Beans](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L89)

```solidity
function totalUnfertilizedBeans() external view returns (uint256 beans);
```

WIP

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `beans`      | `uint256` | WIP         |

### [Total Fertilizer Beans](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L93)

```solidity
function totalFertilizerBeans() external view returns (uint256 beans);
```

WIP

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `beans`      | `uint256` | WIP         |

### [Get Fertilizer](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L97)

```solidity
function getFertilizer(uint128 id) external view returns (uint256);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `id`      | `uint128` | WIP         |

| Return Type | Description |
| ----------- | ----------- |
| `uint256`   | WIP         |

### [Get Next](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L101)

```solidity
function getNext(uint128 id) external view returns (uint128);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `id`      | `uint128` | WIP         |

| Return Type | Description |
| ----------- | ----------- |
| `uint128`   | WIP         |

### [Get First](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L105)

```solidity
function getFirst() external view returns (uint128);
```

WIP

| Return Type | Description |
| ----------- | ----------- |
| `uint128`   | WIP         |

### [Get Last](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L109)

```solidity
function getLast() external view returns (uint128);
```

WIP

| Return Type | Description |
| ----------- | ----------- |
| `uint128`   | WIP         |

### [Get Active Fertilizer](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L113)

```solidity
function getActiveFertilizer() external view returns (uint256);
```

WIP

| Return Type | Description |
| ----------- | ----------- |
| `uint256`   | WIP         |

### [Is Fertilizing](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L117)

```solidity
function isFertilizing() external view returns (bool);
```

WIP

| Return Type | Description |
| ----------- | ----------- |
| `bool`      | WIP         |

### [Beans Per Fertilizer](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L121)

```solidity
function beansPerFertilizer() external view returns (uint128 bpf);
```

WIP

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `bpf`        | `uint128` | WIP         |

### [Get Humidity](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L125)

```solidity
function getHumidity(uint128 _s) external pure returns (uint128 humidity);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `_s`      | `uint128` | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `humidity`   | `uint128` | WIP         |

### [Get Current Humidity](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L129)

```solidity
function getCurrentHumidity() external view returns (uint128 humidity);
```

WIP

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `humidity`   | `uint128` | WIP         |

### [Get End BPF](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L133)

```solidity
function getEndBpf() external view returns (uint128 endBpf);
```

WIP

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `endBpf`     | `uint128` | WIP         |

### [Remaining Recapitalization](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L137)

```solidity
function remainingRecapitalization() external view returns (uint256);
```

WIP

| Return Type | Description |
| ----------- | ----------- |
| `uint256`   | WIP         |

### [Balance of Unfertilized](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L141)

```solidity
function balanceOfUnfertilized(address account, uint256[] memory ids)
    external
    view
    returns (uint256 beans);
```

WIP

| Parameter | Type        | Description |
| --------- | ----------- | ----------- |
| `account` | `address`   | WIP         |
| `ids`     | `uint256[]` | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `beans`      | `uint256` | WIP         |

### [Balance of Fertilized](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L149)

```solidity
function balanceOfFertilized(address account, uint256[] memory ids)
    external
    view
    returns (uint256 beans);
```

WIP

| Parameter | Type        | Description |
| --------- | ----------- | ----------- |
| `account` | `address`   | WIP         |
| `ids`     | `uint256[]` | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `beans`      | `uint256` | WIP         |

### [Balance of Fertilizer](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L157)

```solidity
function balanceOfFertilizer(address account, uint256 id)
    external
    view
    returns (IFertilizer.Balance memory);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `account` | `address` | WIP         |
| `id`      | `uint256` | WIP         |

| Return Type           | Description |
| --------------------- | ----------- |
| `IFertilizer.Balance` | WIP         |

### [Balance of Batch Fertilizer](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L165)

```solidity
function balanceOfBatchFertilizer(
    address[] memory accounts,
    uint256[] memory ids
) external view returns (IFertilizer.Balance[] memory);
```

WIP

| Parameter  | Type        | Description |
| ---------- | ----------- | ----------- |
| `accounts` | `address[]` | WIP         |
| `ids`      | `uint256[]` | WIP         |

| Return Type             | Description |
| ----------------------- | ----------- |
| `IFertilizer.Balance[]` | WIP         |

### [Get Fertilizers](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L172)

```solidity
function getFertilizers()
    external
    view
    returns (Supply[] memory fertilizers);
```

WIP

| Return Value  | Type       | Description |
| ------------- | ---------- | ----------- |
| `fertilizers` | `Supply[]` | WIP         |

## Events

### [Set Fertilizer](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/FertilizerFacet.sol#L23) <a href="#event-set-fertilizer" id="event-set-fertilizer"></a>

```solidity
event SetFertilizer(uint128 id, uint128 bpf);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `id`      | `uint128` | WIP         |
| `bpf`     | `uint128` | WIP         |


# Unripe Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Unripe Facet handles logic for the vesting of Unripe assets.

## Call Functions

### [Chop](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L51)

```solidity
function chop(
    address unripeToken,
    uint256 amount,
    LibTransfer.From fromMode,
    LibTransfer.To toMode
) external payable nonReentrant returns (uint256 underlyingAmount);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `unripeToken` | `address` | WIP         |
| `amount`      | `uint256` | WIP         |
| `fromMode`    | `From`    | WIP         |
| `toMode`      | `To`      | WIP         |

| Return Value       | Type      | Description |
| ------------------ | --------- | ----------- |
| `underlyingAmount` | `uint256` | WIP         |

### [Pick](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L72)

```solidity
function pick(
    address token,
    uint256 amount,
    bytes32[] memory proof,
    LibTransfer.To mode
) external payable nonReentrant;
```

WIP

| Parameter | Type        | Description |
| --------- | ----------- | ----------- |
| `token`   | `address`   | WIP         |
| `amount`  | `uint256`   | WIP         |
| `proof`   | `bytes32[]` | WIP         |
| `mode`    | `To`        | WIP         |

### [Add Unripe Token](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L227)

```solidity
function addUnripeToken(
    address unripeToken,
    address underlyingToken,
    bytes32 root
) external payable nonReentrant;
```

WIP

| Parameter         | Type      | Description |
| ----------------- | --------- | ----------- |
| `unripeToken`     | `address` | WIP         |
| `underlyingToken` | `address` | WIP         |
| `root`            | `bytes32` | WIP         |

## View Functions

### [Picked](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L97)

```solidity
function picked(address account, address token)
    public
    view
    returns (bool);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `account` | `address` | WIP         |
| `token`   | `address` | WIP         |

| Return Type | Description |
| ----------- | ----------- |
| `bool`      | WIP         |

### [Get Underlying](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L105)

```solidity
function getUnderlying(address unripeToken, uint256 amount)
    public
    view
    returns (uint256 redeem);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `unripeToken` | `address` | WIP         |
| `amount`      | `uint256` | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `redeem`     | `uint256` | WIP         |

### [Get Penalty](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L123)

```solidity
function getPenalty(address unripeToken)
    external
    view
    returns (uint256 penalty);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `unripeToken` | `address` | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `penalty`    | `uint256` | WIP         |

### [Get Penalized Underlying](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L131)

```solidity
function getPenalizedUnderlying(address unripeToken, uint256 amount)
    public
    view
    returns (uint256 redeem);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `unripeToken` | `address` | WIP         |
| `amount`      | `uint256` | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `redeem`     | `uint256` | WIP         |

### [\_Get Penalized Underlying](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L139)

```solidity
function _getPenalizedUnderlying(address unripeToken, uint256 amount, uint256 supply)
    public
    view
    returns (uint256 redeem);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `unripeToken` | `address` | WIP         |
| `amount`      | `uint256` | WIP         |
| `supply`      | `uint256` | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `redeem`     | `uint256` | WIP         |

### [Is Unripe](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L149)

```solidity
function isUnripe(address unripeToken) public view returns (bool unripe);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `unripeToken` | `address` | WIP         |

| Return Value | Type   | Description |
| ------------ | ------ | ----------- |
| `unripe`     | `bool` | WIP         |

### [Balance Of Underlying](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L153)

```solidity
function balanceOfUnderlying(address unripeToken, address account)
    external
    view
    returns (uint256 underlying);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `unripeToken` | `address` | WIP         |
| `account`     | `address` | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `underlying` | `uint256` | WIP         |

### [Balance Of Penalized Underlying](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L162)

```solidity
function balanceOfPenalizedUnderlying(address unripeToken, address account)
    external
    view
    returns (uint256 underlying);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `unripeToken` | `address` | WIP         |
| `account`     | `address` | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `underlying` | `uint256` | WIP         |

### [Get Recap Funded Percent](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L174)

```solidity
function getRecapFundedPercent(address unripeToken)
    public
    view
    returns (uint256 percent);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `unripeToken` | `address` | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `percent`    | `uint256` | WIP         |

### [Get Percent Penalty](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L187)

```solidity
function getPercentPenalty(address unripeToken)
    external
    view
    returns (uint256 penalty);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `unripeToken` | `address` | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `penalty`    | `uint256` | WIP         |

### [Get Recap Paid Percent](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L195)

```solidity
function getRecapPaidPercent() external view returns (uint256 penalty);
```

WIP

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `penalty`    | `uint256` | WIP         |

### [Get Recap Paid Percent Amount](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L199)

```solidity
function getRecapPaidPercentAmount(uint256 amount)
    private
    view
    returns (uint256 penalty);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `amount`  | `uint256` | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `penalty`    | `uint256` | WIP         |

### [Get Underlying Per Unripe Token](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L207)

```solidity
function getUnderlyingPerUnripeToken(address unripeToken)
    external
    view
    returns (uint256 underlyingPerToken);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `unripeToken` | `address` | WIP         |

| Return Value         | Type      | Description |
| -------------------- | --------- | ----------- |
| `underlyingPerToken` | `uint256` | WIP         |

### [Get Total Underlying](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L219)

```solidity
function getTotalUnderlying(address unripeToken)
    external
    view
    returns (uint256 underlying);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `unripeToken` | `address` | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `underlying` | `uint256` | WIP         |

### [Get Underlying Token](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L238)

```solidity
function getUnderlyingToken(address unripeToken)
    external
    view
    returns (address underlyingToken)
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `unripeToken` | `address` | WIP         |

| Return Value      | Type      | Description |
| ----------------- | --------- | ----------- |
| `underlyingToken` | `address` | WIP         |

## Events

### [Add Unripe Token](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L30) <a href="#event-add-unripe-token" id="event-add-unripe-token"></a>

```solidity
event AddUnripeToken(
    address indexed unripeToken,
    address indexed underlyingToken,
    bytes32 merkleRoot
);
```

WIP

| Parameter         | Type      | Description |
| ----------------- | --------- | ----------- |
| `unripeToken`     | `address` | WIP         |
| `underlyingToken` | `address` | WIP         |
| `merkleRoot`      | `bytes32` | WIP         |

### [Change Underlying](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L36) <a href="#event-change-underlying" id="event-change-underlying"></a>

```solidity
event ChangeUnderlying(address indexed token, int256 underlying);
```

WIP

| Parameter    | Type      | Description |
| ------------ | --------- | ----------- |
| `token`      | `address` | WIP         |
| `underlying` | `int256`  | WIP         |

### [Chop](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L38) <a href="#event-chop" id="event-chop"></a>

```solidity
event Chop(
    address indexed account,
    address indexed token,
    uint256 amount,
    uint256 underlying
);
```

WIP

| Parameter    | Type      | Description |
| ------------ | --------- | ----------- |
| `account`    | `address` | WIP         |
| `token`      | `address` | WIP         |
| `amount`     | `uint256` | WIP         |
| `underlying` | `uint256` | WIP         |

### [Pick](https://github.com/BeanstalkFarms/Beanstalk/blob/9ca85613d40a3883377de0d9377623d49fff5b9c/protocol/contracts/farm/facets/UnripeFacet.sol#L45) <a href="#event-pick" id="event-pick"></a>

```solidity
event Pick(
    address indexed account,
    address indexed token,
    uint256 amount
);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `account` | `address` | WIP         |
| `token`   | `address` | WIP         |
| `amount`  | `uint256` | WIP         |


# Market

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Market will house various DEXs for zero fee trading. For now, there is only the Pod Market, but in the future there may be a zero fee AMM, a zero fee NFT marketplace, etc.

The Pod Market allows Farmers to create, Fill and Cancel Pod Listings and Pod Orders.&#x20;

### Pod Listings

Farmers with Pods can create Pod Listings, which allow other Farmers to buy part or all of their Plots at a given price.

Pod Listings are contained in the following struct:

```solidity
struct PodListing {
    address account;
    uint256 index;
    uint256 start;
    uint256 amount;
    uint24 pricePerPod;
    uint256 maxHarvestableIndex;
    LibTransfer.To mode;
}
```

Pod Listings are created with the `createPodListing` function. Pod Listings can only be created by the owner of the Plot being listed.

When a Pod Listing is created, The `PodListing` struct with the exception of `account` and `index` is encoded and hashed. Beanstalk stores the hash of the listing on-chain in the `s.podListings` state mapping. Pod Listing hashes are stored by index of the corresponding Plot. The Pod Listing struct is emitted in an event upon creation.&#x20;

Pod Listings are Filled with the `fillPodListing` function. The Pod buyer is required to input the `PodListing` struct associated with the Plot being transferred. Beanstalk hashes the `PodListing` data and verifies that the hash is the same as the hash in storage at the corresponding index. If the original Plot owner no longer owns the Plot, then the transaction will fail. If the Fill is successful, Beanstalk then transfers the corresponding part of the Plot to the buyer in exchange for Beans. If the Listing is not empty, the updated Listing is then hashed and stored on-chain.

Pod Listings can be Cancelled at any time with the `cancelPodListing` function. Pod Listings are automatically Cancelled on Harvest, Transfer or if a new Pod Listing is created with the same plot.

### Pod Orders

Pod Orders allow Farmer with Beans to create Orders to buy Plots. An Order specifies a max Place in Line that the Farmer is will to buy Pods at, the price they are willing to by Pods at and the amount they are willing to buy. All Orders are denominated in Beans. Pod Orders are contained in the following struct:

```solidity
struct PodOrder {
    address account;
    uint24 pricePerPod;
    uint256 maxPlaceInLine;
}
```

Pod Orders are created with the `createPodOrder` function. Pod Orders can be created by any Farmer.

When a Pod Order is created, The `PodOrder` struct is encoded and hashed. Beanstalk stores the hash of the Order on-chain in the `s.podOrders` state mapping. The hash is the key in the mapping and the amount in the Order is stored in the hash. When a Pod Order is created, Beans are transferred from the Farmer to Beanstalk equal to the amount of Pods being bought times the Price per Pod in the Order. These Beans are locked in Beanstalk until either the Pod Order creator Cancels the Order or the Order is Filled.

Farmers with Pods can sell Pods to open Pod Orders with the `fillPodOrder` function. The Pod seller is required to input what part of which Plot is being sold and the `PodOrder` struct associated with Order they are filling. Beanstalk hashes the `PodOrder` data and verifies that the hash maps to a non-zero value in `s.podOrders`. The seller is also required to input the Plot being sold as a part of the calldata. If the Fill is successful, the value at the hash key is updated to equal the new amount remaining in the Pod Order.&#x20;

Pod Orders can be Cancelled at anytime with the `cancelPodOrder` function. When an Order is Cancelled, Beanstalk returns the remaining Beans in the Pod Order to the Farmer.


# Marketplace Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Marketplace Facet handles logic for buying and selling Pods on the [Pod Market](https://docs.bean.money/almanac/farm/market#pods).

## Call Functions

### [Create Pod Listing](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L24)

```solidity
function createPodListing(
    uint256 index,
    uint256 start,
    uint256 amount,
    uint24 pricePerPod,
    uint256 maxHarvestableIndex,
    uint256 minFillAmount,
    LibTransfer.To mode
) external payable;
```

WIP

| Parameter             | Type      | Description |
| --------------------- | --------- | ----------- |
| `index`               | `uint256` | WIP         |
| `start`               | `uint256` | WIP         |
| `amount`              | `uint256` | WIP         |
| `pricePerPod`         | `uint24`  | WIP         |
| `maxHarvestableIndex` | `uint256` | WIP         |
| `minFillAmount`       | `uint256` | WIP         |
| `mode`                | `To`      | WIP         |

### [Create Pod Listing V2](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L44)

```solidity
function createPodListingV2(
    uint256 index,
    uint256 start,
    uint256 amount,
    uint256 maxHarvestableIndex,
    uint256 minFillAmount,
    bytes calldata pricingFunction,
    LibTransfer.To mode
) external payable;
```

WIP

| Parameter             | Type      | Description |
| --------------------- | --------- | ----------- |
| `index`               | `uint256` | WIP         |
| `start`               | `uint256` | WIP         |
| `amount`              | `uint256` | WIP         |
| `maxHarvestableIndex` | `uint256` | WIP         |
| `minFillAmount`       | `uint256` | WIP         |
| `pricingFunction`     | `bytes`   | WIP         |
| `mode`                | `To`      | WIP         |

### [Fill Pod Listing](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L65)

```solidity
function fillPodListing(
    PodListing calldata l,
    uint256 beanAmount,
    LibTransfer.From mode
) external payable;
```

WIP

| Parameter    | Type         | Description |
| ------------ | ------------ | ----------- |
| `l`          | `PodListing` | WIP         |
| `beanAmount` | `uint256`    | WIP         |
| `mode`       | `From`       | WIP         |

### [Fill Pod Listing V2](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L81)

```solidity
function fillPodListingV2(
    PodListing calldata l,
    uint256 beanAmount,
    bytes calldata pricingFunction,
    LibTransfer.From mode
) external payable;
```

WIP

| Parameter         | Type         | Description |
| ----------------- | ------------ | ----------- |
| `l`               | `PodListing` | WIP         |
| `beanAmount`      | `uint256`    | WIP         |
| `pricingFunction` | `bytes`      | WIP         |
| `mode`            | `From`       | WIP         |

### [Cancel Pod Listing](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L99)

```solidity
function cancelPodListing(uint256 index) external payable;
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `index`   | `uint256` | WIP         |

### [Create Pod Order](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L113)

```solidity
function createPodOrder(
    uint256 beanAmount,
    uint24 pricePerPod,
    uint256 maxPlaceInLine,
    uint256 minFillAmount,
    LibTransfer.From mode
) external payable returns (bytes32 id);
```

WIP

| Parameter        | Type      | Description |
| ---------------- | --------- | ----------- |
| `beanAmount`     | `uint256` | WIP         |
| `pricePerPod`    | `uint24`  | WIP         |
| `maxPlaceInLine` | `uint256` | WIP         |
| `minFillAmount`  | `uint256` | WIP         |
| `mode`           | `From`    | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `id`         | `bytes32` | WIP         |

### [Create Pod Order V2](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L124)

```solidity
function createPodOrderV2(
    uint256 beanAmount,
    uint256 maxPlaceInLine,
    uint256 minFillAmount,
    bytes calldata pricingFunction,
    LibTransfer.From mode
) external payable returns (bytes32 id);
```

| Parameter         | Type      | Description |
| ----------------- | --------- | ----------- |
| `beanAmount`      | `uint256` | WIP         |
| `maxPlaceInLine`  | `uint256` | WIP         |
| `minFillAmount`   | `uint256` | WIP         |
| `pricingFunction` | `bytes`   | WIP         |
| `mode`            | `From`    | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `id`         | `bytes32` | WIP         |

### [Fill Pod Order](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L136)

```solidity
function fillPodOrder(
    PodOrder calldata o,
    uint256 index,
    uint256 start,
    uint256 amount,
    LibTransfer.To mode
) external payable;
```

WIP

| Parameter | Type       | Description |
| --------- | ---------- | ----------- |
| `o`       | `PodOrder` | WIP         |
| `index`   | `uint256`  | WIP         |
| `start`   | `uint256`  | WIP         |
| `amount`  | `uint256`  | WIP         |
| `mode`    | `To`       | WIP         |

### [Fill Pod Order V2](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L146)

```solidity
function fillPodOrderV2(
    PodOrder calldata o,
    uint256 index,
    uint256 start,
    uint256 amount,
    bytes calldata pricingFunction,
    LibTransfer.To mode
) external payable;
```

WIP

| Parameter         | Type       | Description |
| ----------------- | ---------- | ----------- |
| `o`               | `PodOrder` | WIP         |
| `index`           | `uint256`  | WIP         |
| `start`           | `uint256`  | WIP         |
| `amount`          | `uint256`  | WIP         |
| `pricingFunction` | `bytes`    | WIP         |
| `mode`            | `To`       | WIP         |

### [Cancel Pod Order](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L158)

```solidity
function cancelPodOrder(
    uint24 pricePerPod,
    uint256 maxPlaceInLine,
    uint256 minFillAmount,
    LibTransfer.To mode
) external payable;
```

WIP

| Parameter        | Type      | Description |
| ---------------- | --------- | ----------- |
| `pricePerPod`    | `uint24`  | WIP         |
| `maxPlaceInLine` | `uint256` | WIP         |
| `minFillAmount`  | `uint256` | WIP         |
| `mode`           | `To`      | WIP         |

### [Cancel Pod Order V2](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L167)

```solidity
function cancelPodOrderV2(
    uint256 maxPlaceInLine,
    uint256 minFillAmount,
    bytes calldata pricingFunction,
    LibTransfer.To mode
) external payable;
```

WIP

| Parameter         | Type      | Description |
| ----------------- | --------- | ----------- |
| `maxPlaceInLine`  | `uint256` | WIP         |
| `minFillAmount`   | `uint256` | WIP         |
| `pricingFunction` | `bytes`   | WIP         |
| `mode`            | `To`      | WIP         |

### [Transfer Plot](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L219)

```solidity
function transferPlot(
    address sender,
    address recipient,
    uint256 id,
    uint256 start,
    uint256 end
) external payable nonReentrant;
```

WIP

| Parameter   | Type      | Description |
| ----------- | --------- | ----------- |
| `sender`    | `address` | WIP         |
| `recipient` | `address` | WIP         |
| `id`        | `uint256` | WIP         |
| `start`     | `uint256` | WIP         |
| `end`       | `uint256` | WIP         |

### [Approve Pods](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L244)

```solidity
function approvePods(address spender, uint256 amount)
    external
    payable
    nonReentrant;
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `spender` | `address` | WIP         |
| `amount`  | `uint256` | WIP         |

### [Get Amount Pods From Fill Listing V2](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/Listing.sol#L258)

```solidity
function getAmountPodsFromFillListingV2(
    uint256 placeInLine, 
    uint256 podListingAmount,
    uint256 fillBeanAmount,
    bytes calldata pricingFunction
) public pure returns (uint256 amount);
```

WIP

| Parameter          | Type      | Description |
| ------------------ | --------- | ----------- |
| `placeInLine`      | `uint256` | WIP         |
| `podListingAmount` | `uint256` | WIP         |
| `fillBeanAmount`   | `uint256` | WIP         |
| `pricingFunction`  | `bytes`   | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `amount`     | `uint256` | WIP         |

### [Get Amount Beans To Fill Order V2](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/Order.sol#L191)

```solidity
function getAmountBeansToFillOrderV2(
    uint256 placeInLine, 
    uint256 amountPodsFromOrder,
    bytes calldata pricingFunction
) public pure returns (uint256 beanAmount);
```

WIP

| Parameter             | Type      | Description |
| --------------------- | --------- | ----------- |
| `placeInLine`         | `uint256` | WIP         |
| `amountPodsFromOrder` | `uint256` | WIP         |
| `pricingFunction`     | `bytes`   | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `beanAmount` | `uint256` | WIP         |

## View Functions

### [Pod Order](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L178)

```solidity
function podOrder(
    address account,
    uint24 pricePerPod,
    uint256 maxPlaceInLine,
    uint256 minFillAmount
) external view returns (uint256);
```

WIP

| Parameter        | Type      | Description |
| ---------------- | --------- | ----------- |
| `account`        | `address` | WIP         |
| `pricePerPod`    | `uint24`  | WIP         |
| `maxPlaceInLine` | `uint256` | WIP         |
| `minFillAmount`  | `uint256` | WIP         |

| Return Value | Description |
| ------------ | ----------- |
| `uint256`    | WIP         |

### [Pod Order V2](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L194)

```solidity
function podOrderV2(
    address account,
    uint256 maxPlaceInLine,
    uint256 minFillAmount,
    bytes calldata pricingFunction
) external view returns (uint256);
```

WIP

| Parameter         | Type      | Description |
| ----------------- | --------- | ----------- |
| `account`         | `address` | WIP         |
| `maxPlaceInLine`  | `uint256` | WIP         |
| `minFillAmount`   | `uint256` | WIP         |
| `pricingFunction` | `bytes`   | WIP         |

| Return Type | Description |
| ----------- | ----------- |
| `uint256`   | WIP         |

### [Pod Order By Id](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L211)

```solidity
function podOrderById(bytes32 id) external view returns (uint256);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `id`      | `bytes32` | WIP         |

| Return Type | Description |
| ----------- | ----------- |
| `uint256`   | WIP         |

### [Pod Listing](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/MarketplaceFacet.sol#L104)

```solidity
function podListing(uint256 index) external view returns (bytes32);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `index`   | `uint256` | WIP         |

| Return Type | Description |
| ----------- | ----------- |
| `bytes32`   | WIP         |

### [Allowance Pods](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/PodTransfer.sol#L41)

```solidity
function allowancePods(address owner, address spender)
    public
    view
    returns (uint256);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `owner`   | `address` | WIP         |
| `spender` | `address` | WIP         |

| Return Type | Description |
| ----------- | ----------- |
| `uint256`   | WIP         |

## Events

### [Pod Listing Created](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/Listing.sol#L32) <a href="#event-pod-listing-created" id="event-pod-listing-created"></a>

```solidity
event PodListingCreated(
    address indexed account, 
    uint256 index, 
    uint256 start, 
    uint256 amount, 
    uint24 pricePerPod, 
    uint256 maxHarvestableIndex, 
    uint256 minFillAmount,
    bytes pricingFunction,
    LibTransfer.To mode,
    LibPolynomial.PriceType pricingType
);
```

WIP

| Parameter             | Type        | Description |
| --------------------- | ----------- | ----------- |
| `account`             | `address`   | WIP         |
| `index`               | `uint256`   | WIP         |
| `start`               | `uint256`   | WIP         |
| `amount`              | `uint256`   | WIP         |
| `pricePerPod`         | `uint24`    | WIP         |
| `maxHarvestableIndex` | `uint256`   | WIP         |
| `minFillAmount`       | `uint256`   | WIP         |
| `pricingFunction`     | `bytes`     | WIP         |
| `mode`                | `To`        | WIP         |
| `pricingType`         | `PriceType` | WIP         |

### [Pod Listing Filled](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/Listing.sol#L45) <a href="#event-pod-listing-filled" id="event-pod-listing-filled"></a>

```solidity
event PodListingFilled(
    address indexed from,
    address indexed to,
    uint256 index,
    uint256 start,
    uint256 amount,
    uint256 costInBeans
);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `from`        | `address` | WIP         |
| `to`          | `address` | WIP         |
| `index`       | `uint256` | WIP         |
| `start`       | `uint256` | WIP         |
| `amount`      | `uint256` | WIP         |
| `costInBeans` | `uint256` | WIP         |

### [Pod Listing Cancelled](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/Listing.sol#L54) <a href="#event-pod-listing-cancelled" id="event-pod-listing-cancelled"></a>

```solidity
event PodListingCancelled(address indexed account, uint256 index);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `account` | `address` | WIP         |
| `index`   | `uint256` | WIP         |

### [Pod Order Created](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/Order.sol#L26) <a href="#event-pod-order-created" id="event-pod-order-created"></a>

```solidity
event PodOrderCreated(
    address indexed account,
    bytes32 id,
    uint256 amount,
    uint24 pricePerPod,
    uint256 maxPlaceInLine,
    uint256 minFillAmount,
    bytes pricingFunction,
    LibPolynomial.PriceType priceType
);
```

WIP

| Parameter         | Type        | Description |
| ----------------- | ----------- | ----------- |
| `account`         | `address`   | WIP         |
| `id`              | `bytes32`   | WIP         |
| `amount`          | `uint256`   | WIP         |
| `pricePerPod`     | `uint24`    | WIP         |
| `maxPlaceInLine`  | `uint256`   | WIP         |
| `minFillAmount`   | `uint256`   | WIP         |
| `pricingFunction` | `bytes`     | WIP         |
| `priceType`       | `PriceType` | WIP         |

### [Pod Order Filled](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/Order.sol#L37) <a href="#event-pod-order-filled" id="event-pod-order-filled"></a>

```solidity
event PodOrderFilled(
    address indexed from,
    address indexed to,
    bytes32 id,
    uint256 index,
    uint256 start,
    uint256 amount,
    uint256 costInBeans
);
```

WIP

| Parameter     | Type      | Description |
| ------------- | --------- | ----------- |
| `from`        | `address` | WIP         |
| `to`          | `address` | WIP         |
| `id`          | `bytes32` | WIP         |
| `index`       | `uint256` | WIP         |
| `start`       | `uint256` | WIP         |
| `amount`      | `uint256` | WIP         |
| `costInBeans` | `uint256` | WIP         |

### [Pod Order Cancelled](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/Order.sol#L47) <a href="#event-pod-order-cancelled" id="event-pod-order-cancelled"></a>

```solidity
event PodOrderCancelled(address indexed account, bytes32 id);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `account` | `address` | WIP         |
| `id`      | `bytes32` | WIP         |

### [Plot Transfer](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/PodTransfer.sol#L25) <a href="#event-plot-transfer" id="event-plot-transfer"></a>

```solidity
event PlotTransfer(
    address indexed from,
    address indexed to,
    uint256 indexed id,
    uint256 pods
);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `from`    | `address` | WIP         |
| `to`      | `address` | WIP         |
| `id`      | `uint256` | WIP         |
| `pods`    | `uint256` | WIP         |

### [Pod Approval](https://github.com/BeanstalkFarms/Beanstalk/blob/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2/protocol/contracts/farm/facets/MarketplaceFacet/PodTransfer.sol#L31) <a href="#event-pod-approval" id="event-pod-approval"></a>

```solidity
event PodApproval(
    address indexed owner,
    address indexed spender,
    uint256 pods
);
```

WIP

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `owner`   | `address` | WIP         |
| `spender` | `address` | WIP         |
| `pods`    | `uint256` | WIP         |


# Farm

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Farm allows Farmers to call multiple functions in a single transaction and use assets between different functions in a composable manner, without those assets every leaving Beanstalk (thanks to [Internal Balances](/developers/overview/internal-balances)). Internal Balances allow the `farm` function to use the output of a function in the next function call.

The Farm also provides composable Beanstalk-native interfaces for other DeFi protocols. This allows Farmers to call supported external protocols through the `farm` function and leverage Internal Balances. The current protocols that the Farm supports are:

* WETH -> wrapping and unwrapping; and
* Curve -> swapping and adding/removing liquidity.
* Pipeline -> performing an arbitrary series of actions in the EVM in a single transaction.

The Farm creates an interface to transfer ERC-20 tokens between Internal and External Balances, as well as between Farmers through the `transferToken` function.

The Farm consists of 5 facets:

* [Farm Facet](/developers/protocol/depot/farm-facet)
* [Depot Facet](/developers/protocol/depot/depot-facet)
* [Token Facet](/developers/protocol/depot/token-facet)
* [Token Support Facet](/developers/protocol/depot/token-support-facet)
* [Curve Facet](/developers/protocol/depot/curve-facet)


# Farm Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Farm Facet allows Farmers to perform multiple Beanstalk functions calls in a single transaction using `farm` calls.

## Call Functions

### [Farm](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/FarmFacet.sol#L35)

```solidity
function farm(bytes[] calldata data)
    external
    payable
    withEth
    returns (bytes[] memory results);
```

Loops through the list of encoded selectors in `data` and performs a `delegateCall` on each of them.

| Parameter | Type      | Description                                      |
| --------- | --------- | ------------------------------------------------ |
| `data`    | `bytes[]` | The encoded function data for each of the calls. |

| Return Value | Type      | Description                             |
| ------------ | --------- | --------------------------------------- |
| `results`    | `bytes[]` | The return data from each of the calls. |

### [Advanced Farm](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/FarmFacet.sol#L53)

```solidity
function advancedFarm(AdvancedFarmCall[] calldata data)
    external
    payable
    withEth
    returns (bytes[] memory results);
```

Execute multiple AdvancedFarmCalls.

| Parameter | Type                 | Description                                                               |
| --------- | -------------------- | ------------------------------------------------------------------------- |
| `data`    | `AdvancedFarmCall[]` | The encoded function data for each of the calls to make to this contract. |

| Return Value | Type      | Description                                              |
| ------------ | --------- | -------------------------------------------------------- |
| `results`    | `bytes[]` | The results from each of the calls passed in via `data`. |

## View Functions

None.

## Events

None.


# Depot Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Depot Facet wraps Pipeline's `pipe` functions to facilitate the loading of non-Ether assets in [Pipeline](https://evmpipeline.org/).

## Call Functions

### [Pipe](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/DepotFacet.sol#L30)

```solidity
function pipe(PipeCall calldata p)
    external
    payable
    returns (bytes memory result);
```

Pipe a `PipeCall` through Pipeline.

| Parameter | Type       | Description                          |
| --------- | ---------- | ------------------------------------ |
| `p`       | `PipeCall` | `PipeCall` to pipe through Pipeline. |

| Return Value | Type    | Description              |
| ------------ | ------- | ------------------------ |
| `result`     | `bytes` | `PipeCall` return value. |

### [Multi Pipe](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/DepotFacet.sol#L44)

```solidity
function multiPipe(PipeCall[] calldata pipes)
    external
    payable
    returns (bytes[] memory results);
```

Pipe multiple `PipeCalls` through Pipeline. Does not support sending Ether in the call.

| Parameter | Type         | Description                                   |
| --------- | ------------ | --------------------------------------------- |
| `pipes`   | `PipeCall[]` | List of `PipeCalls` to pipe through Pipeline. |

| Return Value | Type      | Description                                 |
| ------------ | --------- | ------------------------------------------- |
| `results`    | `bytes[]` | List of return values from each `PipeCall`. |

### [Advanced Pipe](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/DepotFacet.sol#L57)

```solidity
function advancedPipe(AdvancedPipeCall[] calldata pipes, uint256 value)
    external
    payable
    returns (bytes[] memory results);
```

Pipe multiple `AdvancedPipeCalls` through Pipeline.

| Parameter | Type                 | Description                                           |
| --------- | -------------------- | ----------------------------------------------------- |
| `pipes`   | `AdvancedPipeCall[]` | List of `AdvancedPipeCalls` to pipe through Pipeline. |
| `value`   | `uint256`            |                                                       |

| Return Value | Type      | Description                                         |
| ------------ | --------- | --------------------------------------------------- |
| `results`    | `bytes[]` | List of return values from each `AdvancedPipeCall`. |

### [Ether Pipe](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/DepotFacet.sol#L72)

```solidity
function etherPipe(PipeCall calldata p, uint256 value)
    external
    payable
    returns (bytes memory result);
```

Pipe a `PipeCall` through Pipeline with an Ether value.

| Parameter | Type       | Description                          |
| --------- | ---------- | ------------------------------------ |
| `p`       | `PipeCall` | `PipeCall` to pipe through Pipeline. |
| `value`   | `uint256`  | Ether value to send in `Pipecall`.   |

| Return Value | Type    | Description              |
| ------------ | ------- | ------------------------ |
| `result`     | `bytes` | `PipeCall` return value. |

## View Functions

### [Read Pipe](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/DepotFacet.sol#L86)

```solidity
function readPipe(PipeCall calldata p)
    external
    view
    returns (bytes memory result);
```

Return the return value of a `PipeCall` without executing it.

| Parameter | Type       | Description                              |
| --------- | ---------- | ---------------------------------------- |
| `p`       | `PipeCall` | `PipeCall` to execute with a staticcall. |

| Return Value | Type    | Description              |
| ------------ | ------- | ------------------------ |
| `result`     | `bytes` | `PipeCall` return value. |

## Events

None.


# Token Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Token Facet handles the transfers of assets outside the Silo.

## Call Functions

### Transfers

### [Transfer Token](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L56)

```solidity
function transferToken(
    IERC20 token,
    address recipient,
    uint256 amount,
    LibTransfer.From fromMode,
    LibTransfer.To toMode
) external payable;
```

Transfers an asset from a Farmer's Internal and/or External Balance to a Farmer's Internal or External Balance.

| Parameter   | Type      | Description                                                                                                          |
| ----------- | --------- | -------------------------------------------------------------------------------------------------------------------- |
| `token`     | `IERC20`  | The token to be transferred.                                                                                         |
| `recipient` | `address` | The recipient of the transferred tokens (can be `msg.sender`).                                                       |
| `amount`    | `uint256` | The amount of tokens to be transferred.                                                                              |
| `fromMode`  | `From`    | Specifies what balance to receive the tokens from (see [Internal Balances](/developers/overview/internal-balances)). |
| `toMode`    | `To`      | Specifies what balance to send the tokens to (see [Internal Balances](/developers/overview/internal-balances)).      |

### [Transfer Internal Token From](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L77)

```solidity
function transferInternalTokenFrom(
    IERC20 token,
    address sender,
    address recipient,
    uint256 amount,
    LibTransfer.To toMode
) external payable nonReentrant;
```

WIP

| Parameter   | Type      | Description |
| ----------- | --------- | ----------- |
| `token`     | `IERC20`  | WIP         |
| `sender`    | `address` | WIP         |
| `recipient` | `address` | WIP         |
| `amount`    | `uint256` | WIP         |
| `toMode`    | `To`      | WIP         |

### Approvals

### [Approve Token](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L104)

```solidity
function approveToken(
    address spender,
    IERC20 token,
    uint256 amount
) external payable nonReentrant;
```

Wraps Ether into WETH.

| Parameter | Type      | Description                                                                                                   |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------- |
| `amount`  | `uint256` | The amount of Ether to wrap into WETH. Must be `<= msg.value`.                                                |
| `toMode`  | `To`      | Specifies what balance to send the WETH to (see [Internal Balances](/developers/overview/internal-balances)). |

### [Increase Token Allowance](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L115)

```solidity
function increaseTokenAllowance(
    address spender,
    IERC20 token,
    uint256 addedValue
) public virtual nonReentrant returns (bool);
```

Wraps Ether into WETH.

| Parameter | Type      | Description                                                                                                   |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------- |
| `amount`  | `uint256` | The amount of Ether to wrap into WETH. Must be `<= msg.value`.                                                |
| `toMode`  | `To`      | Specifies what balance to send the WETH to (see [Internal Balances](/developers/overview/internal-balances)). |

### [Decrease Token Allowance](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L133)

```solidity
function decreaseTokenAllowance(
    address spender,
    IERC20 token,
    uint256 subtractedValue
) public virtual nonReentrant returns (bool);
```

Wraps Ether into WETH.

| Parameter | Type      | Description                                                                                                   |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------- |
| `amount`  | `uint256` | The amount of Ether to wrap into WETH. Must be `<= msg.value`.                                                |
| `toMode`  | `To`      | Specifies what balance to send the WETH to (see [Internal Balances](/developers/overview/internal-balances)). |

### [Token Allowance](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L159)

```solidity
function tokenAllowance(
    address account,
    address spender,
    IERC20 token
) public view virtual returns (uint256);
```

Wraps Ether into WETH.

| Parameter | Type      | Description                                                                                                   |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------- |
| `amount`  | `uint256` | The amount of Ether to wrap into WETH. Must be `<= msg.value`.                                                |
| `toMode`  | `To`      | Specifies what balance to send the WETH to (see [Internal Balances](/developers/overview/internal-balances)). |

### Permits

### [Permit Token](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L172)

```solidity
function permitToken(
    address owner,
    address spender,
    address token,
    uint256 value,
    uint256 deadline,
    uint8 v,
    bytes32 r,
    bytes32 s
) external payable nonReentrant;
```

Wraps Ether into WETH.

| Parameter | Type      | Description                                                                                                   |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------- |
| `amount`  | `uint256` | The amount of Ether to wrap into WETH. Must be `<= msg.value`.                                                |
| `toMode`  | `To`      | Specifies what balance to send the WETH to (see [Internal Balances](/developers/overview/internal-balances)). |

### [Token Permit Nonces](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L189)

```solidity
function tokenPermitNonces(address owner)
    public
    view
    virtual
    returns (uint256);
```

Wraps Ether into WETH.

| Parameter | Type      | Description                                                                                                   |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------- |
| `amount`  | `uint256` | The amount of Ether to wrap into WETH. Must be `<= msg.value`.                                                |
| `toMode`  | `To`      | Specifies what balance to send the WETH to (see [Internal Balances](/developers/overview/internal-balances)). |

### [Token Permit Domain Separator](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L236)

```solidity
function tokenPermitDomainSeparator() external view returns (bytes32);
```

Wraps Ether into WETH.

| Parameter | Type      | Description                                                                                                   |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------- |
| `amount`  | `uint256` | The amount of Ether to wrap into WETH. Must be `<= msg.value`.                                                |
| `toMode`  | `To`      | Specifies what balance to send the WETH to (see [Internal Balances](/developers/overview/internal-balances)). |

### ERC-1155

### [On ERC-1155 Received](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L206)

```solidity
function onERC1155Received(
    address,
    address,
    uint256,
    uint256,
    bytes calldata
) external pure override returns (bytes4);
```

Wraps Ether into WETH.

| Parameter | Type      | Description                                                                                                   |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------- |
| `amount`  | `uint256` | The amount of Ether to wrap into WETH. Must be `<= msg.value`.                                                |
| `toMode`  | `To`      | Specifies what balance to send the WETH to (see [Internal Balances](/developers/overview/internal-balances)). |

### [On ERC-1155 Batch Received](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L222)

```solidity
function onERC1155BatchReceived(
    address,
    address,
    uint256[] calldata,
    uint256[] calldata,
    bytes calldata
) external pure override returns (bytes4);
```

Wraps Ether into WETH.

| Parameter | Type      | Description                                                                                                   |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------- |
| `amount`  | `uint256` | The amount of Ether to wrap into WETH. Must be `<= msg.value`.                                                |
| `toMode`  | `To`      | Specifies what balance to send the WETH to (see [Internal Balances](/developers/overview/internal-balances)). |

### WETH

### [Wrap Ether](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/TokenFacet.sol#L178)

```solidity
function wrapEth(uint256 amount, LibTransfer.To mode) external payable;
```

Wraps Ether into WETH.

| Parameter | Type      | Description                                                                                                   |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------- |
| `amount`  | `uint256` | The amount of Ether to wrap into WETH. Must be `<= msg.value`.                                                |
| `toMode`  | `To`      | Specifies what balance to send the WETH to (see [Internal Balances](/developers/overview/internal-balances)). |

### [Unwrap Ether](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/TokenFacet.sol#L183)

```solidity
function unwrapEth(uint256 amount, LibTransfer.From mode) external payable;
```

Unwraps WETH into Ether.

| Parameter  | Type      | Description                                                                                                        |
| ---------- | --------- | ------------------------------------------------------------------------------------------------------------------ |
| `amount`   | `uint256` | The amount of WETH to unwrap into Ether.                                                                           |
| `fromMode` | `From`    | Specifies what balance to receive the WETH from (see [Internal Balances](/developers/overview/internal-balances)). |

## View Functions

### [Get Internal Balance](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L262)

```solidity
function getInternalBalance(address account, IERC20 token)
    public
    view
    returns (uint256 balance);
```

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `account` | `address` | WIP         |
| `token`   | `IERC20`  | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `balance`    | `uint256` | WIP         |

### [Get Internal Balances](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L273)

```solidity
function getInternalBalances(address account, IERC20[] memory tokens)
    external
    view
    returns (uint256[] memory balances);
```

| Parameter | Type       | Description |
| --------- | ---------- | ----------- |
| `account` | `address`  | WIP         |
| `tokens`  | `IERC20[]` | WIP         |

| Return Value | Type        | Description |
| ------------ | ----------- | ----------- |
| `balances`   | `uint256[]` | WIP         |

### [Get External Balance](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L289)

```solidity
function getExternalBalance(address account, IERC20 token)
    public
    view
    returns (uint256 balance);
```

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `account` | `address` | WIP         |
| `token`   | `IERC20`  | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `balance`    | `uint256` | WIP         |

### [Get External Balances](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L300)

```solidity
function getExternalBalances(address account, IERC20[] memory tokens)
    external
    view
    returns (uint256[] memory balances);
```

| Parameter | Type       | Description |
| --------- | ---------- | ----------- |
| `account` | `address`  | WIP         |
| `tokens`  | `IERC20[]` | WIP         |

| Return Value | Type        | Description |
| ------------ | ----------- | ----------- |
| `balances`   | `uint256[]` | WIP         |

### [Get Balance](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L316)

```solidity
function getBalance(address account, IERC20 token)
    public
    view
    returns (uint256 balance);
```

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `account` | `address` | WIP         |
| `token`   | `IERC20`  | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `balance`    | `uint256` | WIP         |

### [Get Balances](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L328)

```solidity
function getBalances(address account, IERC20[] memory tokens)
    external
    view
    returns (uint256[] memory balances);
```

| Parameter | Type       | Description |
| --------- | ---------- | ----------- |
| `account` | `address`  | WIP         |
| `tokens`  | `IERC20[]` | WIP         |

| Return Value | Type        | Description |
| ------------ | ----------- | ----------- |
| `balances`   | `uint256[]` | WIP         |

### [Get All Balance](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L343)

```solidity
function getAllBalance(address account, IERC20 token)
    public
    view
    returns (Balance memory b);
```

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `account` | `address` | WIP         |
| `token`   | `IERC20`  | WIP         |

| Return Value | Type      | Description |
| ------------ | --------- | ----------- |
| `b`          | `Balance` | WIP         |

### [Get All Balances](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L357)

```solidity
function getAllBalances(address account, IERC20[] memory tokens)
    external
    view
    returns (Balance[] memory balances);
```

| Parameter | Type       | Description |
| --------- | ---------- | ----------- |
| `account` | `address`  | WIP         |
| `tokens`  | `IERC20[]` | WIP         |

| Return Value | Type        | Description |
| ------------ | ----------- | ----------- |
| `balances`   | `Balance[]` | WIP         |

## Events

### [Internal Balance Changed](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L31) <a href="#event-internal-balance-changed" id="event-internal-balance-changed"></a>

```solidity
event InternalBalanceChanged(
    address indexed account,
    IERC20 indexed token,
    int256 delta
);
```

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `account` | `address` | WIP         |
| `token`   | `IERC20`  | WIP         |
| `delta`   | `int256`  | WIP         |

### [Token Approval](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/farm/TokenFacet.sol#L37) <a href="#event-token-approval" id="event-token-approval"></a>

```solidity
event TokenApproval(
    address indexed owner,
    address indexed spender,
    IERC20 token,
    uint256 amount
);
```

| Parameter | Type      | Description |
| --------- | --------- | ----------- |
| `owner`   | `address` | WIP         |
| `spender` | `address` | WIP         |
| `token`   | `IERC20`  | WIP         |
| `amount`  | `uint256` | WIP         |


# Token Support Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Token Support Facet handles permits for ERC-20 and ERC-721 tokens and transfers for ERC-721 and ERC-1155 tokens.

## Call Functions

### [Permit ERC-20](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/TokenSupportFacet.sol#L30)

```solidity
function permitERC20(
    IERC20Permit token,
    address owner,
    address spender,
    uint256 value,
    uint256 deadline,
    uint8 v,
    bytes32 r,
    bytes32 s
) public payable;
```

`permitERC20` is a wrapper function for permit of [ERC20Permit](https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#ERC20Permit-permit-address-address-uint256-uint256-uint8-bytes32-bytes32-) token.

| Parameter  | Type           | Description                           |
| ---------- | -------------- | ------------------------------------- |
| `token`    | `IERC20Permit` | Token to permit.                      |
| `owner`    | `address`      | Owner of the token.                   |
| `spender`  | `address`      | Address to permit to spend the token. |
| `value`    | `uint256`      | Token amount to permit.               |
| `deadline` | `uint256`      | Expiration of signature (Unix time)   |
| `v`        | `uint8`        | Recovery ID.                          |
| `r`        | `bytes32`      | ECDSA signature output.               |
| `s`        | `bytes32`      | ECDSA signature output.               |

### [Transfer ERC-721](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/TokenSupportFacet.sol#L53)

```solidity
function transferERC721(
    IERC721 token,
    address to,
    uint256 id
) external payable;
```

Execute an ERC-721 token transfer.

| Parameter | Type      | Description                      |
| --------- | --------- | -------------------------------- |
| `token`   | `IERC721` | Token address of the ERC-721.    |
| `to`      | `address` | Address being transferred to.    |
| `id`      | `uint256` | ID of ERC-721 token to transfer. |

### [Permit ERC-721](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/TokenSupportFacet.sol#L65)

```solidity
function permitERC721(
    IERC4494 token,
    address spender,
    uint256 tokenId,
    uint256 deadline,
    bytes memory sig
) external payable;
```

Execute a permit for an ERC-721 token.

| Parameter  | Type       | Description                                                                                                       |
| ---------- | ---------- | ----------------------------------------------------------------------------------------------------------------- |
| `token`    | `IERC4494` | Token address to permit.                                                                                          |
| `spender`  | `address`  | Address to permit to spend the token.                                                                             |
| `tokenId`  | `uint256`  | ID of `token` to permit.                                                                                          |
| `deadline` | `uint256`  | Expiration of signature (Unix time).                                                                              |
| `sig`      | `bytes`    | A valid `secp256k1` or [EIP-2098](https://eips.ethereum.org/EIPS/eip-2098) signature from owner of the `tokenId`. |

### [Transfer ERC-1155](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/TokenSupportFacet.sol#L85)

```solidity
function transferERC1155(
    IERC1155 token,
    address to,
    uint256 id,
    uint256 value
) external payable;
```

Execute an ERC-1155 token transfer of a single ID.

| Parameter | Type       | Description                                        |
| --------- | ---------- | -------------------------------------------------- |
| `token`   | `IERC1155` | Token address of the ERC-1155.                     |
| `to`      | `address`  | Address being transferred to.                      |
| `id`      | `uint256`  | ID of the ERC-1155 token.                          |
| `value`   | `uint256`  | Number of the ERC-1155 tokens at `id` to transfer. |

### [Batch Transfer ERC-1155](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/TokenSupportFacet.sol#L98)

```solidity
function batchTransferERC1155(
    IERC1155 token,
    address to,
    uint256[] calldata ids,
    uint256[] calldata values
) external payable;
```

Execute an ERC-1155 token transfer of multiple IDs.

| Parameter | Type        | Description                                        |
| --------- | ----------- | -------------------------------------------------- |
| `token`   | `IERC1155`  | Token address of the ERC-1155.                     |
| `to`      | `address`   | Address being transferred to.                      |
| `ids`     | `uint256[]` | Array of IDs of the ERC-155 token.                 |
| `values`  | `uint256[]` | Array of amounts of ERC-1155s at `id` to transfer. |

## View Functions

None.

## Events

None.


# Curve Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Curve Facet handles swapping in, adding liquidity to, and removing liquidity from Curve pools without assets leaving Beanstalk.

## Call Functions

### [Exchange](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/CurveFacet.sol#L33)

```solidity
function exchange(
    address pool,
    address registry,
    address fromToken,
    address toToken,
    uint256 amountIn,
    uint256 minAmountOut,
    LibTransfer.From fromMode,
    LibTransfer.To toMode
) external payable nonReentrant;
```

Swaps a token for another token in a Curve base, meta, plain or crypto pool. Slippage is tolerated on the amount out. It also verifies that the pool exists in the Curve Factory. This function does not support underlying tokens.

* The stable pair Curve Factory can be found at: [`0xB9fC157394Af804a3578134A6585C0dc9cc990d4`](https://etherscan.io/address/0xB9fC157394Af804a3578134A6585C0dc9cc990d4)
* The non-stable Curve factory can be found at: [`0x0959158b6040D32d04c301A72CBFD6b39E21c9AE`](https://etherscan.io/address/0x0959158b6040D32d04c301A72CBFD6b39E21c9AE)

| Parameter      | Type      | Description                                                                                                          |
| -------------- | --------- | -------------------------------------------------------------------------------------------------------------------- |
| `pool`         | `address` | The address of the pool to exchange in. The pool must be registered in one of the Curve Factories.                   |
| `registry`     | `address` | The Curve Registry to query `pool` data from.                                                                        |
| `fromToken`    | `address` | The token to swap from.                                                                                              |
| `toToken`      | `address` | The token to swap to.                                                                                                |
| `amountIn`     | `uint256` | The amount to swap from.                                                                                             |
| `minAmountOut` | `uint256` | The minimum amount to receive from the swap.                                                                         |
| `fromMode`     | `From`    | Specifies what balance to receive the tokens from (see [Internal Balances](/developers/overview/internal-balances)). |
| `toMode`       | `To`      | Specifies what balance to send the tokens to (see [Internal Balances](/developers/overview/internal-balances)).      |

### [Exchange Underlying](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/CurveFacet.sol#L68)

```solidity
function exchangeUnderlying(
    address pool,
    address fromToken,
    address toToken,
    uint256 amountIn,
    uint256 minAmountOut,
    LibTransfer.From fromMode,
    LibTransfer.To toMode
) external payable nonReentrant;
```

Swaps an underlying token for another underlying token in a Curve metapool. In a Curve metapool, one of the tokens is an LP token of another pool. Underlying tokens include the non-LP token in the pool as well as the tokens in the pool that the LP token belongs to. For example, in the [BEAN:3CRV metapool](https://curve.fi/factory/152), the underlying tokens are Bean, USDC, Tether and Dai.

Slippage is tolerated on the amount out. This function verifies that the pool exists in the Curve Factory.

| Parameter      | Type      | Description                                                                                                          |
| -------------- | --------- | -------------------------------------------------------------------------------------------------------------------- |
| `pool`         | `address` | The address of the pool to exchange in. The pool must be registered in one of the Curve Factories.                   |
| `fromToken`    | `address` | The underlying token to swap from.                                                                                   |
| `toToken`      | `address` | The underlying token to swap to.                                                                                     |
| `amountIn`     | `uint256` | The amount to swap from.                                                                                             |
| `minAmountOut` | `uint256` | The minimum amount to receive from the swap.                                                                         |
| `fromMode`     | `From`    | Specifies what balance to receive the tokens from (see [Internal Balances](/developers/overview/internal-balances)). |
| `toMode`       | `To`      | Specifies what balance to send the tokens to (see [Internal Balances](/developers/overview/internal-balances)).      |

### [Add Liquidity](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/CurveFacet.sol#L100)

```solidity
function addLiquidity(
    address pool,
    address registry,
    uint256[] memory amounts,
    uint256 minAmountOut,
    LibTransfer.From fromMode,
    LibTransfer.To toMode
) external payable nonReentrant;
```

Adds tokens into a liquidity pool on Curve in exchange for LP tokens.

| Parameter      | Type        | Description                                                                                                          |
| -------------- | ----------- | -------------------------------------------------------------------------------------------------------------------- |
| `pool`         | `address`   | The address of the pool to exchange in. The pool must be registered in one of the Curve Factories.                   |
| `registry`     | `address`   | The Curve Registry to query `pool` data from.                                                                        |
| `amounts`      | `uint256[]` | The amount of each token to add.                                                                                     |
| `minAmountOut` | `uint256`   | The minimum amount to receive from the swap.                                                                         |
| `fromMode`     | `From`      | Specifies what balance to receive the tokens from (see [Internal Balances](/developers/overview/internal-balances)). |
| `toMode`       | `To`        | Specifies what balance to send the tokens to (see [Internal Balances](/developers/overview/internal-balances)).      |

### [Remove Liquidity](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/CurveFacet.sol#L159)

```solidity
function removeLiquidity(
    address pool,
    address registry,
    uint256 amountIn,
    uint256[] calldata minAmountsOut,
    LibTransfer.From fromMode,
    LibTransfer.To toMode
) external payable nonReentrant;
```

Removes liquidity from a pool on Curve in exchange for equal amounts of all tokens in the liquidity pool. The Farmer burns their LP tokens in the process.

| Parameter       | Type        | Description                                                                                                          |
| --------------- | ----------- | -------------------------------------------------------------------------------------------------------------------- |
| `pool`          | `address`   | The address of the pool to exchange in. The pool must be registered in one of the Curve Factories.                   |
| `registry`      | `address`   | The Curve Registry to query `pool` data from.                                                                        |
| `amountIn`      | `uint256`   | The amount of LP to remove.                                                                                          |
| `minAmountsOut` | `uint256[]` | The minimum amount to receive in each of the tokens.                                                                 |
| `fromMode`      | `From`      | Specifies what balance to receive the tokens from (see [Internal Balances](/developers/overview/internal-balances)). |
| `toMode`        | `To`        | Specifies what balance to sent the tokens to (see [Internal Balances](/developers/overview/internal-balances)).      |

### [Remove Liquidity Imbalance](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/CurveFacet.sol#L236)

```solidity
function removeLiquidityImbalance(
    address pool,
    address registry,
    uint256[] calldata amountsOut,
    uint256 maxAmountIn,
    LibTransfer.From fromMode,
    LibTransfer.To toMode
) external payable nonReentrant;
```

Removes liquidity from a pool on Curve in exchange for an unequal amounts of tokens in the liquidity pool. The Farmer burns LP tokens in the process.

| Parameter     | Type        | Description                                                                                                          |
| ------------- | ----------- | -------------------------------------------------------------------------------------------------------------------- |
| `pool`        | `address`   | The address of the pool to exchange in. The pool must be registered in one of the Curve Factories.                   |
| `registry`    | `address`   | The Curve Registry to query `pool` data from.                                                                        |
| `amountsOut`  | `uint256[]` | The amount of each token to receive.                                                                                 |
| `maxAmountIn` | `uint256`   | The max amount of LP tokens to burn.                                                                                 |
| `fromMode`    | `From`      | Specifies what balance to receive the tokens from (see [Internal Balances](/developers/overview/internal-balances)). |
| `toMode`      | `To`        | Specifies what balance to send the tokens to (see [Internal Balances](/developers/overview/internal-balances)).      |

### [Remove Liquidity One Token](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/CurveFacet.sol#L306)

```solidity
function removeLiquidityOneToken(
    address pool,
    address registry,
    address toToken,
    uint256 amountIn,
    uint256 minAmountOut,
    LibTransfer.From fromMode,
    LibTransfer.To toMode
) external payable nonReentrant;
```

Removes liquidity from a pool on Curve in exchange for an amount of one token in the liquidity pool. The Farmer burns LP tokens in the process.

| Parameter      | Type      | Description                                                                                                          |
| -------------- | --------- | -------------------------------------------------------------------------------------------------------------------- |
| `pool`         | `address` | The address of the pool to exchange in. The pool must be registered in one of the Curve Factories.                   |
| `registry`     | `address` | The Curve Registry to query `pool` data from.                                                                        |
| `toToken`      | `address` | The token to receive in exchange for burning LP tokens.                                                              |
| `amountIn`     | `uint256` | The amount of LP tokens to burn.                                                                                     |
| `minAmountOut` | `uint256` | The minimum amount of the token to receive.                                                                          |
| `fromMode`     | `From`    | Specifies what balance to receive the tokens from (see [Internal Balances](/developers/overview/internal-balances)). |
| `toMode`       | `To`      | Specifies what balance to send the tokens to (see [Internal Balances](/developers/overview/internal-balances)).      |

## View Functions

None.

## Events

None.


# Diamond

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Diamond module contains various functions that require ownership of Beanstalk to execute in Beanstalk. This includes Pausing and Unpausing Beanstalk and upgrading Beanstalk via Diamond Cuts.

See [EIP-2535 Diamond](/developers/overview/eip-2535-diamond) to read more about Beanstalk's upgradable proxy implementation.

The Diamond consists of 4 facets:

* [Diamond Cut Facet](/developers/protocol/diamond/diamond-cut-facet)
* [Diamond Loupe Facet](/developers/protocol/diamond/diamond-loupe-facet)
* [Ownership Facet](/developers/protocol/diamond/ownership-facet)
* [Pause Facet](/developers/protocol/diamond/pause-facet)


# Diamond Cut Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Diamond Cut Facet is used by the owner to upgrade Beanstalk.

## Call Functions

### [Diamond Cut](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/diamond/DiamondCutFacet.sol#L22)

```solidity
function diamondCut(
    FacetCut[] calldata _diamondCut,
    address _init,
    bytes calldata _calldata
) external override;
```

Add, replace, and/or remove any number of functions and optionally execute a function with `delegatecall`. Can only be called by the owner of Beanstalk.

| Parameter     | Type         | Description                                                                                                          |
| ------------- | ------------ | -------------------------------------------------------------------------------------------------------------------- |
| `_diamondCut` | `FacetCut[]` | Contains the facet addresses and function selectors.                                                                 |
| `_init`       | `address`    | The address of the contract or facet to execute `_calldata`.                                                         |
| `_calldata`   | `bytes`      | A function call, including function selector and arguments (`_calldata` is executed with `delegatecall` on `_init`). |

## View Functions

None.

## Events

None.


# Diamond Loupe Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Diamond Loupe Facet allows anyone to see the available functions within Beanstalk.

## Call Functions

None.

## View Functions

### [Facets](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/DiamondLoupeFacet.sol#L28)

```solidity
function facets() external view override returns (Facet[] memory facets_);
```

Returns facet info for all facets of Beanstalk

| Return Value | Type      | Description          |
| ------------ | --------- | -------------------- |
| `facets_`    | `Facet[]` | Array of facet info. |

### [Facet Function Selectors](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/DiamondLoupeFacet.sol#L42)

```solidity
function facetFunctionSelectors(address _facet)
    external
    view
    override
    returns (bytes4[] memory facetFunctionSelectors_);
```

Returns all the function selectors provided by a facet.

| Parameter | Type      | Description                 |
| --------- | --------- | --------------------------- |
| `_facet`  | `address` | Facet to get selectors for. |

<table><thead><tr><th width="282.3333333333333">Return Value</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>facetFunctionSelectors_</code></td><td><code>bytes4[]</code></td><td>Selectors on <code>_facet</code>.</td></tr></tbody></table>

### [Facet Addresses](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/DiamondLoupeFacet.sol#L54)

```solidity
function facetAddresses() 
    external 
    view 
    override 
    returns (address[] memory facetAddresses_);
```

Get all the facet addresses used by the Beanstalk Diamond.

| Return Value      | Type        | Description                            |
| ----------------- | ----------- | -------------------------------------- |
| `facetAddresses_` | `address[]` | All facet addresses used by Beanstalk. |

### [Facet Address](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/DiamondLoupeFacet.sol#L63)

```solidity
function facetAddress(bytes4 _functionSelector)
    external
    view
    override
    returns (address facetAddress_);
```

Gets the facet that supports the given selector.

| Parameter           | Type     | Description                                  |
| ------------------- | -------- | -------------------------------------------- |
| `_functionSelector` | `bytes4` | Selector to get the corresponding facet for. |

| Return Value    | Type      | Description                         |
| --------------- | --------- | ----------------------------------- |
| `facetAddress_` | `address` | Facet that has `_functionSelector`. |

### [Supports Interface](https://github.com/BeanstalkFarms/Beanstalk/blob/fd132ae4eda02e502441c3d28d04ad2c21b4e339/protocol/contracts/farm/facets/DiamondLoupeFacet.sol#L74)

```solidity
function supportsInterface(bytes4 _interfaceId) 
    external 
    view 
    override 
    returns (bool);
```

Returns if a contract implements an interface. Implements [ERC-165](https://eips.ethereum.org/EIPS/eip-165).

| Parameter      | Type     | Description                                |
| -------------- | -------- | ------------------------------------------ |
| `_interfaceId` | `bytes4` | The interface ID, as specified in ERC-165. |

| Return Type | Description                                                      |
| ----------- | ---------------------------------------------------------------- |
| `bool`      | True if the contract implements `_interfaceId`, false otherwise. |

## Events

None.


# Ownership Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Ownership Facet handles the ownership of Beanstalk.

## Call Functions

### [Transfer Ownership](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/OwnershipFacet.sol#L15)

```solidity
function transferOwnership(address _newOwner) external;
```

Transfers ownership of Beanstalk to a new address. Can only be called by the owner of Beanstalk.

| Parameter   | Type      | Description                           |
| ----------- | --------- | ------------------------------------- |
| `_newOwner` | `address` | The address to transfer ownership to. |

### [Claim Ownership](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/OwnershipFacet.sol#L20)

```solidity
function claimOwnership() external;
```

Callable by candidate for ownership after a successful `transferOwnership` function call.

## View Functions

### [Owner](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/OwnershipFacet.sol#L26)

```solidity
function owner() external view returns (address owner_);
```

Returns the address of the owner of Beanstalk.

| Return Value | Type      | Description                            |
| ------------ | --------- | -------------------------------------- |
| `owner_`     | `address` | The address of the owner of Beanstalk. |

### [Owner Candidate](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/OwnershipFacet.sol#L30)

```solidity
function ownerCandidate() external view returns (address ownerCandidate_);
```

Returns the owner candidate of Beanstalk.

| Return Value      | Type      | Description                       |
| ----------------- | --------- | --------------------------------- |
| `ownerCandidate_` | `address` | The owner candidate of Beanstalk. |

## Events

### [Ownership Transferred](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/OwnershipFacet.sol#L13) <a href="#event-ownership-transferred" id="event-ownership-transferred"></a>

```solidity
event OwnershipTransferred(
    address indexed previousOwner, 
    address indexed newOwner
);
```

Emitted when ownership of Beanstalk is transferred.

| Parameter       | Type      | Description                      |
| --------------- | --------- | -------------------------------- |
| `previousOwner` | `address` | The previous owner of Beanstalk. |
| `newOwner`      | `address` | The new owner of Beanstalk.      |


# Pause Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Pause Facet handles the Pausing and Unpausing of Beanstalk.

## Call Functions

### [Pause](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/PauseFacet.sol#L28)

```solidity
function pause() external payable;
```

Pause Beanstalk, which makes it such that the `gm` function cannot be successfully called. Only callable by the owner of Beanstalk.

### [Unpause](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/PauseFacet.sol#L37)

```solidity
function unpause() external payable;
```

Unpause Beanstalk, which allows the `gm` function to be successfully called at the top of the 2nd hour. The TWAP oracle and Season timer are reset as well.

## View Functions

None.

## Events

### [Pause](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/PauseFacet.sol#L21) <a href="#event-pause" id="event-pause"></a>

```solidity
event Pause(uint256 timestamp);
```

Emitted when Beanstalk is Paused.

| Parameter   | Type      | Description                                              |
| ----------- | --------- | -------------------------------------------------------- |
| `timestamp` | `uint256` | Timestamp of the current block when Beanstalk is Paused. |

### [Unpause](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/farm/facets/PauseFacet.sol#L22) <a href="#event-unpause" id="event-unpause"></a>

```solidity
event Unpause(uint256 timestamp, uint256 timePassed);
```

Emitted when Beanstalk is Unpaused.

| Parameter    | Type      | Description                                                |
| ------------ | --------- | ---------------------------------------------------------- |
| `timestamp`  | `uint256` | Timestamp of the current block when Beanstalk is Unpaused. |
| `timePassed` | `uint256` | How much time passed while Beanstalk was Paused.           |


# Upgrade History

A catalog of each Beanstalk upgrade, pause/unpause and event change.

* [Beanstalk Upgrades](#beanstalk-upgrades)
* [Event Changes by Block](#event-changes-by-block)

## Beanstalk Upgrades

Select a block to view event changes:

| Date       | Season | Block                                                       | Version | Transaction                                                                                                        | Description                                                                                                                                                                                             | Commit                                                                                                          | Event Added                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Event Modified                                                                                                                                                                                                                                           | Event Removed                                                                                                                                                                                                                                                                 | Re-emissions                                 |
| ---------- | ------ | ----------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| 8/6/2021   | -      | 12974075                                                    | 1.0.0   | [Etherscan](https://etherscan.io/tx/0x40b23cea3aa6e1a7dd89bbcd24c67f6fa1f6d663d7609f14046cd6cf50b6ce86) (`0x40b2`) | Contract Creation                                                                                                                                                                                       | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/ccce0fa18a83cc09f6a889c302b6e509230a486f) (`ccce0`) | n/a                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | n/a                                                                                                                                                                                                                                                      | n/a                                                                                                                                                                                                                                                                           | n/a                                          |
| 8/6/2021   | 1      | 12974077                                                    | 1.0.0   | [Etherscan](https://etherscan.io/tx/0xec462c02a2e4442db62179b70a7c07f812b237e127a5b24ba192f796f8013db6) (`0xec46`) | `init` Call                                                                                                                                                                                             | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/ccce0fa18a83cc09f6a889c302b6e509230a486f) (`ccce0`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 8/9/2021   | 66     | 12991967                                                    | 1.0.1   | [Etherscan](https://etherscan.io/tx/0xb4ba1b324b53fe5e5bbfeadcd735dc9c20bcea4ff08ac75eb46961ea026aae81) (`0xb4ba`) | Accounting Hotfix                                                                                                                                                                                       | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/a70db847fdc4f6f74da237160b6ea8237b201df8) (`a70db`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 8/18/2021  | 286    | 13051341                                                    | 1.0.2   | [Etherscan](https://etherscan.io/tx/0x54709be3bdfee0fada293baf07882bc768d0a79607da59049f0cbb30492d007e) (`0x5470`) | Accounting Hotfix                                                                                                                                                                                       | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 8/18/2021  | 287    | 13051707                                                    | 1.0.3   | [Etherscan](https://etherscan.io/tx/0x1d679f7fff439ba42713389eb7039fe9cae9f7a26c4b18cbe79a77a9ad210049) (`0x1d67`) | Accounting Hotfix                                                                                                                                                                                       | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 8/19/2021  | 312    | [13058439](#bip-0)                                          | 1.1.0   | [Etherscan](https://etherscan.io/tx/0xe748f3cb78dfd89fcddedac6c8b92fc24cb3e265430eaccafa47b58af51119f1) (`0xe748`) | [BIP-0](https://arweave.net/cBvmRC2xNv9pWvT_e-0xkhTIpZc6PPtNqPNzO3c2H5I)                                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/43c9158f2b1c0fe3624358abd91f953723d8c866) (`43c91`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | `Vote`, `Unvote`                                                                                                                                                                                                                                         | -                                                                                                                                                                                                                                                                             | -                                            |
| 9/21/2021  | 1101   | 13271109                                                    | 1.1.1   | [Etherscan](https://etherscan.io/tx/0x543a06622a228263abbf0c7f79094eb5f22cede6cf954a3bfd10b9638ecbeaf1) (`0x543a`) | Accounting Hotfix                                                                                                                                                                                       | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 9/22/2021  | 1125   | 13277484                                                    | 1.1.1   | [Etherscan](https://etherscan.io/tx/0xfdc2805dc48d2e9afa5f4edb4999416f2589c4ffb39dcf71a747bfb6a40a0fae) (`0xfdc2`) | Accounting Hotfix                                                                                                                                                                                       | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/e0f57a0a4862d1c109150cdc189f4b3b20d43383) (`eof57`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 9/23/2021  | 1131   | 13279160                                                    | 1.1.2   | [Etherscan](https://etherscan.io/tx/0x8dce98fcf92215575c6fcd3b948ec64395399e5efd6cdcc23509df9a94da59b6) (`0x8dce`) | Accounting Hotfix                                                                                                                                                                                       | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/1cc19632d45ae60bb731b3fefcad5cc3a580d430) (`1cc19`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             |                                              |
| 10/15/2021 | 1674   | 13423680                                                    | 1.2.0   | [Etherscan](https://etherscan.io/tx/0xe07767bb2ae85b2414cc0c93e8c47feb3191cdda503bbf55008780b48f97ec4b) (`0xe077`) | [BIP-1](https://arweave.net/1AmOuiXLc6Dk1a00JYeosUh2Myvkkqx5Qkxbf0kl12g)                                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/1f7951e21a6b6aa5012d1dc46fee6c9a5a1cd3e5) (`1f795`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/11/2021 | 2329   | [13597738](#13597738-bip-2)                                 | 1.3.0   | [Etherscan](https://etherscan.io/tx/0x9eed14763d61ffe0aa50e644233e01e54decf8b5b49466f6e12b3ed599faeb1c) (`0x9eed`) | [BIP-2](https://arweave.net/CoqappwrTQJ3Q9y6Zi0QHKFlCxZBfm6RMxXeHvgvkag)                                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/77b115f29e7690887bfc59f9533ba68b55edd6d2) (`77b11`) | `BeanAllocation`, `BeanClaim`, `LPClaim`, `EtherClaim`, `Harvest`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/17/2021 | 2466   | 13634175                                                    | 1.3.1   | [Etherscan](https://etherscan.io/tx/0x81894e5a25395435d7b93254f6e4236be557c4dd864786bd38f67116e9ba5bd1) (`0x8189`) | BIP-2 Patch 1                                                                                                                                                                                           | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/69453d7ddb173f81e9bed734f4487e692f47b21e) (`69453`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/22/2021 | 2590   | 13666663                                                    | 1.3.1   | [Etherscan](https://etherscan.io/tx/0x8463d9a04b93787e699c71a5b741b8d692f446b3989161f3b68cb49835610d07) (`0x8463`) | BIP-2 Patch 2                                                                                                                                                                                           | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/7e198fadc8da8352a50dcbfc6024261449b3ab30) (`7e198`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/24/2021 | 2618   | 13674011                                                    | 1.3.1   | [Etherscan](https://etherscan.io/tx/0x6221612fa7e2330873b391a148c3425be22b629ca99687e012d02a858bd5bef8) (`0x6221`) | Pause                                                                                                                                                                                                   | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/24/2021 | 2618   | 13677026                                                    | 1.3.1   | [Etherscan](https://etherscan.io/tx/0x8b7303c4e87abfcb5cd99cd71bfa0c7d776fe31299043f197ed8fa871cab5c25) (`0x8b73`) | BIP-2 Patch 3                                                                                                                                                                                           | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/51d28be3760c3382278160e86232376242c98aaf) (`51d28`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/24/2021 | 2618   | 13677028                                                    | 1.3.1   | [Etherscan](https://etherscan.io/tx/0x21c4cb2d156aa40c501663ea43c0fde816971c6d5359d417976466bdb829086f) (`0x21c4`) | Unpause                                                                                                                                                                                                 | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/24/2021 | 2625   | 13678942                                                    | 1.3.1   | [Etherscan](https://etherscan.io/tx/0x7dbfa6a36f2028349f7d09a868ffc41a4a7636fbbb66d529735a0b246399de7c) (`0x7dbf`) | BIP-2 Patch 3                                                                                                                                                                                           | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/51d28be3760c3382278160e86232376242c98aaf) (`51d28`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| -          | -      | -                                                           | 1.3.1   | -                                                                                                                  | [BIP-3](https://arweave.net/7pjSPpz8NOoqG4aFkB6M1rWn4tPzjr0o7Z41t4kPd9g) (Failed)                                                                                                                       | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 12/3/2021  | 2840   | [13735230](#13735230-bip-4)                                 | 1.4.0   | [Etherscan](https://etherscan.io/tx/0xfb5f6ffce822dd2446782eeffc450f1e5df4a96f486d9f6374c6b69d5bf1c617) (`0xfb5f`) | [BIP-4](https://arweave.net/Msk8Mbz7CPDN8vmQmMI8dtqCr4ydTZ8jN1jpPFqQ9lM)                                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/76a6a450b721a82632f0fa8a9268e6e432c77142) (`76a6a`) | `CreateFundraiser`, `FundFundraiser`, `CompleteFundraiser`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 12/3/2021  | 2840   | 13735257                                                    | 1.4.0   | [Etherscan](https://etherscan.io/tx/0x8ded584f3f09401ae43d9d647aae64ef5cfd11741192ed4e7ed89e351ceef0dd) (`0x8ded`) | [BIP-5](https://arweave.net/EGXO6x0ko5mAaT45G22Sq4Gfh5qMi9KgM1zzRlQedLA)                                                                                                                                | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 12/5/2021  | 2893   | 13748759                                                    | 1.4.0   | [Etherscan](https://etherscan.io/tx/0x93d2c1ac4a445ddd12876ecab109385fd25b4ba9df076679ed812e0c2bf47c0e) (`0x93d2`) | [BIP-6](https://arweave.net/31Mo38aJmBIMxH47fS3YKOK97wuHxrbsev7x7lUBDfc)                                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/160a3671cc5fde5fe187efd81fe75c5518f8a6a5) (`160a3`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 12/14/2021 | 3088   | [13800636](#13800636-bip-7)                                 | 1.5.0   | [Etherscan](https://etherscan.io/tx/0x91e23507cb099c0b3e2d5b00f6607c97d82cd0a694f79bba81f921e66e51cec6) (`0x91e2`) | [BIP-7](https://arweave.net/ixYmHgocGz9idIlswTqvbZAjWh8OibGL--D1mgojlwg)                                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/b3c9c66a679bd3dc60cbaa5ebfa5d32b3a57404a) (`b3c9c`) | `LPDeposit`, `LPRemove`, `BeanRemove`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 1/6/2022   | 3645   | 13950446                                                    | 1.5.0   | [Etherscan](https://etherscan.io/tx/0x8644f4d9890ca158783326cc0b55940916df78540a7cf79c13aaa270f57bbb37) (`0x8644`) | [BIP-8](https://arweave.net/Vtb-iyAivnnWqFO3g_DuAVurxEA0CFSYzOMcOpsXwkM)                                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/cd6372c76c57fec61a5fa5cf040baed6da97517e) (`cd637`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 1/6/2022   | 3658   | [13953949](#13953949-bip-9)                                 | 1.6.0   | [Etherscan](https://etherscan.io/tx/0xc3eb65d47ff3ec4b179cd0134739961243b0dc384a7c9bd44772334de62f6ec6) (`0xc3eb`) | [BIP-9](https://arweave.net/bvq3Hyql5eBesBZGSy5GGdiz0bkkk2dxXIpcO2MiusM)                                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/01db99d9576378ba2bbc5486e5d82947e2b7f588) (`01db9`) | `Sow`, `VoteList`, `BeanDeposit`, `LPDeposit`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 2/4/2022   | 4335   | 14136449                                                    | 1.6.0   | [Etherscan](https://etherscan.io/tx/0x74ff320692a44d67dda58c896d17fad3d80d8df9335979fe3267eeeafa702edf) (`0x74ff`) | [BIP-10](https://arweave.net/izFa9sQuKdca-fUj3YXcUk7HTapCrNGqb7y_7IFPCHM)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/c4b536e5470894e3f668d166f144f813bd386784) (`c4b53`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 2/5/2022   | 4379   | [14148509](#14148509-bip-11)                                | 1.7.0   | [Etherscan](https://etherscan.io/tx/0xf5e8162b961e8d2b3a338a4777ac2f49f4abd2f0f3e8267e67b504f2315b2f68) (`0xf5e8`) | [BIP-11](https://arweave.net/4Ltm8q74VIobeQ9dRB8wSYR7wWpCbe6vX0TaQhpIMnE)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/75a67fc94cf2637ac1d7d7c89645492e31423fed) (`75a67`) | `PodListingCreated`, `PodListingFilled`, `PodListingCancelled`, `PodOrderCreated`, `PodOrderFilled`, `PodOrderCancelled`, `PlotTransfer`, `PodApproval`                                                                                                                                                                                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 2/16/2022  | 4641   | [14218934](#14218934-bip-12)                                | 1.8.0   | [Etherscan](https://etherscan.io/tx/0x3a5be5fc302b24dda19c115fa2d9c8cf1d0d6520a7c32f49d70257e49f582ac2) (`0x3a5b`) | [BIP-12](https://arweave.net/H7qpWcc4SynAgFPWF4qT_6E7Llsqc2a6_Xx41o0BAqM)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/4a4a63b6ce31a4b80849bc0dbe943239c7627151) (`4a4a6`) | `BeanAllocation`, `Deposit`, `RemoveSeasons`, `RemoveSeason`, `Withdraw`, `ClaimSeasons`, `ClaimSeason`                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 3/12/2022  | 5200   | 14369158                                                    | 1.9.0   | [Etherscan](https://etherscan.io/tx/0x72d3f6028b59c266adfcce265b1c2492a968964d3bbe0406758f7dde292d7882) (`0x72d3`) | [BIP-13](https://arweave.net/zNCjOLd4j_Gq9USzW84AkPExJPPfGJJnuqWxHwp9lXE)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/a50d46ce3d78c6075946d7178d1c9511b2e52ff1) (`a50d4`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 4/1/2022   | 5681   | [14498034](#14498034-14498067-hotfix-omniscia-audit-update) | 1.9.1   | [Etherscan](https://etherscan.io/tx/0x1aa7e6521d30e8aba53e6d0bb249e81f31ef87bd2d71a21c93e263ca45401463) (`0x1aa7`) | Hotfix: Omniscia Audit Update                                                                                                                                                                           | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/ee4720cdb449d5b6ff2b789083792c4395628674) (`ee472`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | See below                                                                                                                                                                                                                                                | -                                                                                                                                                                                                                                                                             | -                                            |
| 4/1/2022   | 5681   | [14498058](#14498034-14498067-hotfix-omniscia-audit-update) | 1.9.1   | [Etherscan](https://etherscan.io/tx/0xcf50d8ba88000f8189fbc01010967d0e35292c8c8159d42860727b3c822c9db2) (`0xcf50`) | Hotfix: Omniscia Audit Update                                                                                                                                                                           | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/ee4720cdb449d5b6ff2b789083792c4395628674) (`ee472`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | See below                                                                                                                                                                                                                                                | -                                                                                                                                                                                                                                                                             | -                                            |
| 4/1/2022   | 5681   | [14498067](#14498034-14498067-hotfix-omniscia-audit-update) | 1.9.1   | [Etherscan](https://etherscan.io/tx/0x4b5bbf55340c03d65272d732f5098d9f4591a52e8729e8e6a22da40e25d87405) (`0x4b5b`) | Hotfix: Omniscia Audit Update                                                                                                                                                                           | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/ee4720cdb449d5b6ff2b789083792c4395628674) (`ee472`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | `VoteList`                                                                                                                                                                                                                                               | -                                                                                                                                                                                                                                                                             | -                                            |
| 4/7/2022   | 5844   | 14541362                                                    | 1.9.1   | [Etherscan](https://etherscan.io/tx/0x7025511ca92d341fa5d79ddcfaf201a73131c0a79ab9fa4b2e02e50c1e04e0b8) (`0x7025`) | [BIP-14](https://arweave.net/98qesR53_wxLYZl5I_0mCncc7SdiMzbIxiM-prBrgFc)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/2fd2f19df3b3ee7493d49fa254a2f1e80f854f58) (`2fd2f`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 4/7/2022   | 5844   | 14541420                                                    | 1.15.0  | [Etherscan](https://etherscan.io/tx/0x7f126e28b9e0441fcfe0753df16c9aa4ca27dc89d57bb7d8f29a282f96f19375) (`0x7f12`) | [BIP-15](https://arweave.net/UJvtzOz35HwJkzOyvRvlD07mzsGy1I9xi5ZgZDTpUjU)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/8bf07346e06ecd0ce96ef7ff62c47e87f60b4d93) (`8bf07`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 4/8/2022   | 5867   | 14547427                                                    | 1.16.0  | [Etherscan](https://etherscan.io/tx/0x47f8937e3d03a68e512d67665cdc61cbcfbb122d71a3b5c2817186ddf476e8ef) (`0x47f8`) | [BIP-16](https://arweave.net/xhve4hJiCIePeIxqjKMAG7YtUEosltdlB25a4vB8k7M)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f5e69b76cd83e8c1c3291bbfe366a4e88a2761d6) (`f5e69`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| -          | -      | -                                                           | 1.16.0  | -                                                                                                                  | [BIP-17](https://arweave.net/QXiE8hnJII-miqeLrEPmDES_kVd3CqiZ1UIf9v8dsTk) (Failed)                                                                                                                      | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 4/17/2022  | 6074   | 14602790                                                    | 1.16.0  | [Etherscan](https://etherscan.io/tx/0xcd314668aaa9bbfebaf1a0bd2b6553d01dd58899c508d4729fa7311dc5d33ad7) (`0xcd31`) | [BIP-18](https://bean.money/blog/beanstalk-governance-exploit) (Governance exploit)                                                                                                                     | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| -          | -      | -                                                           | 1.16.0  | -                                                                                                                  | [BIP-19](https://bean.money/blog/beanstalk-governance-exploit) (Governance exploit)                                                                                                                     | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 4/17/2022  | 6074   | 14603731                                                    | 1.16.0  | [Etherscan](https://etherscan.io/tx/0xb9835af8de4553435bc4fd5c09d34975f554d3bf8b9d51cd068282c94d3d37a1) (`0xb983`) | Pause                                                                                                                                                                                                   | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 4/17/2022  | 6074   | 14603734                                                    | 1.16.0  | [Etherscan](https://etherscan.io/tx/0x4eb26f11b3e7d66f15d4cd12b248cc5a2eb9df8353777f88939961ffbb92e880) (`0x4eb2`) | Remove governance functions                                                                                                                                                                             | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 4/18/2022  | 6074   | 14611125                                                    | 1.16.0  | [Etherscan](https://etherscan.io/tx/0xb62d4e4f251430ea91a6ff1214ffdfc588643b156b170aa9c7f3615521661a1a) (`0xb62d`) | Remove exploiter's Beans                                                                                                                                                                                | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 4/19/2022  | 6074   | 14618005                                                    | 1.16.0  | [Etherscan](https://etherscan.io/tx/0x09ea1f5898f9440e327e70702af9c17761cf13d9882adcec58faf9d68d9d5057) (`0x09ea`) | Remove all write functions                                                                                                                                                                              | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 6/4/2022   | 6074   | 14900249                                                    | 1.16.0  | [Etherscan](https://etherscan.io/tx/0xb155cc344e6cb75e435407c83b536e070ff24d1fe7abd5b2872f278a497a641a) (`0xb155`) | [BFP-67](https://arweave.net/5vy3i9fCdBvYYARkECLqTlo1NbxGuJ4wFshmmQCZdL4) - Remove exploiter's balances                                                                                                 | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 6/21/2022  | 6074   | 15004465                                                    | 1.16.0  | [Etherscan](https://etherscan.io/tx/0xfcd489ed0dfe14c3f531b0683960114485cbc5a82a1f52d2b1aff998f40cb550) (`0xfcd4`) | [BIP-20](https://arweave.net/8leLKnJz1mersoxVMe8Wk_tIn6uidyw7vcAHdGes56Y)                                                                                                                               | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 6/21/2022  | 6074   | 15004541                                                    | 1.16.0  | [Etherscan](https://etherscan.io/tx/0x1d59db8a784f418d9a34be0b6616c1a58d7e0016504f8aeef060578dee730bc3) (`0x1d59`) | [BIP-20](https://arweave.net/8leLKnJz1mersoxVMe8Wk_tIn6uidyw7vcAHdGes56Y)                                                                                                                               | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 6/21/2022  | 6074   | 15004593                                                    | 1.16.0  | [Etherscan](https://etherscan.io/tx/0xb84b8486d9dd8d5903752eec8ff68114ecc6e94e0b074d602bb990b3649eb0a8) (`0xb84b`) | [BIP-20](https://arweave.net/8leLKnJz1mersoxVMe8Wk_tIn6uidyw7vcAHdGes56Y)                                                                                                                               | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 8/4/2022   | 6074   | [15277988](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x10e8ca48fc564cd305b3feb48eab615ab7fbf997cb87ae2ffd4b26879ac6c31e) (`0x10e8`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-3: Remove Bean Withdrawals, Harvestable Plots and corresponding Pod Listings and Pod Orders                             | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15277990](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x900aed9ed2c916af5ced04047c6824eb0e4699c1ecee634d8099979436253c3a) (`0x900a`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-4: Remove LP Withdrawals                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15277992](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xac984cc4e18bade6663fe2d3850c5c7a58ea5cb72013b5530dda9bf8f94a16f0) (`0xac98`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-5: Migrate Bean Deposits to Unripe Bean Deposits                                                                        | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15277993](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x79caf9f041bfda287c366aa4d1b843cad97a33233fe7aa65cb05e82698f63bf6) (`0x79ca`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-5: 2/9                                                                                                                  | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15277995](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xea3910e1b84c9e42694a9a1791953afed4f04cfa3dcfc246fd28fc9b1a4e7a49) (`0xea39`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-5: 3/9                                                                                                                  | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15277996](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xa0b0cf4d86715967a337615e81807d254b6c11bfb7fcb5d4f7838849e09a359e) (`0xa0b0`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-5: 4/9                                                                                                                  | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15277998](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xc62d6f236ad50730c3aac396e2f3781a17bcf77d2c1730857d6a0320e2083a89) (`0xc62d`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-5: 5/9                                                                                                                  | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15277999](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xc685f43f83bd6eb8e0650b80ec9b3a62627f2a106416ca723e0ff2656b767f17) (`0xc685`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-5: 6/9                                                                                                                  | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278001](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x36659e14f27ec8f7135c49f8b78b8fcd2fc4d14b468bafca82ce7432572a3fb3) (`0x3665`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-5: 7/9                                                                                                                  | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278004](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x1c331a55fc4b16f72eeb0c96f404b564b1967de747a7ef2876b7c6f6750b1b1b) (`0x1c33`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-5: 8/9                                                                                                                  | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278006](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xabd5a6fb146c544a6d718719795e05193f76a110748dc6f6a1497dd9500e6426) (`0xabd5`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-5: 9/9                                                                                                                  | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278008](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xb64359d5a69854f186c8853aafcfaf1ef124c50c15239aa59205f6656b6a8d2e) (`0xb643`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: Migrate LP Deposits to Unripe LP Deposits                                                                            | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278009](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x81be9ee6aa67b923359f23dd0d72e9021b900140908035cd2c72a4ea7438efc9) (`0x81be`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 2/17                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278010](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xd9b54f562715aed0f089c79c250311fa6c502f7f753e38ac49e4670947ca5402) (`0xd9b5`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 3/17                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278011](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x6c7dc4372b83db702047d29c66d4601aa6e7506028a962eced51195cc1cec7e2) (`0x6c7d`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 4/17                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278013](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x9900a7274e134c1216f7c748f98cbc15891fa08ddf646a3480aeb3e3b0eed1e1) (`0x9900`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 5/17                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278015](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x9c05f5c76a8e98606fad6be99273f2018495c090dcba0095e130b6a991ffbcca) (`0x9c05`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 6/17                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278017](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x1fb9c362792166f071b0d74fc6d7c37800fc0236f1c2e370d869be3b09e6d29d) (`0x1fb9`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 7/17                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278019](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xe66854a50a9290f8a828cc7a565b0a85a69f2227ed51337ccfa308308066f3a6) (`0xe668`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 8/17                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278021](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x9475c5ff4b838e7b5b05a8a18e9abc5dc1ecc9880366b086b0e60ff4d156ae5c) (`0x9475`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 9/17                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278023](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x208e605282ef0bd6e27f23769fb7caa74e574e4d7c4c7f31969345b296462ff0) (`0x208e`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 10/17                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278024](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x121f1a35be0e36689a6cd762dae128769111d8bf0e39ce13df58ac0eca828384) (`0x121f`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 11/17                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278026](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x54a3a8a56ffed4ef3786cb092494e4f81f4120223d3f2f8ea38b901f2291563f) (`0x54a3`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 12/17                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278027](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x0e3803009b90ec23a9d520210d1d2d9248d63f7f7f0b8c96bf574f400f3965d6) (`0x0e38`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 13/17                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278028](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x30d36875c9645a9f6a873b6a6d3f7cb9128a07b8d751179540f632f641b54516) (`0x30d3`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 14/17                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278029](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x58975c0d65f58be3ba5807b64d14060643296f70f3959ee42fbbdc05a664a819) (`0x5897`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 15/17                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278032](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xdd730e41610ab6f707a22dce32c1abd846be821a7947f9dbfa6e91d9b4e1a451) (`0xdd73`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 16/17                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278034](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xf75182c3223a74d5adf73cf100191b8657c6205e2c2b8c32257bedc1c198f048) (`0xf751`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-6: 17/17                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278038](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x999253ac8020c5e24d4f9077dae2188ab0c807f83b002f8009ec081905f29da2) (`0x9992`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: Prune Stalk/Seeds and Deposit Earned Beans as Unripe Beans                                                           | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278041](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xf99c7e35371a6bd199ca31a1019a97c1963984d39682cbb6a237af86a53ceca3) (`0xf99c`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 2/27                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278042](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x1af3662314e3baf7b3c85113e3ebe7634da0cf29a0f0568cd0188c23827396c7) (`0x1af3`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 3/27                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278043](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x1cf154fc68f2a3261751167e9c9ff6147477491be83bb2d2dbf0de31b657b81c) (`0x1cf1`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 4/27                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278044](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x4c30e511839ad972beac33c21dc93f5df2a3ff91c1376e3ce5c889c9f67048da) (`0x4c30`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 5/27                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278046](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xd251701fb0036d2eed2d2d7132545918bec0e2f5dd8293b0e3912999ee135f7d) (`0xd251`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 6/27                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278047](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xe23b5c2388372e102aeba40ef64afe279f728985074b2f200fa3a0d659fd5b55) (`0xe23b`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 7/27                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278049](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x4cac98a17e8b5c427475957cbb12d78d4db0de11840100816cdf27488d8a3f0d) (`0x4cac`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 8/27                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278051](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x4b2193a570a4446284c0a18bf5983b7621a5f838c068a0f0a49327a4c7707342) (`0x4b21`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 9/27                                                                                                                 | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278053](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xdb9fdf68a82456d8865fb5ef98d7bc023670572ce07dd67f239609f67f87fcff) (`0xdb9f`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 10/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278054](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x02254b0fba09ad405a3e88cbbb9a843c35d6c26db0f265d8208697025af8616b) (`0x0225`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 11/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278055](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x16d35f468d337f8dda504b5de51a88e342bf1d92c0bb61fd3bad93c9f3aa105f) (`0x16d3`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 12/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278057](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x4dba097923ee4c21579e4784bfa6e061c385e153baaca870e3eddeac46c452a8) (`0x4dba`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 13/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278058](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x16797843149eccf41f771fc9145c80b3686b940007fca72ccf82be06ea6c46f2) (`0x1679`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 14/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278059](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x82896badcf03fdaf13f55e335918f692c62c040395b52cea677f25ed7cec8d18) (`0x8289`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 15/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278060](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xee217eff9671ecf3d370450a501070c5bb0aa3560f219dc8992d641563faf565) (`0xee21`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 16/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278061](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x04a8e6da723067c4ebdf24e659a99b2768b59a2a75cddf7636df9950d9577e7e) (`0x04a8`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 17/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278064](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x6f37b8c308916f573ae11066e4b96bbc9a4805aa93578b6f526706d5195aa640) (`0x6f37`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 18/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278066](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xec5df6e5d9814ce59a7657988753d0a5b4aa42939051ea5894edb864b2606e9a) (`0xec5d`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 19/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278067](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xf4f53659801fae871cd8c9abbbdda38be816fc322866ca8ca45dfd35370cbc64) (`0xf4f5`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 20/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278070](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x44408840bc1613f3ed4534f1daeba924568e9b0aa00fc37ded59b6fb2d96baae) (`0x4440`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 21/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278071](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x70cd2ae21e2c86ab78431fc7504c309202036ff388cdf344f85cdf5b868226b6) (`0x70cd`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 22/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278072](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xb9af6035bd87287a165a8bac5950e3033c5f6f8b627fcd85c7173ccb64888f62) (`0xb9af`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 23/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278073](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x99fd483decc74afd82a4f36a2082b4a422190c81c87b37aeb6a22c9e923d0615) (`0x99fd`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 24/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278076](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xa9eef3798b36da746aee7c27f3a020d419ac5b7bb126ea0fedbfe2d327a178fe) (`0xa9ee`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 25/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278077](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xe7648c9053a7012157fda90398418ecc1db155d11f5201bd7010a2e00af37ef3) (`0xe764`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 26/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278079](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xb6c6a11f00e682b0fd38b263201050f1cd638843f207a4b19580dc38deba088a) (`0xb6c6`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-7: 27/27                                                                                                                | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/4/2022   | 6074   | [15278082](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0xfde4c39fb883afcd43fd710c74be13257365c36f132f9e67688814511a3286cc) (`0xfde4`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - WTP-8: Deploy Bean, BEAN:3CRV, Unripe Bean and Unripe BEAN:3CRV tokens, mint initial supplies and initialize Silo Whitelist | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | See below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | See below                                                                                                                                                                                                                                                | See below                                                                                                                                                                                                                                                                     | -                                            |
| 8/5/2022   | 6074   | [15278963](#15277988-15278963-bip-21)                       | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x26f884830d2a13d3445221dbfac2e392211b302ee440ac056d9990295f543a08) (`0x26f8`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - Replant                                                                                                                     | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357) (`f0e29`) | `Convert`, `RemoveDeposits`, `SetFertilizer`, `OwnershipTransferred`, `MetapoolOracle`, `Reward`, `Soil`, `Plant`, `ClaimPlenty`, `SeedsBalanceChanged`, `StalkBalanceChanged`, `AddDeposit`, `RemoveDeposit`, `AddWithdrawal`, `RemoveWithdrawals`, `RemoveWithdrawal`, `InternalBalanceChanged`, `AddUnripeToken`, `ChangeUnderlying`, `Chop`, `Pick`, `WhitelistToken`, `DewhitelistToken`, `RemoveSeason`, `PodOrderCancelled`, `ClaimFertilizer`, `MetapoolOracle`, `MockConvert`, `UpdateTWAPs`, `DeltaB`                                                                | `PodListingCreated`, `SeasonOfPlenty`, `Pause`, `Unpause`                                                                                                                                                                                                | `EtherClaim`, `BeanAllocation`, `LPDeposit`, `Proposal`, `VoteList`, `Unvote`, `Commit`, `Incentivization`, `Vote`, `SeasonSnapshot`, `SupplyIncrease`, `SupplyDecrease`, `SupplyNeutral`, `BeanDeposit`, `BeanWithdraw`, `LPWithdraw`, `Deposit`, `RemoveSeason`, `Withdraw` | -                                            |
| 8/6/2022   | 6074   | 15289539                                                    | 2.0.0   | [Etherscan](https://etherscan.io/tx/0x4145c840808dc2e56950182e3718d1bb356fcc2956027a601c9a975c0b97f718) (`0x4145`) | [BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk) - Unpause                                                                                                                     | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 8/10/2022  | 6158   | 15312400                                                    | 2.0.1   | [Etherscan](https://etherscan.io/tx/0x7949bdea1864aa66712bac3d57b79f3030c4cafbb91cdca3d56a0921e1496402) (`0x7949`) | [EBIP-0](https://arweave.net/PV_7zu19NJg1aWzo4IHu8R0t-ptMV6JL2CMaMK7Q3zg)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/a9587d3e741514b39daec877244a73d7824b2593) (`a9587`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 8/17/2022  | 6328   | 15357193                                                    | 2.0.1   | [Etherscan](https://etherscan.io/tx/0x7a3e0bb2b46f6333d5e6a008aa1107f8bfdc3005a282776c6f29cef6ccf7189a) (`0x7a3e`) | [BIP-22](https://arweave.net/6aaL15siu33-dSL5wbrF0t10xzhIZ1IDQTVK-dINsHw)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/225237793aaebba4871286fc33f5dace967332cd) (`22523`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 8/17/2022  | 6328   | 15357198                                                    | 2.0.1   | [Etherscan](https://etherscan.io/tx/0x40f35513edda1731fe5076f5e68459dd20a2110b89e0b622e56318283ae830a5) (`0x40f3`) | [BIP-23](https://arweave.net/bAUbQva6X751GHt1UNSfqErNpH0z_DTM3P2BvTQN2pA)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/cf8dd86a875e90704625eaaf11799f19eda282ff) (`cf8dd`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 9/5/2022   | 6799   | 15480267                                                    | 2.0.2   | [Etherscan](https://etherscan.io/tx/0x0100d62959b09deea2cdccb8c14c5f9495778452d1d2fcda7f5da1a6cd6e9bec) (`0x0100`) | [EBIP-1](https://arweave.net/w6AuMbl8nA30Oh7d8sfRIML4pVRj6jq23XlDvUlHQoI)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/5a05ec0a7510b7e6c8bbb8063150c4992c1488b9) (`5a05e`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 9/13/2022  | 6987   | 15528219                                                    | 2.0.3   | [Etherscan](https://etherscan.io/tx/0x1ca14810306dfcb098950137f58b53a4034fe0f097985ea2403ec9d5de467076) (`0x1ca1`) | [EBIP-2](https://arweave.net/3GyVJLO0YqhwJHWZeiykWYu4G6SsfcV0alP-1DfMygk)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/ddf3869bcdf7f7802eabe83d6abeebdfc7b8d1ab) (`ddf38`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 10/5/2022  | 7521   | [15685220](#15685220-bip-24)                                | 2.1.0   | [Etherscan](https://etherscan.io/tx/0x2b54f9c9d5f25d4aaff0d241c7a603bbf8b96b6191513724a76afe808869e966) (`0x2b54`) | [BIP-24](https://arweave.net/388_OnMbLZt9WYodaLiPMeLmGoTsXfXl8WUcJMEDcUQ)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/9ca85613d40a3883377de0d9377623d49fff5b9c) (`9ca85`) | `DepositApproval`, `SeedsBalanceChanged`, `StalkBalanceChanged`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 10/5/2022  | 7521   | 15685230                                                    | 2.1.0   | [Etherscan](https://etherscan.io/tx/0xd335b3be7582515f195287daa53de7fe8bd9c88d056a30f438be2c8e7bb457a8) (`0xd335`) | [BIP-25](https://arweave.net/O9-WKx4x7cu6YFeeowI5i1IG3kcaxQ1vwtr-hduWQos)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/6fb654104e65eabc204cb4a5a9b9c4bae39432ef) (`6fb65`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| -          | -      | -                                                           | 2.1.0   | -                                                                                                                  | [BIP-26](https://arweave.net/GnnM7WxvhttHhIKkjffhOHgAQKR6esbjNzIzlnWS8Y4) (Immunefi)                                                                                                                    | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/fb5363f601b361a6f8665fb840261e23c0c3cbab) (`fb536`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 10/6/2022  | 7540   | 15690858                                                    | 2.1.0   | [Etherscan](https://etherscan.io/tx/0x983e3660eb5c90d394129540646e32cd951331897bdf3edee10912b773fd6aba) (`0x983e`) | [BIP-27](https://arweave.net/E5zMMUzM-BXaVulQFhEZTcmglcHXSlIF5K6OxG5nHb4)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/16b253c3552b2e81f2bacef6f32572303c0dd0e6) (`16b25`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 10/8/2022  | 7584   | [15703994](#15703994-bip-24-event-emissions)                | 2.1.0   | [Etherscan](https://etherscan.io/tx/0xa89638aeb0d6c4afb4f367ea7a806a4c8b3b2a6eeac773e8cc4eda10bfa804fc) (`0xa896`) | [BIP-24 Event Emissions](https://arweave.net/388_OnMbLZt9WYodaLiPMeLmGoTsXfXl8WUcJMEDcUQ)                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/9ca85613d40a3883377de0d9377623d49fff5b9c) (`9ca85`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | `SeedsBalanceChanged`, `StalkBalanceChanged` |
| 10/25/2022 | 8000   | 15828214                                                    | 2.1.1   | [Etherscan](https://etherscan.io/tx/0xaa7cef4a18a4ec997ad045bc68210606d0f69b4da6e9837107dcb43363f2f39a) (`0xaa7c`) | [EBIP-3](https://arweave.net/OftwDeHeyC61Xe7nVjBpQITh7T3m08-hXF9sQ9TjMfs)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/b2b7b6af2913dda868030fba4947575258583c69) (`b2b7b`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/1/2022  | 8151   | 15872969                                                    | 2.1.1   | [Etherscan](https://etherscan.io/tx/0x1f3d3aaf1e24541400e0cc4c9f6985b21dbdccd1fa01df2b7873d62fb598d165) (`0x1f3d`) | [BIR-1](https://arweave.net/nEMb_RKBiWMSYr9kfyW4EP2gac_EhzxET6i-0od3DI4)                                                                                                                                | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/1/2022  | 8151   | 15872973                                                    | 2.1.1   | [Etherscan](https://etherscan.io/tx/0x5fa42d868c8df19fea6c12e49041583536fba3767b6aeaa62c3adf8415ef9ee4) (`0x5fa4`) | [BIR-1](https://arweave.net/nEMb_RKBiWMSYr9kfyW4EP2gac_EhzxET6i-0od3DI4)                                                                                                                                | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| -          | -      | -                                                           | 2.1.1   | -                                                                                                                  | [BIP-28](https://arweave.net/nAS1_yr86Lrp_GphZLfIU-AU1un-fw-gF5ATUhNpgjk) (Cancelled)                                                                                                                   | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/12/2022 | 8412   | [15951072](#15951072-bip-29)                                | 2.2.0   | [Etherscan](https://etherscan.io/tx/0x5e1d4c9a4e1572fd6ba7b1c0cb105a244757d5aded40f4cc8f2f6520d9c3268f) (`0x5e1d`) | [BIP-29](https://arweave.net/OfWylBAxD5KyGJBWrQto2EyeYpzc-MqfaroXMQ1bk5w)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2) (`c20cd`) | `TokenApproval`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | `PodListingCreated`, `PodListingFilled`, `PodOrderCreated`, `PodOrderFilled`                                                                                                                                                                             | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/13/2022 | 8434   | 15957625                                                    | 2.2.1   | [Etherscan](https://etherscan.io/tx/0x1ad6991ad8251302989fe95853e2b0bdd8ed160eb0ed028a1332a92dc652b896) (`0x1ad6`) | [EBIP-4](https://arweave.net/Eb3qBsLrBdMBGtyaR3lEhK1_r_tS0HvvCgRFmKroPM8)                                                                                                                               | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/14/2022 | 8477   | 15970409                                                    | 2.2.2   | [Etherscan](https://etherscan.io/tx/0x74f540497e7ee213ae0e3025d2c5dd5567372fdfebfd55adc7c55d8455318b5a) (`0x74f5`) | [EBIP-5](https://arweave.net/rqnIr_xLdEm4Q0ZiMqWh26lwvNmXUnMv9zu2Is4qOmM)                                                                                                                               | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/16/2022 | 8506   | 15979107                                                    | 2.2.3   | [Etherscan](https://etherscan.io/tx/0x7e0f3c0a574edb5658028ff0c8460d0d2ddbfd8cfb486b98ed7b10c7aa12b8d1) (`0x7e0f`) | [EBIP-6](https://arweave.net/o0cB9SKHQq1y_KqIRZ8oK-xLjtSiTXuiT5dGmkwxygI)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/4ee40ac930c48509905fb3299c1b687bce31bf24) (`4ee40`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/22/2022 | 8672   | 16028530                                                    | 2.2.3   | [Etherscan](https://etherscan.io/tx/0x89c4c574545d9243313aeab5a4e11ade0d9071766d93b9888a632e251b6dbb83) (`0x89c4`) | [BIR-2](https://arweave.net/zayRM8ATyNJR_1n5xRRQ2gkaOdADRbeOX3q7CyfYPHg)                                                                                                                                | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/28/2022 | 8810   | 16069756                                                    | 2.2.3   | [Etherscan](https://etherscan.io/tx/0x1372a7f5bdf16690b126655b8325b6767fefc8061a6ffb6897a1edc5718d5718) (`0x1372`) | [BIR-3](https://arweave.net/ObqSYNnh5OIopDNHlJmwByFgT-qYjQV60oeYli5Q-fU)                                                                                                                                | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/28/2022 | 8810   | 16069765                                                    | 2.2.3   | [Etherscan](https://etherscan.io/tx/0xc63edb49c81b7b0d637f7454801a9ab08a1ac691994f93b1fa64f2e2402578d1) (`0xc63e`) | [BIR-4](https://arweave.net/OyqpqjsTub1j4jaGipqMffPGxVywnmR3g45e9jkMZTM)                                                                                                                                | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 12/8/2022  | 9057   | 16143379                                                    | 2.3.0   | [Etherscan](https://etherscan.io/tx/0xcbac77aca80d96d77d5c1b211ea58ccb143f6fb7698a8069fdad5bd25bad38cd) (`0xcbac`) | [BIP-30](https://arweave.net/XZuc8TUxvsvl66I1ULw4MBKuku4rJXOwb_Bs7hqMNbQ)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/fd132ae4eda02e502441c3d28d04ad2c21b4e339) (`fd132`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 12/9/2022  | 9063   | 16145166                                                    | 2.3.1   | [Etherscan](https://etherscan.io/tx/0xce278f3e8bcffe9391806ab85b271788bcb0df782bdc02a3e862b09beb90e2e9) (`0xce27`) | [EBIP-7](https://arweave.net/XulSo-1AWwFlmbs2Ck1kjsCXZIZbrnqpErHh8aXbIfw)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/3b36f6fe7a887eb0b07ef70fe872efa22365acb9) (`3b36f`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| -          | -      | -                                                           | 2.3.1   | -                                                                                                                  | [BIP-31](https://arweave.net/k9vYhlrwASbbrBaCS4y-gJEFx8JCh8l7NaHkY5f12ng) (Failed)                                                                                                                      | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| -          | -      | -                                                           | 2.3.1   | -                                                                                                                  | [BIP-32](https://arweave.net/fTaSy9gqrawleXRUwJp8TZp9W1t2i8l8CwRZ3oUJSeU) (Failed)                                                                                                                      | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 02/09/2023 | 10561  | 16592011                                                    | 2.3.1   | [Etherscan](https://etherscan.io/tx/0x76fc0ea4a4d582c2715777564735d855ff15c07c6d6ad009413235bfe789ebe1) (`0x76fc`) | [BIP-33](https://arweave.net/-iklnExU_oJl3N2Lh0wnnGqeT8cTV0L6d6YOpbn2iKc)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/fa2dcaa2243845251488adf3373a0da2513d0a7c) (`fa2dc`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 05/04/2023 | 12577  | [17188356](#17188356-bip-34)                                | 2.4.0   | [Etherscan](https://etherscan.io/tx/0x7f6fb3d9134fa08c274121614db549ad4303d9df95ac6e4747c1f7d7ded66403) (`0x7f6f`) | [BIP-34](https://arweave.net/7M_RRIDWnWo0MwfyA8pjs1leOGrQlEzEvKTcil4xDIs)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/a03b8d875ed965f0647de8fb8f02d3f240ee3d6c) (`a03b8`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | `MetapoolOracle`                                                                                                                                                                                                                                                              | -                                            |
| -          | -      | -                                                           | 2.4.0   | -                                                                                                                  | [BIP-35](https://arweave.net/6io_TThM36tFXmaM-AW52xygYKQ2oxUbGA8jydtanMc)                                                                                                                               | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 05/13/2023 | 12793  | 17251905                                                    | 2.4.1   | [Etherscan](https://etherscan.io/tx/0x22e529e7f7a4f9b530586d02befd70ff471d925e5f7e373d2395f8b81c061bc4) (`0x22e5`) | [EBIP-8](https://arweave.net/bnLvAXT1eM2vVh76iPXU-k71PPJ4KxGIz-StF5KqY-c)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/75ad38f5ff1c298fd6e14b3b8a6c73c992b69d7b) (`75ad3`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 07/11/2023 | 14210  | [17671557](#17671557-bip-36)                                | 2.5.0   | [Etherscan](https://etherscan.io/tx/0x17ca3482479f4a0f13f0337a9288b8569e531e71e1e932813d04e6ed1224e95c) (`0x17ca`) | [BIP-36](https://arweave.net/Zj-OCFwtOxRewDN1RK3tELz_0xyjjBKisL1arwJ3klk)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/36d3cbdfecbfb5a9afb46c7b2ee7965f1288e4e2) (`36d3c`) | `TransferBatch`, `TransferSingle`, `ApprovalForAll`, `RemoveDeposit`, `UpdatedStalkPerBdvPerSeason`                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | `AddDeposit`, `RemoveDeposit`, `RemoveDeposits`, `WhitelistToken`                                                                                                                                                                                        | `AddWithdrawal`, `SeedsBalanceChanged`                                                                                                                                                                                                                                        | -                                            |
| 08/30/2023 | 15410  | [18028591](#18028591-bip-37)                                | 2.6.0   | [Etherscan](https://etherscan.io/tx/0x128fca85e9dca320ad920e4ead97c317b10642c2003a260cb508fc835c3e1a22) (`0x128f`) | [BIP-37](https://arweave.net/VPF1EafHb41Y7AjzUYB0j-mR8Sl0KxPknDJYffczBpc)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/8143542719b1c5489db5fa6a989184eb6eeb7ff9) (`81435`) | `RemoveDeposit`, `RemoveDeposits`, `URI`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | `WhitelistToken`                                                                                                                                                                                                                                         | `RemoveDeposit`                                                                                                                                                                                                                                                               | -                                            |
| 10/20/2023 | 16634  | [18392690](#18392690-bip-38)                                | 2.7.0   | [Etherscan](https://etherscan.io/tx/0xa25627d4bfb9d54c9be9d5e6d8d4cc09e5dfbc688aa3be368a773748e7d39add) (`0xa256`) | [BIP-38](https://arweave.net/Km6We3lycOcIql8-cB4_ogmwHSSt5ri01ZUM0GXGvB4)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/26dd45b18887273360c20506e1a7626c8cbca36e) (`26dd4`) | `SwitchUnderlyingToken`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 10/21/2023 | 16644  | 18395692                                                    | 2.7.1   | [Etherscan](https://etherscan.io/tx/0x889a250e51296a632f8cddf5a519c75b55f3dedf9cb562efc603a67c18890c1d) (`0x889a`) | [EBIP-9](https://arweave.net/uhIRmKbQM8N_ohjqs9wA_3RBn8AjhGbH_wOPaXu3be4)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/2ad90141214e2e5c9ba5826c2734f44ce2673b4d) (`2ad90`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 10/23/2023 | 16711  | 18415636                                                    | 2.7.2   | [Etherscan](https://etherscan.io/tx/0xe359e70e6f9a4b4ff55788855c5c1a2914e21102b914a71ac49b3cb2020f5989) (`0xe359`) | [EBIP-10](https://arweave.net/im3PLE28EkO_eMo4fPmtcTYBJFRErxZ_44I_LWPDIB8)                                                                                                                              | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/87e0e0ec62b96492d0bad19914237a34cc90d47e) (`87e0e`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 10/30/2023 | 16880  | 18465853                                                    | 2.7.3   | [Etherscan](https://etherscan.io/tx/0x6157f2797bc7b5c4bc93213fce33c5f96c34451a07de239997655681d5069098) (`0x6157`) | [EBIP-11](https://arweave.net/ZAP4uFxDhwv-Kz9jUA2-pDTsJvkaT-CyiOQWAVL02d4)                                                                                                                              | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/2fb32eb2cfd91f4154ff7117fedbefb4d500b9d0) (`2fb32`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/08/2023 | 17091  | 18528816                                                    | 2.7.4   | [Etherscan](https://etherscan.io/tx/0xf534d56d7ceb59d6c6b808a7b0f94959e4a27021925cad6fd263808ae76e1f84) (`0xf534`) | [EBIP-12](https://arweave.net/zAtoxAMBSIVvJTPz45nXPT0lUbgU5Krw5MJ-SWwEmSI)                                                                                                                              | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 11/09/2023 | 17120  | 18537472                                                    | 2.7.5   | [Etherscan](https://etherscan.io/tx/0xc77cdf9771cd5b81866adf120f39f3cb3a15b6735882053a2ed0e2d3986d6b3d) (`0xc77c`) | [EBIP-13](https://arweave.net/zKpHhC4c8NhJecrEGHQ8F_vhrLVVEqdGKrQODSoIKbg)                                                                                                                              | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/1c6f5567cdcff616095c7182ea2ff9fb792a8a1f) (`1c6f5`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| -          | -      | -                                                           | 2.7.5   | -                                                                                                                  | [BIP-39](https://arweave.net/9DZrP_OJEDM_a-GH_8AFxTaiUz91ya8lK6KhELO5Ekc) (Failed)                                                                                                                      | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 02/05/2024 | 19215  | 19159869                                                    | 2.7.6   | [Etherscan](https://etherscan.io/tx/0x4b7e79cc9d02c8f75f250182d86ecf87b1c1afd5072d7fe05db187c8f5258e59) (`0x4b7e`) | [EBIP-14](https://arweave.net/cOjwMRebYst6VrqXI-7h7S5-DrkuiT7cWRC4gBUak9s)                                                                                                                              | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/d7769f8d9ccfa618586cdc632f7dd442116563c8) (`d7769`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 02/26/2024 | 19717  | 19308933                                                    | 2.7.6   | [Etherscan](https://etherscan.io/tx/0x2b117225d9992d5ad66788c96575be5392e12d5cea5d05ff82065975cdc99961) (`0x2b11`) | [BIP-40](https://arweave.net/fubHcxE_P_z-xBwapMUMLiT29m6_sifDtAKimQ05Nz8)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/ef38a639ddc99394c7d2884a4279d764d942bead) (`ef38a`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 02/26/2024 | 19717  | 19308941                                                    | 2.7.6   | [Etherscan](https://etherscan.io/tx/0x1378720d39d75f9d3593849be756fdf7a3aaabda88bc9491cdac1b14525b9f7c) (`0x1378`) | [BIP-41](https://arweave.net/uI_aXutcoWvZajzcSoJOfJNeKCpJ8DcLuPPhR-8NOKk)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/9460ecef09c4ddc9091060302a45ccdb2e6e311b) (`9460e`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| -          | -      | -                                                           | 2.7.6   | -                                                                                                                  | [BIP-42](https://arweave.net/8QGAmvWyhTLZVXvzKYHj_Z8grGU-4QJbYIOLE_MvSCE) (Cancelled)                                                                                                                   | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| -          | -      | -                                                           | 2.7.6   | -                                                                                                                  | [BIP-43](https://arweave.net/PZqW1I2XdEBBHqqoOzz3ZGHdxmxtoFD_DhqN2TgkfYA) (Failed)                                                                                                                      | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| -          | -      | -                                                           | 2.7.6   | -                                                                                                                  | [BIP-44](https://arweave.net/zYTWn7E74vRLSeRrqGrE7TbPVEYqQAiCpIF2uvvzyA0) (Failed)                                                                                                                      | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 05/22/2024 | 21797  | [19927634](#19927634-bip-45)                                | 2.8.0   | [Etherscan](https://etherscan.io/tx/0x299a4b93b8d19f8587b648ce04e3f5e618ea461426bb2b2337993b5d6677f6a7) (`0x299a`) | [BIP-45](https://arweave.net/ZNzggcbRHS1vlX9zxtmXiX_wyb4Cj1v3uXHNcyvo8l4)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/2cd4c47f3790b49ca3edbf704d7ce7f33f7c5f07) (`2cd4c`) | `TemperatureChange`, `UpdateAverageStalkPerBdvPerSeason`, `GaugePointChange`, `BeanToMaxLpGpPerBdvRatioChange`, `FarmerGerminatingStalkBalanceChanged`, `TotalGerminatingBalanceChanged`, `TotalGerminatingStalkChanged`, `TotalStalkChangedFromGermination`, `UpdateGaugeSettings`, `AddWhitelistStatus`, `RemoveWhitelistStatus`, `UpdateWhitelistStatus`                                                                                                                                                                                                                    | `WhitelistToken`, `SeasonOfPlenty`, `ClaimPlenty`                                                                                                                                                                                                        | `WeatherChange`                                                                                                                                                                                                                                                               | -                                            |
| 05/22/2024 | 21797  | 19927634                                                    | 2.8.0   | [Etherscan](https://etherscan.io/tx/0x299a4b93b8d19f8587b648ce04e3f5e618ea461426bb2b2337993b5d6677f6a7) (`0x299a`) | [BIP-46](https://arweave.net/2enPPzc5mkN18bXnApmCJNRkxwYc-CiCsU71XPualj4)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/2f8968007c60696a7b86aa8a8daa455b987e2d42) (`2f896`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 05/24/2024 | 21830  | 19937474                                                    | 2.8.1   | [Etherscan](https://etherscan.io/tx/0x77f7b2a5b58891d4e42dc2381ac810381a426fc2bca8e07062323e8966f22b56) (`0x77f7`) | [EBIP-15](https://arweave.net/BUAXNrjoPoL3FoICcFe4Axvl3d99-LmPncAZvNFYv_M)                                                                                                                              | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/d634ce07289283b02c9c1f0c87ee5c45e0fcacad) (`d634c`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 06/02/2024 | 22043  | 20000923                                                    | 2.8.2   | [Etherscan](https://etherscan.io/tx/0xafb329f583b24e455e64be9d643b61551b31f6e18de202eed7a5fe5466725e50) (`0xafb3`) | [EBIP-16](https://arweave.net/pr5H4W_ELFdWBaFw_wHW9AIb8zaDK45ibueH7AQyswE)                                                                                                                              | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/88018a04cd36bff39b446da9829339bff2d707de) (`88018`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| -          | -      | -                                                           | 2.8.2   | -                                                                                                                  | [BIP-47](https://arweave.net/I2CjQtJe-7imPiPA6jtrftRqSK4EcAnAQBQMEGKsh6w)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/b14cc37f945d7353fb148e4424dd6351716cdaf0) (`b14cc`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 07/16/2024 | 23118  | 20321455                                                    | 2.8.3   | [Etherscan](https://etherscan.io/tx/0x60e2a439900f3a41911baea15c7ec61aa8f2b9aa97d26f6455068090772959b9) (`0x60e2`) | [EBIP-17](https://arweave.net/LU8hcRxECJRKih7RXvlPYKcVPTMzbCMk7AzyzRPJBps)                                                                                                                              | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/36b8574bdb96c1045a4d361ee0b2fe7e23e4cbcf) (`36b85`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 07/26/2024 | 23347  | 20389706                                                    | 2.9.0   | [Etherscan](https://etherscan.io/tx/0xc6fd59739ad3e9c4caf232fbad7b61c256dd9f1c72cc34171324d5d5c49df60f) (`0xc6fd`) | [BIP-48](https://arweave.net/2gPnyB6rarwoEPoFYGUcXxnI8mVbbVmPUolWvYswVls)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/1b456b2e9e756a0603cd05706e1688cde6f2d93a) (`1b456`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 08/05/2024 | 23594  | 20463431                                                    | 2.10.0  | [Etherscan](https://etherscan.io/tx/0xf7308a96c99108779adf95efe36ef48c8e78faff5eef32a88ccb672471dbbea7) (`0xf730`) | [BIP-49](https://arweave.net/N5GRNRgJxWNnE3yvQJnpPuek9eMbCeG0eRYSnCciN_4)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/b5a1e6ebc94d6ceb0095bf7a3195819dd46fed01) (`b5a1e`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 10/08/2024 | 25129  | [20921738](#20921738-bip-50)                                | 3.0.0   | [Etherscan](https://etherscan.io/tx/0x13604a17915f00e78ca8517ec47c4d42b4ae0badfa798f17b965377fdee1233a) (`0x1360`) | [BIP-50](https://arweave.net/ciB1dygmXmEjLSOWv5P1NhAf-4BhOcMCH1ZfJw5JmMs)                                                                                                                               | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/99bc4654210aac6593a5ac2a82c993f330a9089d) (`99bc4`) | `UpdatedSeedGaugeSettings`, `UpdatedOptimalPercentDepositedBdvForToken`, `UpdatedOracleImplementationForToken`, `UpdatedGaugePointImplementationForToken`, `UpdatedLiquidityWeightImplementationForToken`, `FieldAdded`, `ActiveFieldSet`, `PublishRequisition`, `CancelBlueprint`, `Tractor`, `ShipmentRoutesSet`, `UpdatedEvaluationParameters`, `Receipt`, `Shipped`, `SeasonOfPlentyWell`, `SeasonOfPlentyField`, `MigratedAccountStatus`, `MigratedPlot`, `InternalBalanceMigrated`, `MigratedPodListing`, `MigratedPodOrder`, `AddMigratedDeposit`, `FertilizerMigrated` | `FarmerGerminatingStalkBalanceChanged`, `WhitelistToken`, `Sow`, `Harvest`, `TemperatureChange`, `PodListingCreated`, `PodListingFilled`, `PodListingCancelled`, `PodOrderCreated`, `PodOrderFilled`, `PodOrderCancelled`, `PlotTransfer`, `PodApproval` | `SeedsBalanceChanged`, `RemoveWithdrawal`, `RemoveWithdrawals`, `UpdateGaugeSettings`, `Reward`, `SeasonOfPlenty`                                                                                                                                                             | -                                            |
| -          | -      | -                                                           | 3.0.0   | -                                                                                                                  | [EBIP-18](https://arweave.net/q2W9NcKsljQglNsRnuS3jBJ-XqbVJ_Rbk4KwWCJzBn4)                                                                                                                              | -                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |
| 10/13/2024 | 25202  | 263242481                                                   | 3.0.1   | [Arbiscan](https://arbiscan.io/tx/0x83f77c3b44e76d3cd23472fc17da4641eadb35e270108ea3e2d9b58ac5c17765) (`0x83f7`)   | [EBIP-19](https://arweave.net/4KFyTAVBvD3IUz5AMxfBQnB6hf3JDJs0ftbCTAj5wDE)                                                                                                                              | [Commit](https://github.com/BeanstalkFarms/Beanstalk/commit/a26664dd64ca39bdc1db98355736363f29a9fc06) (`a2666`) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                        | -                                                                                                                                                                                                                                                                             | -                                            |

## Event Changes by Block

### [BIP-0](https://arweave.net/cBvmRC2xNv9pWvT_e-0xkhTIpZc6PPtNqPNzO3c2H5I)

#### Modified <a href="#modified-bip-0" id="modified-bip-0"></a>

(original event listed first, updated event second)

[protocol/contracts/farm/facets/GovernanceFacet/GovernanceFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/43c9158f2b1c0fe3624358abd91f953723d8c866#diff-3907f5caed0ab6ad0df31d325fc239bfd9670ab37c230f832f513ad4e5703d9fL24)

```solidity
event Vote(address indexed account, uint32 indexed bip, uint256 stalk, uint256 seeds);
```

```solidity
event Vote(address indexed account, uint32 indexed bip, uint256 roots);
```

[protocol/contracts/farm/facets/GovernanceFacet/GovernanceFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/43c9158f2b1c0fe3624358abd91f953723d8c866#diff-3907f5caed0ab6ad0df31d325fc239bfd9670ab37c230f832f513ad4e5703d9fL25)

```solidity
event Unvote(address indexed account, uint32 indexed bip, uint256 stalk, uint256 seeds);
```

```solidity
event Unvote(address indexed account, uint32 indexed bip, uint256 roots);
```

### 13597738 ([BIP-2](https://arweave.net/CoqappwrTQJ3Q9y6Zi0QHKFlCxZBfm6RMxXeHvgvkag))

#### Added <a href="#added-bip-2" id="added-bip-2"></a>

[protocol/contracts/farm/facets/ClaimFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/77b115f29e7690887bfc59f9533ba68b55edd6d2#diff-ad8d54e7c9d45b374a21879a82882d4c2790a7c98f0d732f018b32bdf573e267R25)\
[protocol/contracts/farm/facets/SiloFacet/SiloFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/77b115f29e7690887bfc59f9533ba68b55edd6d2#diff-91ba8e950b32cab070018cac4908b7dc6d980b3c04b6c3ad374eef3ba32252efR17)\
[protocol/contracts/libraries/LibMarket.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/77b115f29e7690887bfc59f9533ba68b55edd6d2#diff-7506e0b7c56720bec157294e2b64149482e5c7e95946fc38d935b6b2321dad32R19)

```solidity
event BeanAllocation(address indexed account, uint256 beans);
```

[protocol/contracts/libraries/LibClaim.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/77b115f29e7690887bfc59f9533ba68b55edd6d2#diff-08396fe9ce36bdb8c5916101dae589fa04feec7d84f69a9a3b0e4cbdcd7b5859R23)

```solidity
event BeanClaim(address indexed account, uint32[] withdrawals, uint256 beans);
```

[protocol/contracts/libraries/LibClaim.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/77b115f29e7690887bfc59f9533ba68b55edd6d2#diff-08396fe9ce36bdb8c5916101dae589fa04feec7d84f69a9a3b0e4cbdcd7b5859R24)

```solidity
event LPClaim(address indexed account, uint32[] withdrawals, uint256 lp);
```

[protocol/contracts/libraries/LibClaim.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/77b115f29e7690887bfc59f9533ba68b55edd6d2#diff-08396fe9ce36bdb8c5916101dae589fa04feec7d84f69a9a3b0e4cbdcd7b5859R25)

```solidity
event EtherClaim(address indexed account, uint256 ethereum);
```

[protocol/contracts/libraries/LibClaim.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/77b115f29e7690887bfc59f9533ba68b55edd6d2#diff-08396fe9ce36bdb8c5916101dae589fa04feec7d84f69a9a3b0e4cbdcd7b5859R26)

```solidity
event Harvest(address indexed account, uint256[] plots, uint256 beans);
```

### 13735230 ([BIP-4](https://arweave.net/Msk8Mbz7CPDN8vmQmMI8dtqCr4ydTZ8jN1jpPFqQ9lM))

#### Added <a href="#added-bip-4" id="added-bip-4"></a>

[protocol/contracts/farm/facets/FundraiserFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/76a6a450b721a82632f0fa8a9268e6e432c77142#diff-e5c65362a91c184f5429eb76bc1ed90eab0c9fbd263924da9a3612b7f1c1769bR19)

```solidity
event CreateFundraiser(uint32 indexed id, address fundraiser, address token, uint256 amount);
```

[protocol/contracts/farm/facets/FundraiserFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/76a6a450b721a82632f0fa8a9268e6e432c77142#diff-e5c65362a91c184f5429eb76bc1ed90eab0c9fbd263924da9a3612b7f1c1769bR20)

```solidity
event FundFundraiser(address indexed account, uint32 indexed id, uint256 amount);
```

[protocol/contracts/farm/facets/FundraiserFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/76a6a450b721a82632f0fa8a9268e6e432c77142#diff-e5c65362a91c184f5429eb76bc1ed90eab0c9fbd263924da9a3612b7f1c1769bR21)

```solidity
event CompleteFundraiser(uint32 indexed id);
```

### 13800636 ([BIP-7](https://arweave.net/ixYmHgocGz9idIlswTqvbZAjWh8OibGL--D1mgojlwg))

#### Added <a href="#added-bip-7" id="added-bip-7"></a>

[protocol/contracts/farm/facets/ConvertFacet/ConvertSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/b3c9c66a679bd3dc60cbaa5ebfa5d32b3a57404a#diff-8c9551c8e3f01e2c6703ffc35215bc65e93d5d1b9b7beae23dac6bd6eb50c3a4R19)

```solidity
event LPDeposit(address indexed account, uint256 season, uint256 lp, uint256 seeds);
```

[protocol/contracts/farm/facets/ConvertFacet/ConvertSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/b3c9c66a679bd3dc60cbaa5ebfa5d32b3a57404a#diff-8c9551c8e3f01e2c6703ffc35215bc65e93d5d1b9b7beae23dac6bd6eb50c3a4R20)

```solidity
event LPRemove(address indexed account, uint32[] crates, uint256[] crateLP, uint256 lp);
```

[protocol/contracts/farm/facets/ConvertFacet/ConvertSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/b3c9c66a679bd3dc60cbaa5ebfa5d32b3a57404a#diff-8c9551c8e3f01e2c6703ffc35215bc65e93d5d1b9b7beae23dac6bd6eb50c3a4R21)

```solidity
event BeanRemove(address indexed account, uint32[] crates, uint256[] crateBeans, uint256 beans);
```

### 13953949 ([BIP-9](https://arweave.net/bvq3Hyql5eBesBZGSy5GGdiz0bkkk2dxXIpcO2MiusM))

#### Added <a href="#added-bip-9" id="added-bip-9"></a>

[protocol/contracts/farm/facets/FieldFacet/BeanDibbler.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/01db99d9576378ba2bbc5486e5d82947e2b7f588#diff-b3ac2606614e807e8ce3a30cde187d28835d72efff724a4e7dbf738ebdcd2162R21)\
[protocol/contracts/farm/facets/FundraiserFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/01db99d9576378ba2bbc5486e5d82947e2b7f588#diff-e5c65362a91c184f5429eb76bc1ed90eab0c9fbd263924da9a3612b7f1c1769bR24)

```solidity
event Sow(address indexed account, uint256 index, uint256 beans, uint256 pods);
```

[protocol/contracts/farm/facets/GovernanceFacet/GovernanceFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/01db99d9576378ba2bbc5486e5d82947e2b7f588#diff-3907f5caed0ab6ad0df31d325fc239bfd9670ab37c230f832f513ad4e5703d9fR25)

```solidity
event VoteList(address indexed account, uint32[] indexed bips, bool[] votes, uint256 roots);
```

[protocol/contracts/farm/facets/SiloFacet/BeanSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/01db99d9576378ba2bbc5486e5d82947e2b7f588#diff-706e1592cb5c83940e3cf46c2cfd4984443865065378ee69c8b2f85f41cc2764R19)\
[protocol/contracts/libraries/Silo/LibBeanSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/01db99d9576378ba2bbc5486e5d82947e2b7f588#diff-4b40c9d3c8f7e7ba66284a0abfd240a5980285dd3228fe91b04846629c02353fR19)

```solidity
event BeanDeposit(address indexed account, uint256 season, uint256 beans);
```

[protocol/contracts/libraries/Silo/LibLPSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/01db99d9576378ba2bbc5486e5d82947e2b7f588#diff-294916db82da0ccf34547aabd23b3cd8e4c7cd7cb061bdba53c3fe2b914aa33bR20)

```solidity
event LPDeposit(address indexed account, uint256 season, uint256 lp, uint256 seeds);
```

### 14148509 ([BIP-11](https://arweave.net/4Ltm8q74VIobeQ9dRB8wSYR7wWpCbe6vX0TaQhpIMnE))

#### Added <a href="#added-bip-11" id="added-bip-11"></a>

[protocol/contracts/farm/facets/MarketplaceFacet/Listing.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/75a67fc94cf2637ac1d7d7c89645492e31423fed#diff-0f36710c61a8027ff271fb1dac833ba6b2426b0c6195b94ef04302c83ccc95a4R30)

```solidity
event PodListingCreated(
    address indexed account, 
    uint256 index, 
    uint256 start, 
    uint256 amount, 
    uint24 pricePerPod, 
    uint256 maxHarvestableIndex, 
    bool toWallet
);
```

[protocol/contracts/farm/facets/MarketplaceFacet/Listing.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/75a67fc94cf2637ac1d7d7c89645492e31423fed#diff-0f36710c61a8027ff271fb1dac833ba6b2426b0c6195b94ef04302c83ccc95a4R39)

```solidity
event PodListingFilled(
    address indexed from, 
    address indexed to, 
    uint256 index, 
    uint256 start, 
    uint256 amount
);
```

[protocol/contracts/farm/facets/MarketplaceFacet/Listing.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/75a67fc94cf2637ac1d7d7c89645492e31423fed#diff-0f36710c61a8027ff271fb1dac833ba6b2426b0c6195b94ef04302c83ccc95a4R46)\
[protocol/contracts/libraries/LibClaim.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/75a67fc94cf2637ac1d7d7c89645492e31423fed#diff-08396fe9ce36bdb8c5916101dae589fa04feec7d84f69a9a3b0e4cbdcd7b5859R28)

```solidity
event PodListingCancelled(address indexed account, uint256 index);
```

[protocol/contracts/farm/facets/MarketplaceFacet/Order.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/75a67fc94cf2637ac1d7d7c89645492e31423fed#diff-dd712b1fbf1d2e5f977e8f768617744b9e1bf368765325dbc07fdfb04e308893R24)

```solidity
event PodOrderCreated(
    address indexed account, 
    bytes32 id, 
    uint256 amount, 
    uint24 pricePerPod, 
    uint256 maxPlaceInLine
);
```

[protocol/contracts/farm/facets/MarketplaceFacet/Order.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/75a67fc94cf2637ac1d7d7c89645492e31423fed#diff-dd712b1fbf1d2e5f977e8f768617744b9e1bf368765325dbc07fdfb04e308893R31)

```solidity
event PodOrderFilled(
    address indexed from, 
    address indexed to, 
    bytes32 id, 
    uint256 index, 
    uint256 start, 
    uint256 amount
);
```

[protocol/contracts/farm/facets/MarketplaceFacet/Order.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/75a67fc94cf2637ac1d7d7c89645492e31423fed#diff-dd712b1fbf1d2e5f977e8f768617744b9e1bf368765325dbc07fdfb04e308893R39)

```solidity
event PodOrderCancelled(address indexed account, bytes32 id);
```

[protocol/contracts/farm/facets/MarketplaceFacet/PodTransfer.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/75a67fc94cf2637ac1d7d7c89645492e31423fed#diff-52927c17613e65b50fba01a6ac31aa910f50d39691d9a52e9638572eb02bc35eR23)

```solidity
event PlotTransfer(address indexed from, address indexed to, uint256 indexed id, uint256 pods);
```

[protocol/contracts/farm/facets/MarketplaceFacet/PodTransfer.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/75a67fc94cf2637ac1d7d7c89645492e31423fed#diff-52927c17613e65b50fba01a6ac31aa910f50d39691d9a52e9638572eb02bc35eR24)

```solidity
event PodApproval(address indexed owner, address indexed spender, uint256 pods);
```

### 14218934 ([BIP-12](https://arweave.net/H7qpWcc4SynAgFPWF4qT_6E7Llsqc2a6_Xx41o0BAqM))

#### Added <a href="#added-bip-12" id="added-bip-12"></a>

[protocol/contracts/farm/facets/SiloV2Facet/SiloV2Facet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/4a4a63b6ce31a4b80849bc0dbe943239c7627151#diff-f19ac1ef64f20566e5f443219668aaf19ead845d8c0f7d02de48cf0400c82c1cR17)

```solidity
event BeanAllocation(address indexed account, uint256 beans);
```

[protocol/contracts/farm/facets/SiloV2Facet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/4a4a63b6ce31a4b80849bc0dbe943239c7627151#diff-1bcf59ceaba4c726293ebe1dbb33f599a1b60c5b3201e088e7e30719acad803dR25)\
[protocol/contracts/libraries/Silo/LibTokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/4a4a63b6ce31a4b80849bc0dbe943239c7627151#diff-a0abb2f4046ee1f0caff2716c2c0a21755aa0eac99ab5e6519fcb77d989a196cR21)

```solidity
event Deposit(address indexed account, address indexed token, uint256 season, uint256 amount, uint256 bdv);
```

[protocol/contracts/farm/facets/SiloV2Facet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/4a4a63b6ce31a4b80849bc0dbe943239c7627151#diff-1bcf59ceaba4c726293ebe1dbb33f599a1b60c5b3201e088e7e30719acad803dR26)

```solidity
event RemoveSeason(address indexed account, address indexed token, uint32 season, uint256 amount);
```

[protocol/contracts/farm/facets/SiloV2Facet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/4a4a63b6ce31a4b80849bc0dbe943239c7627151#diff-1bcf59ceaba4c726293ebe1dbb33f599a1b60c5b3201e088e7e30719acad803dR27)

```solidity
event Withdraw(address indexed account, address indexed token, uint32 season, uint256 amount);
```

[protocol/contracts/farm/facets/SiloV2Facet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/4a4a63b6ce31a4b80849bc0dbe943239c7627151#diff-1bcf59ceaba4c726293ebe1dbb33f599a1b60c5b3201e088e7e30719acad803dR30)

```solidity
event ClaimSeasons(address indexed account, address indexed token, uint32[] seasons, uint256 amount);
```

[protocol/contracts/farm/facets/SiloV2Facet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/4a4a63b6ce31a4b80849bc0dbe943239c7627151#diff-1bcf59ceaba4c726293ebe1dbb33f599a1b60c5b3201e088e7e30719acad803dR31)

```solidity
event ClaimSeason(address indexed account, address indexed token, uint32 season, uint256 amount);
```

### 14498034-14498067 (Hotfix: Omniscia Audit Update)

#### Modified <a href="#modified-hotfix-omniscia" id="modified-hotfix-omniscia"></a>

(original event listed first, updated event second)

[protocol/contracts/farm/facets/GovernanceFacet/GovernanceFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/ee4720cdb449d5b6ff2b789083792c4395628674#diff-3907f5caed0ab6ad0df31d325fc239bfd9670ab37c230f832f513ad4e5703d9fL25)

```solidity
event VoteList(address indexed account, uint32[] indexed bips, bool[] votes, uint256 roots);
```

```solidity
event VoteList(address indexed account, uint32[] bips, bool[] votes, uint256 roots);
```

### 15277988-15278963 ([BIP-21](https://arweave.net/3JDxWivppLxGjApfZ8uKQZUYgzQ5NFHDjvGr8edPeXk))

* [Added](#added-bip-21)
* [Removed](#removed-bip-21)
* [Modified](#modified-bip-21)

#### Added <a href="#added-bip-21" id="added-bip-21"></a>

[protocol/contracts/farm/facets/ConvertFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-7e0e6e954de271de523ec56c6efd67e5a1f4f53be49d2e5b28c35038d505bd67R24)

```solidity
event Convert(
    address indexed account,
    address fromToken,
    address toToken,
    uint256 fromAmount,
    uint256 toAmount
);
```

[protocol/contracts/farm/facets/ConvertFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-7e0e6e954de271de523ec56c6efd67e5a1f4f53be49d2e5b28c35038d505bd67R32)\
[protocol/contracts/farm/facets/SiloFacet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-9e1826d5d2d843fe5048ff887b8d4b892c6242c1a5714db89d1d09c5fd64535dR27)

```solidity
event RemoveDeposits(
    address indexed account,
    address indexed token,
    uint32[] seasons,
    uint256[] amounts,
    uint256 amount
);
```

[protocol/contracts/farm/facets/FertilizerFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-aca7db8a5a733218b3d32f809676127f81a4766077fe4ee97199ca6fbd4e6b4cR23)\
[protocol/contracts/libraries/LibFertilizer.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-2c3c922324ec7a8d4cc663ba2e4d411b812599a19d65111c97bd93bdf7e8c298R23)

```solidity
event SetFertilizer(uint128 id, uint128 bpf);
```

[protocol/contracts/farm/facets/OwnershipFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-b60631446b45321ddb14ba0c6419ea62cba05d932c588d8dae9e4511912cb3a0R13)

```solidity
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
```

[protocol/contracts/farm/facets/SeasonFacet/Oracle.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-8a9973d3ca75326d3907effaed24fffd2327d0c1fa07879f3f6abe50548f0af4R20)

```solidity
event MetapoolOracle(uint32 indexed season, int256 deltaB, uint256[2] balances);
```

[protocol/contracts/farm/facets/SeasonFacet/Sun.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-e8d27425ff78d2d13e0b1d425161067f6a0b074a32a6863307c5fdc55ae01c32R23)

```solidity
event Reward(uint32 indexed season, uint256 toField, uint256 toSilo, uint256 toFertilizer);
```

[protocol/contracts/farm/facets/SeasonFacet/Sun.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-e8d27425ff78d2d13e0b1d425161067f6a0b074a32a6863307c5fdc55ae01c32R24)

```solidity
event Soil(uint32 indexed season, uint256 soil);
```

[protocol/contracts/farm/facets/SiloFacet/Silo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-63b44e99d9589e3b72bf326194a4e1694742911dea910fbc4f048865fa5d63efR21)

```solidity
event Plant(
    address indexed account,
    uint256 beans
);
```

[protocol/contracts/farm/facets/SiloFacet/Silo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-63b44e99d9589e3b72bf326194a4e1694742911dea910fbc4f048865fa5d63efR26)

```solidity
event ClaimPlenty(
    address indexed account,
    uint256 plenty
);
```

[protocol/contracts/farm/facets/SiloFacet/Silo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-63b44e99d9589e3b72bf326194a4e1694742911dea910fbc4f048865fa5d63efR31)\
[protocol/contracts/farm/init/replant/Replant7.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-49e0eefd46f0ec71aea3ad2064124a0e69282c608ad31ad869404133d9f06952R38)\
[protocol/contracts/libraries/Silo/LibSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-fbd431ce899b0679e919b2bf1fa828e50eeddd381e4efd2012eca396bb7758daR19)

```solidity
event SeedsBalanceChanged(
    address indexed account,
    int256 delta
);
```

[protocol/contracts/farm/facets/SiloFacet/Silo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-63b44e99d9589e3b72bf326194a4e1694742911dea910fbc4f048865fa5d63efR36)\
[protocol/contracts/farm/init/replant/Replant7.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-49e0eefd46f0ec71aea3ad2064124a0e69282c608ad31ad869404133d9f06952R43)\
[protocol/contracts/libraries/Silo/LibSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-fbd431ce899b0679e919b2bf1fa828e50eeddd381e4efd2012eca396bb7758daR24)

```solidity
event StalkBalanceChanged(
    address indexed account,
    int256 delta,
    int256 deltaRoots
);
```

[protocol/contracts/farm/facets/SiloFacet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-9e1826d5d2d843fe5048ff887b8d4b892c6242c1a5714db89d1d09c5fd64535dR20)\
[protocol/contracts/farm/init/replant/Replant5.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-cfe962b0939f5edf14c7a62b9b42f807cc1d663baeb66ab209bac4922f52ee74R29)\
[protocol/contracts/farm/init/replant/Replant6.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-8385eac33c351db694b39d2453e81dde76dd579eb217e3c0715bcd3ac24d2107R42)\
[protocol/contracts/libraries/Silo/LibTokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-a0abb2f4046ee1f0caff2716c2c0a21755aa0eac99ab5e6519fcb77d989a196cR20)

```solidity
event AddDeposit(
    address indexed account,
    address indexed token,
    uint32 season,
    uint256 amount,
    uint256 bdv
);
```

[protocol/contracts/farm/facets/SiloFacet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-9e1826d5d2d843fe5048ff887b8d4b892c6242c1a5714db89d1d09c5fd64535dR34)

```solidity
event RemoveDeposit(
    address indexed account,
    address indexed token,
    uint32 season,
    uint256 amount
);
```

[protocol/contracts/farm/facets/SiloFacet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-9e1826d5d2d843fe5048ff887b8d4b892c6242c1a5714db89d1d09c5fd64535dR41)

```solidity
event AddWithdrawal(
    address indexed account,
    address indexed token,
    uint32 season,
    uint256 amount
);
```

[protocol/contracts/farm/facets/SiloFacet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-9e1826d5d2d843fe5048ff887b8d4b892c6242c1a5714db89d1d09c5fd64535dR47)

```solidity
event RemoveWithdrawals(
    address indexed account,
    address indexed token,
    uint32[] seasons,
    uint256 amount
);
```

[protocol/contracts/farm/facets/SiloFacet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-9e1826d5d2d843fe5048ff887b8d4b892c6242c1a5714db89d1d09c5fd64535dR53)

```solidity
event RemoveWithdrawal(
    address indexed account,
    address indexed token,
    uint32 season,
    uint256 amount
);
```

[protocol/contracts/farm/facets/TokenFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-3608311fd79517dc096315b15aa8f3e1a88119dd2e9fc06c01ed2a7788280cc4R27)\
[protocol/contracts/libraries/Token/LibBalance.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-7a8477cf573ca254e42a5d44d0bfcf623d2e70eda010b81d205229b039688534R29)

```solidity
event InternalBalanceChanged(
    address indexed user,
    IERC20 indexed token,
    int256 delta
);
```

```solidity
event InternalBalanceChanged(
    address indexed account,
    IERC20 indexed token,
    int256 delta
);
```

[protocol/contracts/farm/facets/UnripeFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-72ac8a93586910d97d780ee70c8e03b3bf36bd8142285f68cd0003b65192ba97R30)\
[protocol/contracts/farm/init/replant/Replant8.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-a8fa78dacfa9927910e9b75d3aa947634e2cba05da9be95c6b81b7cd30052184R41)

```solidity
event AddUnripeToken(
    address indexed unripeToken,
    address indexed underlyingToken,
    bytes32 merkleRoot
);
```

[protocol/contracts/farm/facets/UnripeFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-72ac8a93586910d97d780ee70c8e03b3bf36bd8142285f68cd0003b65192ba97R36)\
[protocol/contracts/libraries/LibUnripe.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-3b41a1a9d62302224bc0367bf7eabfacbf0a326b614136834477c89b06bc57c0R20)

```solidity
event ChangeUnderlying(address indexed token, int256 underlying);
```

[protocol/contracts/farm/facets/UnripeFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-72ac8a93586910d97d780ee70c8e03b3bf36bd8142285f68cd0003b65192ba97R38)

```solidity
event Chop(
    address indexed account,
    address indexed token,
    uint256 amount,
    uint256 underlying
);
```

[protocol/contracts/farm/facets/UnripeFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-72ac8a93586910d97d780ee70c8e03b3bf36bd8142285f68cd0003b65192ba97R45)

```solidity
event Pick(
    address indexed account,
    address indexed token,
    uint256 amount
);
```

[protocol/contracts/farm/facets/WhitelistFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-f8053b24c771937f45c38dbe46be4003804742bb71bea8633d8921df0fffb3f4R17)\
[protocol/contracts/libraries/Silo/LibWhitelist.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-dc7f60cc6e63597b30e6d00ab9e69f139cdc59411ff3113e7a54d7b331b3d1ebR30)

```solidity
event WhitelistToken(
    address indexed token,
    bytes4 selector,
    uint256 seeds,
    uint256 stalk
);
```

[protocol/contracts/farm/facets/WhitelistFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-f8053b24c771937f45c38dbe46be4003804742bb71bea8633d8921df0fffb3f4R24)\
[protocol/contracts/libraries/Silo/LibWhitelist.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-dc7f60cc6e63597b30e6d00ab9e69f139cdc59411ff3113e7a54d7b331b3d1ebR37)

```solidity
event DewhitelistToken(address indexed token);
```

[protocol/contracts/farm/init/replant/Replant1.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-f50e914e912bcc6ef188bbadd80ca2afc20be753df1f2a039f7a7aacd0c5f109R65)\
[protocol/contracts/farm/init/replant/Replant6.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-8385eac33c351db694b39d2453e81dde76dd579eb217e3c0715bcd3ac24d2107R35)

```solidity
event RemoveSeason(
    address indexed account,
    address indexed token,
    uint32 season,
    uint256 amount
);
```

[protocol/contracts/farm/init/replant/Replant3.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-f4eca3846e248cf191676f1f702efec6ef5e74af246fdf387559db81faf6709cR28)

```solidity
event PodOrderCancelled(address indexed account, bytes32 id);
```

[protocol/contracts/fertilizer/Fertilizer.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-c78ac06ca8e0b9f25acf165566647f6b50be02077c729ac61780c455b5d42909R22)

```solidity
event ClaimFertilizer(uint256[] ids, uint256 beans);
```

[protocol/contracts/libraries/Oracle/LibCurveOracle.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-85eb841ba782f36622f3e10297840a455ff18991bd913b917b5c82516cf21efaR31)

```solidity
event MetapoolOracle(uint32 indexed season, int256 deltaB, uint256[2] balances);
```

[protocol/contracts/mocks/mockFacets/MockConvertFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-cf7f946e4a344af682826461c1044b50b7c1701f19f60672e7f8e8e95597abbbR18)

```solidity
event MockConvert(uint256 stalkRemoved, uint256 bdvRemoved);
```

[protocol/contracts/mocks/mockFacets/MockSeasonFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-5157a7420240c0bc9411484bc2d2c81be1a0e00cb2d017aec8310900a64bf0c7R25)

```solidity
event UpdateTWAPs(uint256[2] balances);
```

[protocol/contracts/mocks/mockFacets/MockSeasonFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-5157a7420240c0bc9411484bc2d2c81be1a0e00cb2d017aec8310900a64bf0c7R26)

```solidity
event DeltaB(int256 deltaB);
```

#### Removed <a href="#removed-bip-21" id="removed-bip-21"></a>

[protocol/contracts/farm/facets/ClaimFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-ad8d54e7c9d45b374a21879a82882d4c2790a7c98f0d732f018b32bdf573e267L24)\
[protocol/contracts/libraries/LibClaim.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-08396fe9ce36bdb8c5916101dae589fa04feec7d84f69a9a3b0e4cbdcd7b5859L27)

```solidity
event EtherClaim(address indexed account, uint256 ethereum);
```

[protocol/contracts/farm/facets/ClaimFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-ad8d54e7c9d45b374a21879a82882d4c2790a7c98f0d732f018b32bdf573e267L26)\
[protocol/contracts/farm/facets/SiloFacet/SiloFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-91ba8e950b32cab070018cac4908b7dc6d980b3c04b6c3ad374eef3ba32252efL18)\
[protocol/contracts/farm/facets/SiloV2Facet/SiloV2Facet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-f19ac1ef64f20566e5f443219668aaf19ead845d8c0f7d02de48cf0400c82c1cL18)\
[protocol/contracts/libraries/LibMarket.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-7506e0b7c56720bec157294e2b64149482e5c7e95946fc38d935b6b2321dad32L21)

```solidity
event BeanAllocation(address indexed account, uint256 beans);
```

[protocol/contracts/farm/facets/ConvertFacet/ConvertSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-8c9551c8e3f01e2c6703ffc35215bc65e93d5d1b9b7beae23dac6bd6eb50c3a4L27)\
[protocol/contracts/farm/facets/SiloFacet/LPSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-68b518bb08403873e93897f370d42db6e65394824a86d35c6fe50170b3f9a417L21)\
[protocol/contracts/libraries/Silo/LibLPSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-294916db82da0ccf34547aabd23b3cd8e4c7cd7cb061bdba53c3fe2b914aa33bL23)

```solidity
event LPDeposit(address indexed account, uint256 season, uint256 lp, uint256 seeds);
```

[protocol/contracts/farm/facets/GovernanceFacet/GovernanceFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-3907f5caed0ab6ad0df31d325fc239bfd9670ab37c230f832f513ad4e5703d9fL23)

```solidity
event Proposal(address indexed account, uint32 indexed bip, uint256 indexed start, uint256 period);
```

[protocol/contracts/farm/facets/GovernanceFacet/GovernanceFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-3907f5caed0ab6ad0df31d325fc239bfd9670ab37c230f832f513ad4e5703d9fL24)

```solidity
event VoteList(address indexed account, uint32[] bips, bool[] votes, uint256 roots);
```

[protocol/contracts/farm/facets/GovernanceFacet/GovernanceFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-3907f5caed0ab6ad0df31d325fc239bfd9670ab37c230f832f513ad4e5703d9fL25)

```solidity
event Unvote(address indexed account, uint32 indexed bip, uint256 roots);
```

[protocol/contracts/farm/facets/GovernanceFacet/GovernanceFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-3907f5caed0ab6ad0df31d325fc239bfd9670ab37c230f832f513ad4e5703d9fL26)

```solidity
event Commit(address indexed account, uint32 indexed bip);
```

[protocol/contracts/farm/facets/GovernanceFacet/GovernanceFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-3907f5caed0ab6ad0df31d325fc239bfd9670ab37c230f832f513ad4e5703d9fL27)

```solidity
event Incentivization(address indexed account, uint256 beans);
```

[protocol/contracts/farm/facets/GovernanceFacet/VotingBooth.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-a5bcf732bafa238bd65533a208b1a00761960bdde5cc0a1dbb5dd9f83b8952b5L19)

```solidity
event Vote(address indexed account, uint32 indexed bip, uint256 roots);
```

[protocol/contracts/farm/facets/SeasonFacet/SeasonFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-95fd5c93d191f2751e67a36145f550c858847eccbe240fa4806b54316af8db3eL24)

```solidity
event SeasonSnapshot(
    uint32 indexed season,
    uint256 price,
    uint256 supply,
    uint256 stalk,
    uint256 seeds,
    uint256 podIndex,
    uint256 harvestableIndex
);
```

[protocol/contracts/farm/facets/SeasonFacet/Sun.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-e8d27425ff78d2d13e0b1d425161067f6a0b074a32a6863307c5fdc55ae01c32L19)

```solidity
event SupplyIncrease(
    uint256 indexed season,
    uint256 price,
    uint256 newHarvestable,
    uint256 newSilo,
    int256 newSoil
);
```

[protocol/contracts/farm/facets/SeasonFacet/Sun.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-e8d27425ff78d2d13e0b1d425161067f6a0b074a32a6863307c5fdc55ae01c32L26)

```solidity
event SupplyDecrease(uint256 indexed season, uint256 price, int256 newSoil);
```

[protocol/contracts/farm/facets/SeasonFacet/Sun.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-e8d27425ff78d2d13e0b1d425161067f6a0b074a32a6863307c5fdc55ae01c32L27)

```solidity
event SupplyNeutral(uint256 indexed season, int256 newSoil);
```

[protocol/contracts/farm/facets/SiloFacet/BeanSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-706e1592cb5c83940e3cf46c2cfd4984443865065378ee69c8b2f85f41cc2764L19)\
[protocol/contracts/libraries/Silo/LibBeanSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-4b40c9d3c8f7e7ba66284a0abfd240a5980285dd3228fe91b04846629c02353fL19)\
[protocol/contracts/libraries/Silo/LibSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-fbd431ce899b0679e919b2bf1fa828e50eeddd381e4efd2012eca396bb7758daL21)

```solidity
event BeanDeposit(address indexed account, uint256 season, uint256 beans);
```

[protocol/contracts/farm/facets/SiloFacet/BeanSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-706e1592cb5c83940e3cf46c2cfd4984443865065378ee69c8b2f85f41cc2764L21)

```solidity
event BeanWithdraw(address indexed account, uint256 season, uint256 beans);
```

[protocol/contracts/farm/facets/SiloFacet/LPSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-68b518bb08403873e93897f370d42db6e65394824a86d35c6fe50170b3f9a417L23)

```solidity
event LPWithdraw(address indexed account, uint256 season, uint256 lp);
```

[protocol/contracts/farm/facets/SiloV2Facet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-1bcf59ceaba4c726293ebe1dbb33f599a1b60c5b3201e088e7e30719acad803dL24)\
[protocol/contracts/libraries/Silo/LibTokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-a0abb2f4046ee1f0caff2716c2c0a21755aa0eac99ab5e6519fcb77d989a196cL21)

```solidity
event Deposit(address indexed account, address indexed token, uint256 season, uint256 amount, uint256 bdv);
```

[protocol/contracts/farm/facets/SiloV2Facet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-1bcf59ceaba4c726293ebe1dbb33f599a1b60c5b3201e088e7e30719acad803dL26)

```solidity
event RemoveSeason(address indexed account, address indexed token, uint32 season, uint256 amount);
```

[protocol/contracts/farm/facets/SiloV2Facet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-1bcf59ceaba4c726293ebe1dbb33f599a1b60c5b3201e088e7e30719acad803dL28)

```solidity
event Withdraw(address indexed account, address indexed token, uint32 season, uint256 amount);
```

#### Modified <a href="#modified-bip-21" id="modified-bip-21"></a>

(original event listed first, updated event second)

[protocol/contracts/farm/facets/MarketplaceFacet/Listing.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-0f36710c61a8027ff271fb1dac833ba6b2426b0c6195b94ef04302c83ccc95a4L30)

```solidity
event PodListingCreated(
    address indexed account,
    uint256 index,
    uint256 start,
    uint256 amount,
    uint24 pricePerPod,
    uint256 maxHarvestableIndex,
    bool toWallet
);
```

```solidity
event PodListingCreated(
    address indexed account,
    uint256 index,
    uint256 start,
    uint256 amount,
    uint24 pricePerPod,
    uint256 maxHarvestableIndex,
    LibTransfer.To mode
);
```

[protocol/contracts/farm/facets/SeasonFacet/Weather.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-1e7346883f94c87e796750ccae86b827b7f5da9d03ed5f658ffba09cad702938L23)

```solidity
event SeasonOfPlenty(uint256 indexed season, uint256 eth, uint256 harvestable);
```

```solidity
event SeasonOfPlenty(
    uint256 indexed season,
    uint256 amount,
    uint256 toField
);
```

[protocol/contracts/farm/facets/GovernanceFacet/GovernanceFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-3907f5caed0ab6ad0df31d325fc239bfd9670ab37c230f832f513ad4e5703d9fL28)\
[protocol/contracts/farm/facets/PauseFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-504f69898e3217ae44e4aa5bffa84f9737c67258cdc35b9ebec5fafe72858373R21)

```solidity
event Pause(address account, uint256 timestamp);
```

```solidity
event Pause(uint256 timestamp);
```

[protocol/contracts/farm/facets/GovernanceFacet/GovernanceFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/f0e29aae99ddca90085d8dfdc990cff88451d357#diff-3907f5caed0ab6ad0df31d325fc239bfd9670ab37c230f832f513ad4e5703d9fL29)

```solidity
event Unpause(address account, uint256 timestamp, uint256 timePassed);
```

```solidity
event Unpause(uint256 timestamp, uint256 timePassed);
```

### 15685220 ([BIP-24](https://arweave.net/388_OnMbLZt9WYodaLiPMeLmGoTsXfXl8WUcJMEDcUQ))

#### Added <a href="#added-bip-24" id="added-bip-24"></a>

[protocol/contracts/farm/facets/SiloFacet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/9ca85613d40a3883377de0d9377623d49fff5b9c#diff-9e1826d5d2d843fe5048ff887b8d4b892c6242c1a5714db89d1d09c5fd64535dR60)

```solidity
event DepositApproval(
    address indexed owner,
    address indexed spender,
    address token,
    uint256 amount
);
```

[protocol/contracts/farm/init/InitSiloEvents.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/9ca85613d40a3883377de0d9377623d49fff5b9c#diff-140e985985793b183874116547ffc1b30fdcfc065b4cc7b590e3a6847eba4cc6R25)

```solidity
event SeedsBalanceChanged(
    address indexed account,
    int256 delta
);
```

[protocol/contracts/farm/init/InitSiloEvents.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/9ca85613d40a3883377de0d9377623d49fff5b9c#diff-140e985985793b183874116547ffc1b30fdcfc065b4cc7b590e3a6847eba4cc6R30)

```solidity
event StalkBalanceChanged(
    address indexed account,
    int256 delta,
    int256 deltaRoots
);
```

### 15703994 ([BIP-24 Event Emissions](https://arweave.net/388_OnMbLZt9WYodaLiPMeLmGoTsXfXl8WUcJMEDcUQ))

#### Re-emissions <a href="#re-emissions-bip-24" id="re-emissions-bip-24"></a>

[protocol/contracts/farm/init/InitSiloEvents.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/9ca85613d40a3883377de0d9377623d49fff5b9c#diff-140e985985793b183874116547ffc1b30fdcfc065b4cc7b590e3a6847eba4cc6R25)

```solidity
event SeedsBalanceChanged(
    address indexed account,
    int256 delta
);
```

[protocol/contracts/farm/init/InitSiloEvents.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/9ca85613d40a3883377de0d9377623d49fff5b9c#diff-140e985985793b183874116547ffc1b30fdcfc065b4cc7b590e3a6847eba4cc6R30)

```solidity
event StalkBalanceChanged(
    address indexed account,
    int256 delta,
    int256 deltaRoots
);
```

### 15951072 ([BIP-29](https://arweave.net/OfWylBAxD5KyGJBWrQto2EyeYpzc-MqfaroXMQ1bk5w))

* [Added](#added-bip-29)
* [Modified](#modified-bip-29)

#### Added <a href="#added-bip-29" id="added-bip-29"></a>

[protocol/contracts/farm/facets/TokenFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2#diff-3608311fd79517dc096315b15aa8f3e1a88119dd2e9fc06c01ed2a7788280cc4R36)\
[protocol/contracts/libraries/Token/LibTokenApprove.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2#diff-19e2e02374b71d2566709f2b3070111cd1b83ba90d8696c6881e35b23221b49bR14)

```solidity
event TokenApproval(
    address indexed owner,
    address indexed spender,
    IERC20 token,
    uint256 amount
);
```

#### Modified <a href="#modified-bip-29" id="modified-bip-29"></a>

(original event listed first, updated event second)

[protocol/contracts/farm/facets/MarketplaceFacet/Listing.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2#diff-0f36710c61a8027ff271fb1dac833ba6b2426b0c6195b94ef04302c83ccc95a4L28)

```solidity
event PodListingCreated(
    address indexed account,
    uint256 index,
    uint256 start,
    uint256 amount,
    uint24 pricePerPod,
    uint256 maxHarvestableIndex,
    LibTransfer.To mode
);
```

```solidity
event PodListingCreated(
    address indexed account, 
    uint256 index, 
    uint256 start, 
    uint256 amount, 
    uint24 pricePerPod, 
    uint256 maxHarvestableIndex, 
    uint256 minFillAmount,
    bytes pricingFunction,
    LibTransfer.To mode,
    LibPolynomial.PriceType pricingType
);
```

[protocol/contracts/farm/facets/MarketplaceFacet/Listing.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2#diff-0f36710c61a8027ff271fb1dac833ba6b2426b0c6195b94ef04302c83ccc95a4L37)

```solidity
event PodListingFilled(
    address indexed from,
    address indexed to,
    uint256 index,
    uint256 start,
    uint256 amount
);
```

```solidity
event PodListingFilled(
    address indexed from,
    address indexed to,
    uint256 index,
    uint256 start,
    uint256 amount,
    uint256 costInBeans
);
```

[protocol/contracts/farm/facets/MarketplaceFacet/Order.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2#diff-dd712b1fbf1d2e5f977e8f768617744b9e1bf368765325dbc07fdfb04e308893L23)

```solidity
event PodOrderCreated(
    address indexed account,
    bytes32 id,
    uint256 amount,
    uint24 pricePerPod,
    uint256 maxPlaceInLine
);
```

```solidity
event PodOrderCreated(
    address indexed account,
    bytes32 id,
    uint256 amount,
    uint24 pricePerPod,
    uint256 maxPlaceInLine,
    uint256 minFillAmount,
    bytes pricingFunction,
    LibPolynomial.PriceType priceType
);
```

[protocol/contracts/farm/facets/MarketplaceFacet/Order.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/c20cd7d920643016b5d73eacdfd1b7179d0ea9c2#diff-dd712b1fbf1d2e5f977e8f768617744b9e1bf368765325dbc07fdfb04e308893L30)

```solidity
event PodOrderFilled(
    address indexed from,
    address indexed to,
    bytes32 id,
    uint256 index,
    uint256 start,
    uint256 amount
);
```

```solidity
event PodOrderFilled(
    address indexed from,
    address indexed to,
    bytes32 id,
    uint256 index,
    uint256 start,
    uint256 amount,
    uint256 costInBeans
);
```

### 17188356 ([BIP-34](https://arweave.net/7M_RRIDWnWo0MwfyA8pjs1leOGrQlEzEvKTcil4xDIs))

#### Removed <a href="#removed-bip-34" id="removed-bip-34"></a>

[protocol/contracts/beanstalk/sun/SeasonFacet/Oracle.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/2114fa16eac50ca8cd7e21dac00c763697815bd5#diff-4f2d2a3debd1b35793145fe43a80f8352975e0ede5408cd08a553ed6a4a79e2eL17)

```solidity
event MetapoolOracle(uint32 indexed season, int256 deltaB, uint256[2] balances);
```

### 17671557 ([BIP-36](https://arweave.net/Zj-OCFwtOxRewDN1RK3tELz_0xyjjBKisL1arwJ3klk))

* [Added](#added-bip-36)
* [Modified](#modified-bip-36)
* [Removed](#removed-bip-36)

#### Added <a href="#added-bip-36" id="added-bip-36"></a>

[protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/36d3cbdfecbfb5a9afb46c7b2ee7965f1288e4e2#diff-1133daa7cab8c89b53a1fc34e51195e138f499112abfdf198b280fc03eb77ecfR120)

```solidity
event TransferBatch(
    address indexed operator,
    address indexed from,
    address indexed to,
    uint256[] ids,
    uint256[] values
);
```

[protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/36d3cbdfecbfb5a9afb46c7b2ee7965f1288e4e2#diff-1133daa7cab8c89b53a1fc34e51195e138f499112abfdf198b280fc03eb77ecfR101)

```solidity
event TransferSingle(
    address indexed operator,
    address indexed from,
    address indexed to,
    uint256 id,
    uint256 value
);
```

[protocol/contracts/beanstalk/silo/ApprovalFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/36d3cbdfecbfb5a9afb46c7b2ee7965f1288e4e2#diff-04c2616e132fc7d48e65e371a90235aaac3413a52cee89061c74ea3fe53f4a32R32)

```solidity
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
```

[protocol/contracts/beanstalk/silo/ConvertFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/36d3cbdfecbfb5a9afb46c7b2ee7965f1288e4e2#diff-80dee2bf35b86cb246d17e5c125566d999c1c76f695851906d62df8db8930950R36)

```solidity
event RemoveDeposit(
    address indexed account,
    address indexed token,
    int96 stem,
    uint256 amount,
    uint256 bdv
);
```

[protocol/contracts/beanstalk/silo/WhitelistFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/36d3cbdfecbfb5a9afb46c7b2ee7965f1288e4e2#diff-127caaf5da0ab33176050074aab5c35de48c2f3b24f7a841745577e72870b1f7R24)

```solidity
event UpdatedStalkPerBdvPerSeason(
    address indexed token,
    uint32 stalkEarnedPerSeason,
    uint32 season
);
```

#### Modified <a href="#modified-bip-36" id="modified-bip-36"></a>

(original event listed first, updated event second)

[protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/36d3cbdfecbfb5a9afb46c7b2ee7965f1288e4e2#diff-1133daa7cab8c89b53a1fc34e51195e138f499112abfdf198b280fc03eb77ecfL20)

```solidity
event AddDeposit(
    address indexed account,
    address indexed token,
    uint32 season,
    uint256 amount,
    uint256 bdv
);
```

```solidity
event AddDeposit(
    address indexed account,
    address indexed token,
    int96 stem,
    uint256 amount,
    uint256 bdv
);
```

[protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/36d3cbdfecbfb5a9afb46c7b2ee7965f1288e4e2#diff-1133daa7cab8c89b53a1fc34e51195e138f499112abfdf198b280fc03eb77ecfL34)

```solidity
event RemoveDeposit(
    address indexed account,
    address indexed token,
    uint32 season,
    uint256 amount
);
```

```solidity
event RemoveDeposit(
    address indexed account,
    address indexed token,
    int96 stem,
    uint256 amount,
    uint256 bdv
);
```

[protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/36d3cbdfecbfb5a9afb46c7b2ee7965f1288e4e2#diff-1133daa7cab8c89b53a1fc34e51195e138f499112abfdf198b280fc03eb77ecfL27)\
[protocol/contracts/beanstalk/silo/ConvertFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/36d3cbdfecbfb5a9afb46c7b2ee7965f1288e4e2#diff-80dee2bf35b86cb246d17e5c125566d999c1c76f695851906d62df8db8930950L32)

```solidity
event RemoveDeposits(
    address indexed account,
    address indexed token,
    uint32[] seasons,
    uint256[] amounts,
    uint256 amount
);
```

```solidity
event RemoveDeposits(
    address indexed account,
    address indexed token,
    int96[] stems,
    uint256[] amounts,
    uint256 amount,
    uint256[] bdvs
);
```

[protocol/contracts/beanstalk/silo/WhitelistFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/36d3cbdfecbfb5a9afb46c7b2ee7965f1288e4e2#diff-127caaf5da0ab33176050074aab5c35de48c2f3b24f7a841745577e72870b1f7L17)

```solidity
event WhitelistToken(
    address indexed token,
    bytes4 selector,
    uint256 seeds,
    uint256 stalk
);
```

```solidity
event WhitelistToken(
    address indexed token,
    bytes4 selector,
    uint32 stalkEarnedPerSeason,
    uint256 stalk
);
```

#### Removed <a href="#removed-bip-36" id="removed-bip-36"></a>

[protocol/contracts/beanstalk/silo/SiloFacet/TokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/36d3cbdfecbfb5a9afb46c7b2ee7965f1288e4e2#diff-1133daa7cab8c89b53a1fc34e51195e138f499112abfdf198b280fc03eb77ecfL41)

```solidity
event AddWithdrawal(
    address indexed account,
    address indexed token,
    uint32 season,
    uint256 amount
);
```

[protocol/contracts/beanstalk/silo/SiloFacet/Silo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/36d3cbdfecbfb5a9afb46c7b2ee7965f1288e4e2#diff-b5792ffe99c22ee9f1165318fc8a01a7e7ccfa672273a0ecf126bcaa9aa52c67L31)

```solidity
event SeedsBalanceChanged(
    address indexed account,
    int256 delta
);
```

### 18028591 ([BIP-37](https://arweave.net/VPF1EafHb41Y7AjzUYB0j-mR8Sl0KxPknDJYffczBpc))

* [Added](#added-bip-37)
* [Modified](#modified-bip-37)
* [Removed](#removed-bip-37)

#### Added <a href="#added-bip-37" id="added-bip-37"></a>

[protocol/contracts/beanstalk/silo/EnrootFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/8143542719b1c5489db5fa6a989184eb6eeb7ff9#diff-8ff408c03f8e572c65d42e361bf068086db153e502b17f12145a388a57209aafR22)

```solidity
event RemoveDeposit(
    address indexed account,
    address indexed token,
    int96 stem,
    uint256 amount,
    uint256 bdv
);
```

[protocol/contracts/beanstalk/silo/EnrootFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/8143542719b1c5489db5fa6a989184eb6eeb7ff9#diff-8ff408c03f8e572c65d42e361bf068086db153e502b17f12145a388a57209aafR30)

```solidity
event RemoveDeposits(
    address indexed account,
    address indexed token,
    int96[] stems,
    uint256[] amounts,
    uint256 amount,
    uint256[] bdvs
);
```

[protocol/contracts/beanstalk/metadata/MetadataFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/8143542719b1c5489db5fa6a989184eb6eeb7ff9#diff-bee6fa0df0969cc396ccb0c44530a829f71da8fb2cb5980a5d1f57be95c2b812R25)

```solidity
event URI(string _uri, uint256 indexed _id);
```

#### Modified <a href="#modified-bip-37" id="modified-bip-37"></a>

(original event listed first, updated event second)

[protocol/contracts/beanstalk/silo/WhitelistFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/8143542719b1c5489db5fa6a989184eb6eeb7ff9#diff-127caaf5da0ab33176050074aab5c35de48c2f3b24f7a841745577e72870b1f7L17)

```solidity
event WhitelistToken(
    address indexed token,
    bytes4 selector,
    uint32 stalkEarnedPerSeason,
    uint256 stalk
);
```

```solidity
event WhitelistToken(
    address indexed token,
    bytes4 selector,
    uint32 stalkEarnedPerSeason,
    uint256 stalkIssuedPerBdv
);
```

#### Removed <a href="#removed-bip-37" id="removed-bip-37"></a>

[protocol/contracts/beanstalk/silo/ConvertFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/8143542719b1c5489db5fa6a989184eb6eeb7ff9#diff-80dee2bf35b86cb246d17e5c125566d999c1c76f695851906d62df8db8930950L137)

```solidity
emit RemoveDeposit(msg.sender, token, stem, amount, ogBDV);
```

### 18392690 ([BIP-38](https://arweave.net/Km6We3lycOcIql8-cB4_ogmwHSSt5ri01ZUM0GXGvB4))

#### Added <a href="#added-bip-38" id="added-bip-38"></a>

[protocol/contracts/beanstalk/barn/UnripeFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/26dd45b18887273360c20506e1a7626c8cbca36e#diff-7fe9086890bcc050cbe2c09d0720e8922dcce715df2dcdb3ce0820de9b0f14c8R38)

```solidity
event SwitchUnderlyingToken(address indexed token, address indexed underlyingToken);
```

### 19927634 ([BIP-45](https://arweave.net/ZNzggcbRHS1vlX9zxtmXiX_wyb4Cj1v3uXHNcyvo8l4))

* [Added](#added-bip-45)
* [Modified](#modified-bip-45)
* [Removed](#removed-bip-45)

#### Added <a href="#added-bip-45" id="added-bip-45"></a>

[protocol/contracts/beanstalk/sun/SeasonFacet/Weather.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/2cd4c47f3790b49ca3edbf704d7ce7f33f7c5f07#diff-c836ca6b0a2b8f2c6d87748e16f004d492d616b177d79d34e21128fd1088e37bR36)

```solidity
event TemperatureChange(uint256 indexed season, uint256 caseId, int8 absChange);
```

[protocol/contracts/libraries/LibGauge.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/2cd4c47f3790b49ca3edbf704d7ce7f33f7c5f07#diff-97d9949ac918455ac65172f9eff7253fce6941c5745f6e264f499c7610364521R46)

```solidity
event UpdateAverageStalkPerBdvPerSeason(uint256 newStalkPerBdvPerSeason);
```

[protocol/contracts/libraries/LibGauge.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/2cd4c47f3790b49ca3edbf704d7ce7f33f7c5f07#diff-97d9949ac918455ac65172f9eff7253fce6941c5745f6e264f499c7610364521R58)

```solidity
event GaugePointChange(uint256 indexed season, address indexed token, uint256 gaugePoints);
```

[protocol/contracts/beanstalk/sun/SeasonFacet/Weather.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/2cd4c47f3790b49ca3edbf704d7ce7f33f7c5f07#diff-c836ca6b0a2b8f2c6d87748e16f004d492d616b177d79d34e21128fd1088e37bR45)

```solidity
event BeanToMaxLpGpPerBdvRatioChange(uint256 indexed season, uint256 caseId, int80 absChange);
```

[protocol/contracts/libraries/Silo/LibGerminate.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c6b875b61e606dcf6863712cb606e4a8878169e3/protocol/contracts/libraries/Silo/LibGerminate.sol#L40)

```solidity
event FarmerGerminatingStalkBalanceChanged(
    address indexed account,
    int256 deltaGerminatingStalk,
    Germinate germinationState
);
```

[protocol/contracts/libraries/Silo/LibGerminate.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c6b875b61e606dcf6863712cb606e4a8878169e3/protocol/contracts/libraries/Silo/LibGerminate.sol#L54)

```solidity
event TotalGerminatingBalanceChanged(
    uint256 germinationSeason,
    address indexed token,
    int256 deltaAmount,
    int256 deltaBdv
);
```

[protocol/contracts/libraries/Silo/LibGerminate.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c6b875b61e606dcf6863712cb606e4a8878169e3/protocol/contracts/libraries/Silo/LibGerminate.sol#L67)

```solidity
event TotalGerminatingStalkChanged(uint256 germinationSeason, int256 deltaGerminatingStalk);
```

[protocol/contracts/libraries/Silo/LibGerminate.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c6b875b61e606dcf6863712cb606e4a8878169e3/protocol/contracts/libraries/Silo/LibGerminate.sol#L74)

```solidity
event TotalStalkChangedFromGermination(int256 deltaStalk, int256 deltaRoots);
```

[protocol/contracts/libraries/Silo/LibWhitelist.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c6b875b61e606dcf6863712cb606e4a8878169e3/protocol/contracts/libraries/Silo/LibWhitelist.sol#L55)

```solidity
event UpdateGaugeSettings(
    address indexed token,
    bytes4 gpSelector,
    bytes4 lwSelector,
    uint64 optimalPercentDepositedBdv
);
```

[protocol/contracts/libraries/Silo/LibWhitelistedTokens.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c6b875b61e606dcf6863712cb606e4a8878169e3/protocol/contracts/libraries/Silo/LibWhitelistedTokens.sol#L26)

```solidity
event AddWhitelistStatus(
    address token,
    uint256 index,
    bool isWhitelisted,
    bool isWhitelistedLp,
    bool isWhitelistedWell
);
```

[protocol/contracts/libraries/Silo/LibWhitelistedTokens.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c6b875b61e606dcf6863712cb606e4a8878169e3/protocol/contracts/libraries/Silo/LibWhitelistedTokens.sol#L37)

```solidity
event RemoveWhitelistStatus(
    address token,
    uint256 index
);
```

[protocol/contracts/libraries/Silo/LibWhitelistedTokens.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c6b875b61e606dcf6863712cb606e4a8878169e3/protocol/contracts/libraries/Silo/LibWhitelistedTokens.sol#L45)

```solidity
event UpdateWhitelistStatus(
    address token,
    uint256 index,
    bool isWhitelisted,
    bool isWhitelistedLp,
    bool isWhitelistedWell
);
```

#### Modified <a href="#modified-bip-45" id="modified-bip-45"></a>

(original event listed first, updated event second)

[protocol/contracts/beanstalk/silo/WhitelistFacet/WhitelistFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/2cd4c47f3790b49ca3edbf704d7ce7f33f7c5f07#diff-e7c659838319dc70e40e929885fc65d44e594bd25c6bfe5ec8bfb69ad9ecd30aL27)

```solidity
event WhitelistToken(
    address indexed token,
    bytes4 selector,
    uint32 stalkEarnedPerSeason,
    uint256 stalkIssuedPerBdv
);
```

[protocol/contracts/libraries/Silo/LibWhitelist.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c6b875b61e606dcf6863712cb606e4a8878169e3/protocol/contracts/libraries/Silo/LibWhitelist.sol#L37C5-L46C7)

```solidity
event WhitelistToken(
    address indexed token,
    bytes4 selector,
    uint32 stalkEarnedPerSeason,
    uint256 stalkIssuedPerBdv,
    bytes4 gpSelector,
    bytes4 lwSelector,
    uint128 gaugePoints,
    uint64 optimalPercentDepositedBdv
);
```

[protocol/contracts/beanstalk/sun/SeasonFacet/Weather.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/2cd4c47f3790b49ca3edbf704d7ce7f33f7c5f07#diff-c836ca6b0a2b8f2c6d87748e16f004d492d616b177d79d34e21128fd1088e37bL63)

```solidity
event SeasonOfPlenty(
    uint256 indexed season,
    uint256 amount,
    uint256 toField
);
```

```solidity
event SeasonOfPlenty(uint256 indexed season, address well, address token, uint256 amount, uint256 toField);
```

[protocol/contracts/beanstalk/silo/SiloFacet/Silo.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/2cd4c47f3790b49ca3edbf704d7ce7f33f7c5f07#diff-b5792ffe99c22ee9f1165318fc8a01a7e7ccfa672273a0ecf126bcaa9aa52c67L52)

```solidity
event ClaimPlenty(
    address indexed account,
    uint256 plenty
);
```

```solidity
event ClaimPlenty(
    address indexed account,
    address token,
    uint256 plenty
);
```

#### Removed <a href="#removed-bip-45" id="removed-bip-45"></a>

[protocol/contracts/beanstalk/sun/SeasonFacet/Weather.sol](https://github.com/BeanstalkFarms/Beanstalk/commit/2cd4c47f3790b49ca3edbf704d7ce7f33f7c5f07#diff-c836ca6b0a2b8f2c6d87748e16f004d492d616b177d79d34e21128fd1088e37bL51)

```solidity
event WeatherChange(
    uint256 indexed season,
    uint256 caseId,
    int8 change
);
```

### 20921738 ([BIP-50](https://arweave.net/ciB1dygmXmEjLSOWv5P1NhAf-4BhOcMCH1ZfJw5JmMs))

* [Added](#added-bip-50)
* [Modified](#modified-bip-50)
* [Removed](#removed-bip-50)

#### Added <a href="#added-bip-50" id="added-bip-50"></a>

[protocol/contracts/libraries/Silo/LibWhitelist.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/libraries/Silo/LibWhitelist.sol#L78)

```solidity
event UpdatedOptimalPercentDepositedBdvForToken(
    address indexed token,
    uint64 optimalPercentDepositedBdv
);
```

[protocol/contracts/libraries/Silo/LibWhitelist.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/libraries/Silo/LibWhitelist.sol#L52)

```solidity
event UpdatedOracleImplementationForToken(
    address indexed token,
    Implementation oracleImplementation
);
```

[protocol/contracts/libraries/Silo/LibWhitelist.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/libraries/Silo/LibWhitelist.sol#L60)

```solidity
event UpdatedGaugePointImplementationForToken(
    address indexed token,
    Implementation gaugePointImplementation
);
```

[protocol/contracts/libraries/Silo/LibWhitelist.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/libraries/Silo/LibWhitelist.sol#L68)

```solidity
event UpdatedLiquidityWeightImplementationForToken(
    address indexed token,
    Implementation liquidityWeightImplementation
);
```

[protocol/contracts/beanstalk/field/FieldFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/libraries/Silo/LibWhitelist.sol#L52)

```solidity
event FieldAdded(uint256 fieldId);
```

[protocol/contracts/beanstalk/field/FieldFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/beanstalk/field/FieldFacet.sol#L52)

```solidity
event ActiveFieldSet(uint256 fieldId);
```

[protocol/contracts/beanstalk/farm/TractorFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/beanstalk/farm/TractorFacet.sol#L27)

```solidity
event PublishRequisition(LibTractor.Requisition requisition);
```

[protocol/contracts/beanstalk/farm/TractorFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/beanstalk/farm/TractorFacet.sol#L29)

```solidity
event CancelBlueprint(bytes32 blueprintHash);
```

[protocol/contracts/beanstalk/farm/TractorFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/beanstalk/farm/TractorFacet.sol#L31)

```solidity
event Tractor(address indexed operator, bytes32 blueprintHash);
```

[protocol/contracts/beanstalk/sun/SeasonFacet/Distribution.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/beanstalk/sun/SeasonFacet/Distribution.sol#L25)

```solidity
event ShipmentRoutesSet(ShipmentRoute[] newShipmentRoutes);
```

[protocol/contracts/beanstalk/silo/WhitelistFacet/WhitelistFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/beanstalk/silo/WhitelistFacet/WhitelistFacet.sol#L26)

```solidity
event UpdatedEvaluationParameters(EvaluationParameters);
```

[protocol/contracts/libraries/LibReceiving.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/libraries/LibReceiving.sol#L32)

```solidity
event Receipt(ShipmentRecipient indexed recipient, uint256 receivedAmount, bytes data);
```

[protocol/contracts/libraries/LibShipping.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/libraries/LibShipping.sol#L22)

```solidity
event Shipped(uint32 indexed season, uint256 shipmentAmount);
```

[protocol/contracts/libraries/Silo/LibFlood.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/libraries/Silo/LibFlood.sol#L36)

```solidity
event SeasonOfPlentyWell(uint256 indexed season, address well, address token, uint256 amount);
```

[protocol/contracts/libraries/Silo/LibFlood.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/libraries/Silo/LibFlood.sol#L42)

```solidity
event SeasonOfPlentyField(uint256 toField);
```

[protocol/contracts/beanstalk/init/reseed/L2/ReseedAccountStatus.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/beanstalk/init/reseed/L2/ReseedAccountStatus.sol#L38)

```solidity
event MigratedAccountStatus(address indexed account, uint256 stalk, uint256 roots);
```

[protocol/contracts/beanstalk/init/reseed/L2/ReseedField.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c8a89319bb9533f15b9e08b5940559cbb074cd6f/protocol/contracts/beanstalk/init/reseed/L2/ReseedField.sol#L31)

```solidity
event MigratedPlot(address indexed account, uint256 indexed plotIndex, uint256 pods);
```

[protocol/contracts/beanstalk/init/reseed/L2/ReseedInternalBalances.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c7b3b88426ddd88f6387fe25a482cc51205a69e0/protocol/contracts/beanstalk/init/reseed/L2/ReseedInternalBalances.sol#L19)

```solidity
event InternalBalanceMigrated(address indexed account, IERC20 indexed token, int256 delta);
```

[protocol/contracts/beanstalk/init/reseed/L2/ReseedPodMarket.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c7b3b88426ddd88f6387fe25a482cc51205a69e0/protocol/contracts/beanstalk/init/reseed/L2/ReseedPodMarket.sol#L24)

```solidity
event MigratedPodListing(
    address indexed lister,
    uint256 fieldId,
    uint256 index,
    uint256 start,
    uint256 podAmount,
    uint24 pricePerPod,
    uint256 maxHarvestableIndex,
    uint256 minFillAmount,
    LibTransfer.To mode
);
```

[protocol/contracts/beanstalk/init/reseed/L2/ReseedPodMarket.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c7b3b88426ddd88f6387fe25a482cc51205a69e0/protocol/contracts/beanstalk/init/reseed/L2/ReseedPodMarket.sol#L36)

```solidity
event MigratedPodOrder(
    address indexed orderer,
    bytes32 id,
    uint256 beanAmount,
    uint256 fieldId,
    uint24 pricePerPod,
    uint256 maxPlaceInLine,
    uint256 minFillAmount
);
```

[protocol/contracts/beanstalk/init/reseed/L2/ReseedSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c7b3b88426ddd88f6387fe25a482cc51205a69e0/protocol/contracts/beanstalk/init/reseed/L2/ReseedSilo.sol#L40)

```solidity
event AddMigratedDeposit(
    address indexed account,
    address indexed token,
    int96 stem,
    uint256 amount,
    uint256 bdv
);
```

[protocol/contracts/beanstalk/init/reseed/L2/ReseedBarn.sol](https://github.com/BeanstalkFarms/Beanstalk/blob/c7b3b88426ddd88f6387fe25a482cc51205a69e0/protocol/contracts/beanstalk/init/reseed/L2/ReseedBarn.sol#L18)

```solidity
event FertilizerMigrated(address account, uint128 fid, uint128 amount, uint128 lastBpf);
```

#### Modified <a href="#modified-bip-50" id="modified-bip-50"></a>

(original event listed first, updated event second)

[protocol/contracts/libraries/Silo/LibGerminate.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-d2261445685829aad9421eae03f9644ae9d11be5713ccc0870497a0be1e58d8aR41)

```solidity
event FarmerGerminatingStalkBalanceChanged(
    address indexed account,
    int256 deltaGerminatingStalk,
    Germinate germinationState
);
```

```solidity
event FarmerGerminatingStalkBalanceChanged(
    address indexed account,
    int256 delta,
    GerminationSide germ
);
```

[protocol/contracts/libraries/Silo/LibWhitelist.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-dc7f60cc6e63597b30e6d00ab9e69f139cdc59411ff3113e7a54d7b331b3d1eb)

```solidity
event WhitelistToken(
    address indexed token,
    bytes4 selector,
    uint32 stalkEarnedPerSeason,
    uint256 stalkIssuedPerBdv,
    bytes4 gpSelector,
    bytes4 lwSelector,
    uint128 gaugePoints,
    uint64 optimalPercentDepositedBdv
);
```

```solidity
event WhitelistToken(
    address indexed token,
    bytes4 selector,
    uint32 stalkEarnedPerSeason,
    uint256 stalkIssuedPerBdv,
    uint128 gaugePoints,
    uint64 optimalPercentDepositedBdv
);
```

[protocol/contracts/beanstalk/field/FieldFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-d1df16bc4f6f3b8f37c60a5dab5717e751f8a2986236fc936965d2ecd0f0bdf6L37)

```solidity
event Sow(
    address indexed account,
    uint256 index,
    uint256 beans,
    uint256 pods
);
```

```solidity
event Sow(address indexed account, uint256 fieldId, uint256 index, uint256 beans, uint256 pods);
```

[protocol/contracts/beanstalk/field/FieldFacet.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-d1df16bc4f6f3b8f37c60a5dab5717e751f8a2986236fc936965d2ecd0f0bdf6L50)

```solidity
event Harvest(address indexed account, uint256[] plots, uint256 beans);
```

```solidity
event Harvest(address indexed account, uint256 fieldId, uint256[] plots, uint256 beans);
```

[protocol/contracts/beanstalk/sun/SeasonFacet/Weather.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-c836ca6b0a2b8f2c6d87748e16f004d492d616b177d79d34e21128fd1088e37bL36)

```solidity
event TemperatureChange(uint256 indexed season, uint256 caseId, int8 absChange);
```

```solidity
event TemperatureChange(
    uint256 indexed season,
    uint256 caseId,
    int8 absChange,
    uint256 fieldId
);
```

[protocol/contracts/beanstalk/market/MarketplaceFacet/Listing.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-dbcd91a6fcf175569fbbb3ed8c2277e8aa820ae4d4f7c402ce66b47ff5084679L32)

```solidity
event PodListingCreated(
    address indexed account, 
    uint256 index, 
    uint256 start, 
    uint256 amount, 
    uint24 pricePerPod, 
    uint256 maxHarvestableIndex, 
    uint256 minFillAmount,
    bytes pricingFunction,
    LibTransfer.To mode,
    LibPolynomial.PriceType pricingType
);
```

```solidity
event PodListingCreated(
    address indexed lister,
    uint256 fieldId,
    uint256 index,
    uint256 start,
    uint256 podAmount,
    uint24 pricePerPod,
    uint256 maxHarvestableIndex,
    uint256 minFillAmount,
    LibTransfer.To mode
);
```

[protocol/contracts/beanstalk/market/MarketplaceFacet/Listing.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-dbcd91a6fcf175569fbbb3ed8c2277e8aa820ae4d4f7c402ce66b47ff5084679R40)

```solidity
event PodListingFilled(
    address indexed from,
    address indexed to,
    uint256 index,
    uint256 start,
    uint256 amount,
    uint256 costInBeans
);
```

```solidity
event PodListingFilled(
    address indexed filler,
    address indexed lister,
    uint256 fieldId,
    uint256 index,
    uint256 start,
    uint256 podAmount,
    uint256 costInBeans
);
```

[protocol/contracts/beanstalk/market/MarketplaceFacet/Listing.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-dbcd91a6fcf175569fbbb3ed8c2277e8aa820ae4d4f7c402ce66b47ff5084679L54)

```solidity
event PodListingCancelled(address indexed account, uint256 index);
```

[protocol/contracts/libraries/LibMarket.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-7506e0b7c56720bec157294e2b64149482e5c7e95946fc38d935b6b2321dad32R15)

```solidity
event PodListingCancelled(address indexed lister, uint256 fieldId, uint256 index);
```

[protocol/contracts/beanstalk/market/MarketplaceFacet/Order.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-e041e24426582f99334fbaf979bb6a24474ae2bbbd371477f0bfcba7cfb2430fL26)

```solidity
event PodOrderCreated(
    address indexed account,
    bytes32 id,
    uint256 amount,
    uint24 pricePerPod,
    uint256 maxPlaceInLine,
    uint256 minFillAmount,
    bytes pricingFunction,
    LibPolynomial.PriceType priceType
);
```

```solidity
event PodOrderCreated(
    address indexed orderer,
    bytes32 id,
    uint256 beanAmount,
    uint256 fieldId,
    uint24 pricePerPod,
    uint256 maxPlaceInLine,
    uint256 minFillAmount
);
```

[protocol/contracts/beanstalk/market/MarketplaceFacet/Order.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-e041e24426582f99334fbaf979bb6a24474ae2bbbd371477f0bfcba7cfb2430fR35)

```solidity
event PodOrderFilled(
    address indexed from,
    address indexed to,
    bytes32 id,
    uint256 index,
    uint256 start,
    uint256 amount,
    uint256 costInBeans
);
```

```solidity
event PodOrderFilled(
    address indexed filler,
    address indexed orderer,
    bytes32 id,
    uint256 fieldId,
    uint256 index,
    uint256 start,
    uint256 podAmount,
    uint256 costInBeans
);
```

[protocol/contracts/beanstalk/market/MarketplaceFacet/Order.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-e041e24426582f99334fbaf979bb6a24474ae2bbbd371477f0bfcba7cfb2430fL47)

```solidity
event PodOrderCancelled(address indexed account, bytes32 id);
```

```solidity
event PodOrderCancelled(address indexed orderer, bytes32 id);
```

[protocol/contracts/beanstalk/market/MarketplaceFacet/PodTransfer.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-e041e24426582f99334fbaf979bb6a24474ae2bbbd371477f0bfcba7cfb2430fL47)

```solidity
event PlotTransfer(
    address indexed from,
    address indexed to,
    uint256 indexed id,
    uint256 pods
);
```

```solidity
event PlotTransfer(
    address indexed from,
    address indexed to,
    uint256 fieldId,
    uint256 indexed index,
    uint256 amount
);
```

[protocol/contracts/beanstalk/market/MarketplaceFacet/PodTransfer.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-f39d4ca8861a177adf8fc9f20b2e6b9e7d7e5c8920385ac74794960be88906b2R25)

```solidity
event PodApproval(
    address indexed owner,
    address indexed spender,
    uint256 pods
);
```

```solidity
event PodApproval(
    address indexed owner,
    address indexed spender,
    uint256 fieldId,
    uint256 amount
);
```

#### Removed <a href="#removed-bip-50" id="removed-bip-50"></a>

[protocol/contracts/libraries/Silo/LibLegacyTokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-74889c16daa733a5ef781e48d41023f2dab15762ac8f8bf25d27396dcb9357e3L54)

```solidity
event SeedsBalanceChanged(address indexed account, int256 delta);
```

[protocol/contracts/libraries/Silo/LibLegacyTokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-74889c16daa733a5ef781e48d41023f2dab15762ac8f8bf25d27396dcb9357e3L66)

```solidity
event RemoveWithdrawal(
    address indexed account,
    address indexed token,
    uint32 season,
    uint256 amount
);
```

[protocol/contracts/libraries/Silo/LibLegacyTokenSilo.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-74889c16daa733a5ef781e48d41023f2dab15762ac8f8bf25d27396dcb9357e3L60)

```solidity
event RemoveWithdrawals(
    address indexed account,
    address indexed token,
    uint32[] seasons,
    uint256 amount
);
```

[protocol/contracts/libraries/Silo/LibWhitelist.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-dc7f60cc6e63597b30e6d00ab9e69f139cdc59411ff3113e7a54d7b331b3d1ebL55)

```solidity
event UpdateGaugeSettings(
    address indexed token,
    bytes4 gpSelector,
    bytes4 lwSelector,
    uint64 optimalPercentDepositedBdv
);
```

[protocol/contracts/beanstalk/sun/SeasonFacet/Sun.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-bcde8a5a812fd30015ca5fa9e9b47ab97620910629daaf12295bdc359a058e69L45)

```solidity
event Reward(
    uint32 indexed season,
    uint256 toField,
    uint256 toSilo,
    uint256 toFertilizer
);
```

[protocol/contracts/beanstalk/sun/SeasonFacet/Weather.sol](https://github.com/BeanstalkFarms/Beanstalk/pull/909/files#diff-c836ca6b0a2b8f2c6d87748e16f004d492d616b177d79d34e21128fd1088e37bL55)

```solidity
event SeasonOfPlenty(uint256 indexed season, address well, address token, uint256 amount, uint256 toField);
```


# FAQ

### Who calls the `gm` function? <a href="#who-calls-sunrise" id="who-calls-sunrise"></a>

In theory, anyone is able to call the `gm` function. In practice, MEV bots will front run your transaction by calling the function themselves as they can determine that they will get the Beans instead of you. As there are a number of bots playing the Sunrise game, the chances of getting a successful `gm` call from clicking the Sunrise button on the UI are essentially zero.

### Where can I call functions directly on Beanstalk? <a href="#call-beanstalk-functions-with-louper" id="call-beanstalk-functions-with-louper"></a>

Louper allows users to directly call functions in a contract that implements EIP-2535, as Etherscan does not yet support this. The Beanstalk contract on Louper can be found [here](https://louper.dev/diamond/0xc1e088fc1323b20bcbee9bd1b9fc9546db5624c5).

### Why do Beans only have 6 decimals? <a href="#beans-6-decimals" id="beans-6-decimals"></a>

Solidity has a limit of `2^256 - 1 ~= 1e77` for integers. Beanstalk is a complex protocol that does a lot of multiplication of big numbers which could potentially bring that upper integer limit into play, especially in the Flood functionality. Given that Bean is a stablecoin and the the value peg is $1, there is no need for an excessive amount of decimals. By reducing decimals to increase protocol security in the long run, Beanstalk is better set up for success. Note that USDC and Tether both have 6 decimals.

A lot of tokens have 18 decimals. Non-stable tokens have to be functional at any possible price at any point in the future.

Let's take the example of ETH and say that the ETH price is $4300. $0.01 is about 0.0000023 ETH. Thus, for ETH to be tradable at the cent level, it needs to have at least 7 decimals. Now fast forward 100 years and let's say (hypothetically) that ETH is worth $1,000,000,000. This would require ETH to have 11 decimals to be transacted at a cent level. Thus, it makes sense for ETH to have 18 decimals.

In terms of gas cost, there is no difference between 6 and 18 decimals.

### How are proxy contracts used to upgrade Beanstalk? <a href="#proxy-contract-upgrades" id="proxy-contract-upgrades"></a>

Delegate calls in Solidity allow a smart contract to use functionality stored in another contract’s bytecode and apply it to its own memory.

Traditionally, an upgradeable contract is a proxy address with an implementation contract. All calls to the proxy use the logic stored in the implementation contract, but update the state of the proxy. Thus, by changing a proxy’s implementation address, one can change the functionality in a contract while maintaining the same state and address. You can read about it more on the OpenZeppelin docs [here](https://docs.openzeppelin.com/upgrades-plugins/1.x/proxies) and [here](https://docs.openzeppelin.com/learn/upgrading-smart-contracts).\
\
Beanstalk is actually a multi-facet proxy implementation called a Diamond. This implementation is defined by EIP-2535. [EIP-2535](https://eips.ethereum.org/EIPS/eip-2535) allows a single proxy to implement multiple smart contracts at the same time. You can read more about the reasoning behind EIP-2535 usage with Beanstalk [here](https://bean.money/blog/beanstalk-eip-2535).

### What are Roots?

Roots were implemented in [BIP-0](https://bean.money/bip-0). Roots are an underlying accounting variable for Stalk in order to track how many Earned Beans a Farmer has earned. When a Farmer Deposits assets or Mows Grown Stalk, they are given Roots proportional to the Stalk they receive: `newStalk * totalRoots / totalStalk`.

When Beanstalk mints Beans, it increases `totalStalk` but not `totalRoots`, which in effect, increases `stalk / root`. When a Farmer Mows their Grown Stalk, the ratio: `farmerStalk / farmerRoots = totalStalk / totalRoots` is restored. (In this formula `farmerStalk` is equal to the Stalk they have after Mowing.)

`earnedStalk = farmerStalk - totalStalk / totalRoots * farmerRoots` (In this formula `farmerStalk` is equal to the Stalk they have before the Mow.) 1 Stalk = 1 Bean, so `earnedBeans = earnedStalk`.

### Why build a zero fee AMM?

From an engineering perspective, building a zero fee AMM is simpler than building an AMM with fees—you can simply skip the code that implements the fee when a swap occurs.

From an economic perspective, the concept is that Silo yield is a sufficient enough incentive to attract and retain liquidity providers such that there is no need to charge a fee on swaps.

Why is having zero fees important? Given that whether `deltaB < 0` or `deltaB > 0` is a defining data point in how Beanstalk's peg maintenance operates, any fee on swaps creates a serious inefficiency in Farmers' ability to arbitrage the peg. The BEAN:3CRV pool charges a 0.04% on swaps (including Convert). This means that buying or Converting above the price of $0.9996 means you are paying more than $1 per Bean and selling or Converting below $1.0004 means you are getting less than $1 per Bean. Any Farmer who is constantly arbitraging the price within this range is losing money overtime instead of making a profit (which they should be). For reference, the BEAN:ETH pool previously had a 0.3% fee, which created an even more extreme inefficiency in peg maintenance.

In addition, Beanstalk can overtime become the primary liquidity provider for all of DeFi by providing the cheapest on-chain swaps between two non-Bean assets.

### Why aren't Pods / Plots implemented with an ERC standard? <a href="#pods-plots-erc-721" id="pods-plots-erc-721"></a>

Plots function completely differently than both ERC-721 and ERC-1155. ERC-1155 doesn't work for Plots/Pods as Pods require ordinality for FIFO Harvesting. ERC-721 could work for Pods, but its hard to see how this would add value. ERC-721 tokens are non-divisible, so it would only allow entire Plots to be bought and sold on NFT marketplaces, which is far less efficient that the current Pod Market. Implementing Pods as ERC-721 would increase the cost of Sowing, Harvesting, Transferring, buying and selling.

### Why doesn't Fertilizer.sol have an `initialize` function? <a href="#fertilizer-initialize" id="fertilizer-initialize"></a>

When Fertilizer was originally deployed. It was deployed as the `FertilizerPreMint.sol` contract, which has an `initialize` function that calls `__Internallize_init` [here](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/fertilizer/FertilizerPreMint.sol#L39.). The `initialize` function was run on deployment. When Beanstalk was Replanted, The Fertilizer proxy contract was upgraded to the `Fertilizer` contract found [here](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/fertilizer/Fertilizer.sol). This is the current implementation contract you see on Etherscan. There was no additional initialization needed as `__Internallize_init` was already executed. Thus, the `Fertilizer` contract has no need to have an external `initialize` function.

### Why is the BDV of urBEAN3CRV lower than the BDV of urBEAN? <a href="#bdv-urbean3crv-urbean" id="bdv-urbean3crv-urbean"></a>

On October 25, 2022, two values could be found on the [Beanstalk Data Dashboard](https://beanstalk-dashboard.netlify.app/):

* Underlying per urBEAN3CRV: `0.219823021543684162`
* Underlying per urBEAN: `0.222227`
* Dividing the two numbers: `0.219823021543684162/0.222227 = 0.9891823`

This implies that 1 urBEAN3CRV will only ripen into 0.9891823 BEAN3CRV (i.e., not 1 BEAN3CRV) when Beanstalk is full recapitalized, assuming there are no Chops, no fees, deltaB = 0 and 1 BEAN3CRV = 1 BEAN. 1 urBEAN will ripen into 1 BEAN.

There are numerous reasons for this discrepancy, but the most significant is that `deltaB > 0` when the exploit occurred, so the BDV of LP tokens at the time was less than 1.

### Why are Beans minted for a Fundraiser just to later burn them? <a href="#beans-minted-fundraiser-burn" id="beans-minted-fundraiser-burn"></a>

See [`FundraiserFacet.sol`](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/farm/facets/FundraiserFacet.sol#L57-L87).

Fundraisers are meant to mimic an OTC swap where the buyer trades some stablecoin for a Bean and then automatically Sows the bought Beans for Pods, similar to how the credit mechanism to sustain the peg works. As defined in the whitepaper, Sowing requires a Bean to be burned in exchanged for the Pods. At the start of the Fundraiser, Beans are minted. These Beans represent (1) expected "sell pressure" for Beans as they can be sold at anytime for 1 stablecoin (normally USDC) and (2) expected Pod issuance given that the Beans will be Sown into Pods.

## Algorithm Explanations

### [**`remainingRecapitalization`**](https://github.com/BeanstalkFarms/Beanstalk/blob/f0e29aae99ddca90085d8dfdc990cff88451d357/protocol/contracts/libraries/LibFertilizer.sol#L136) <a href="#remaining-capitalization" id="remaining-capitalization"></a>

`totalDollars` is the total dollar value required to be raised in the Barn Raise. It is equal to `dollarPerUnripeLP() * unripeLP().totalSupply()`. If no Farmer has forfeited Unripe LP, then `totalDollars` is 77 million, but given that Farmer's can `chop` their Unripe LP and forfeit the funds they have not yet been paid back, we need `totalDollars` to decrease with the total supply of Unripe LP.

**`if (s.recapitalized >= totalDollars) return 0;`** —

A safe guard in case Beanstalk ends up in a situation where too much is raised. This is also possible if someone uses the `chop` function at a penalty even after the full amount has been raised.

**`return totalDollars.sub(s.recapitalized);`** —

&#x20;`s.recapitalized` is incremented every time USDC is exchanged for Fertilizer (or Unripe LP is generated through Convert), but it is equal to the dollar value that has been recapitalized. Thus, the difference between the two is the amount remaining.

### [**`checkForMaxDeltaB`**](https://github.com/BeanstalkFarms/Beanstalk/blob/ddf3869bcdf7f7802eabe83d6abeebdfc7b8d1ab/protocol/contracts/libraries/Oracle/LibCurveOracle.sol#L152) <a href="#check-for-max-deltab" id="check-for-max-deltab"></a>

See [EBIP-2](https://bean.money/ebip-2).

It is assumed that if `|deltaB| > beanSupply / 100`, then manipulation occurred. This isn't always true, but the ramifications if `|deltaB| > beanSupply / 100` naturally are minimal as Beanstalk will simply mint fewer Beans/less Soil this Season.

Theoretically, a multi-block MEV attack could manipulate `deltaB` to be any value. Multi-block MEV can only be executed on some time cadence dependent on % ownership of Ethereal stake. Therefore, the greatest vulnerability to Beanstalk is a massive one-time Bean/Soil issuance. By adding this supply cap, the maximum effect of potential manipulation can be at most 1% of supply.


# Terminology Discrepancies

The Beanstalk codebase currently uses several terms that are out of date with the whitepaper, the Beanstalk UI, the Farmers' Almanac, etc. The following is a list of outdated terminology used in the Beanstalk codebase and the associated proper terms.

| Beanstalk codebase                        | Beanstalk term      |
| ----------------------------------------- | ------------------- |
| Internal Balance                          | Farm Balance        |
| External Balance                          | Circulating Balance |
| Marketplace                               | Pod Market          |
| Unfertilized Beans                        | Sprouts             |
| Fertilized Beans                          | Rinsable Sprouts    |
| Claim Fertilized                          | Rinse               |
| Underlying assets (w\.r.t. Unripe assets) | Ripe assets         |
| Earned Seeds                              | Plantable Seeds     |
| Season of Plenty                          | Flood               |
| \[not explicitly referenced]              | Deposit Whitelist   |
| \[not explicitly referenced]              | Convert Whitelist   |
| \[not explicitly referenced]              | Oracle Whitelist    |

The following discrepancies are in the [Beanstalk Subgraph](broken://pages/26HJmwUROOUWZBqHNCp5).

| Beanstalk Subgraph | Beanstalk term |
| ------------------ | -------------- |
| Plantable Stalk    | Earned Stalk   |
| Pod Marketplace    | Pod Market     |


