Beanstalk
  • Agronomics Handbook
  • Farmers' Almanac
  • Whitepaper
  • Contract Addresses
  • 🌱Overview
    • Introduction
    • Development Ethos
    • EIP-2535 Diamond
    • App Storage
    • Internal Balances
  • 🌾Protocol
    • Overview
    • Louper
    • Sun
      • Season Facet
    • Silo
      • Silo Facet
      • BDV Facet
      • Whitelist Facet
      • Convert Facet
      • Convert Getters Facet
      • Enroot Facet
      • Approval Facet
      • Metadata Facet
      • Migration Facet
      • Legacy Claim Withdrawal Facet
    • Field
      • Field Facet
      • Fundraiser Facet
    • Barn
      • Fertilizer Facet
      • Unripe Facet
    • Market
      • Marketplace Facet
    • Farm
      • Farm Facet
      • Depot Facet
      • Token Facet
      • Token Support Facet
      • Curve Facet
    • Diamond
      • Diamond Cut Facet
      • Diamond Loupe Facet
      • Ownership Facet
      • Pause Facet
  • 📜Misc.
    • Technical Recordings
    • Upgrade History
    • FAQ
    • Terminology Discrepancies
Powered by GitBook
On this page
  • Sun
  • Silo
  • Field
  • Barn
  • Market
  • Farm
  • Diamond
Edit on GitHub
Export as PDF
  1. Protocol

Overview

PreviousInternal BalancesNextSun

Last updated 6 months ago

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:

  • (1 Facet)

  • (10 Facets)

  • (2 Facets)

  • (2 Facets)

  • (1 Facet)

  • (5 Facets)

  • (4 Facets)

Sun

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

The Sun consists of 1 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:

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:

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:

Market

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

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:

Farm

The Farm consists of 5 Facets:

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:

-> Where Farmers Deposit, Withdraw, Claim and Transfer assets in/from the Silo.

-> Handles logic for retrieving the BDV of some amount of a whitelisted asset.

-> Handles the addition and removal of tokens from the .

-> Where Farmers Convert a Deposit of a whitelisted asset to a Deposit of another whitelisted asset.

-> Contains view functions for Convert data.

-> Where Farmers Enroot their Unripe Deposits.

-> Contains logic for Deposit approvals and permits.

-> Contains on-chain metadata for the Deposit ERC-1155 tokens.

-> Where Farmers migrate to the latest Silo accounting system.

-> Facilitates backwards compatibility for Farmers with unclaimed Withdrawals before the .

-> Where Farmers Sow Beans into Pods and Harvest Pods into Beans.

-> Where Farmers create and fund Fundraisers through Sowing non-Bean assets into Pods.

See .

-> Where Farmers buy Fertilizer with USDC and claim Beans earned from Fertilizer.

-> Allows Farmers to Chop Unripe assets into their underlying assets at a potential penalty.

Pods can be bought and sold in a decentralized, trustless fashion on the . The Pod Market creates liquidity for Pods through an on-chain order book.

-> Contains the Pod Market where Farmers create, Fill and Cancel Pod Listings and Orders, as well as transfer Pods.

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 ).

-> Contains the farm function, which allows Farmers to call a series of functions together within Beanstalk.

-> Wraps the standalone contract, providing access to Pipeline from Beanstalk through the use of the farm function.

-> Supports transferring assets between Internal and External Balances and between different accounts. Also supports Wrap/Unwrap logic for ETH.

-> Handles token permits.

-> Provides an interface to exchange and add/remove liquidity on Curve directly through Beanstalk.

-> Provides functionality for the owner to add/remove/replace functions within the Beanstalk contract.

-> Allows anyone to see the available functions within Beanstalk.

-> Manages which address owns Beanstalk.

-> Allows the owner of Beanstalk to Pause/Unpause Beanstalk.

🌾
Sun
Silo
Field
Barn
Market
Farm
Diamond
SeasonFacet
SiloFacet
BDVFacet
WhitelistFacet
Deposit Whitelist
ConvertFacet
ConvertGettersFacet
EnrootFacet
ApprovalFacet
MetadataFacet
MigrationFacet
LegacyClaimWithdrawalFacet
Silo V3 upgrade
FieldFacet
FundraiserFacet
Terminology Discrepancies
FertilizerFacet
UnripeFacet
Pod Market
MarketplaceFacet
Internal Balances
FarmFacet
DepotFacet
Pipeline
TokenFacet
TokenSupportFacet
CurveFacet
DiamondCutFacet
DiamondLoupeFacet
OwnershipFacet
PauseFacet