Overview
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
Beanstalk can be broken down into 7 different Modules consisting of 25 Facets:
Sun (1 Facet)
Silo (10 Facets)
Field (2 Facets)
Barn (2 Facets)
Market (1 Facet)
Farm (5 Facets)
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
-> Contains thegm
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
-> Where Farmers Deposit, Withdraw, Claim and Transfer assets in/from the Silo.BDVFacet
-> Handles logic for retrieving the BDV of some amount of a whitelisted asset.WhitelistFacet
-> Handles the addition and removal of tokens from the Deposit Whitelist.ConvertFacet
-> Where Farmers Convert a Deposit of a whitelisted asset to a Deposit of another whitelisted asset.ConvertGettersFacet
-> Contains view functions for Convert data.EnrootFacet
-> Where Farmers Enroot their Unripe Deposits.ApprovalFacet
-> Contains logic for Deposit approvals and permits.MetadataFacet
-> Contains on-chain metadata for the Deposit ERC-1155 tokens.MigrationFacet
-> Where Farmers migrate to the latest Silo accounting system.LegacyClaimWithdrawalFacet
-> Facilitates backwards compatibility for Farmers with unclaimed Withdrawals before the Silo V3 upgrade.
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
-> Where Farmers Sow Beans into Pods and Harvest Pods into Beans.FundraiserFacet
-> 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.
In the Beanstalk ecosystem,
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.
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
-> Where Farmers buy Fertilizer with USDC and claim Beans earned from Fertilizer.UnripeFacet
-> 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. 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
-> 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).
The Farm consists of 5 Facets:
FarmFacet
-> Contains thefarm
function, which allows Farmers to call a series of functions together within Beanstalk.DepotFacet
-> Wraps the standalone Pipeline contract, providing access to Pipeline from Beanstalk through the use of thefarm
function.TokenFacet
-> Supports transferring assets between Internal and External Balances and between different accounts. Also supports Wrap/Unwrap logic for ETH.TokenSupportFacet
-> Handles token permits.CurveFacet
-> 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
-> Provides functionality for the owner to add/remove/replace functions within the Beanstalk contract.DiamondLoupeFacet
-> Allows anyone to see the available functions within Beanstalk.OwnershipFacet
-> Manages which address owns Beanstalk.PauseFacet
-> Allows the owner of Beanstalk to Pause/Unpause Beanstalk.
Last updated