Beanstalk
  • Farmers' Almanac
  • Disclosures
  • Developers
  • Whitepaper
  • 🌱Introduction
    • Why Beanstalk
    • How Beanstalk Works
  • 🌾Farm
    • Overview
    • Sun
    • Silo
      • Seed Gauge System
    • Field
    • Barn
    • Toolshed
      • Depot
      • Pod Market
      • Tractor
  • βš–οΈPeg Maintenance
    • Overview
    • Temperature
    • Crop Ratio
    • Convert
    • Flood
  • πŸ”¬Advanced
    • Stablecoin Overview
    • Types of Stablecoins
    • Economics
  • 🏦Governance
    • Beanstalk
      • BCM Process
      • BCM Dashboard
      • BIC Process
      • BICM Dashboard
    • Beanstalk Farms
      • BFM Dashboard
      • BFC Dashboard
    • BeaNFTs
      • BDM Dashboard
    • Proposals
  • πŸ—ΊοΈGuides
    • Directory
    • Getting Started
      • Where to Begin?
      • Connect to Beanstalk
      • Where Are My Assets and How to Use Them?
      • Approve Contracts
      • Add Bean to MetaMask
    • Sun
      • Understand the Bean Price
      • Understand the Sun
    • Silo
      • Understand Silo vAPY
      • Deposit in the Silo
      • Understand Silo Deposit Performance
      • Convert in the Silo
      • Transfer Deposits
      • Withdraw from the Silo
      • Claim Silo Rewards
    • Field
      • Sow Beans
      • Transfer Pods
      • Harvest Pods
    • Barn
      • Understand Fert vAPY
      • Buy Fertilizer
      • Rinse Sprouts
      • Transfer Fertilizer
      • Trade Fertilizer
    • Market
      • Buy Pods
      • Sell Pods
    • Balances
      • Understand My Balances
      • Migrate to Arbitrum
    • BeaNFTs
      • Mint BeaNFTs
    • Swap
      • Trade Beans
      • Transfer Balances
    • Governance
      • Vote on Governance Proposals
      • Delegate Votes
    • Unripe Assets
      • Chop Unripe Assets
  • πŸ“–Protocol Resources
    • Glossary
    • Asset States
    • Contracts
    • Audits
    • Bug Bounty
  • 🌐Ecosystem
    • Basin
    • Pipeline
  • 🏫Community Resources
    • Discord
    • Notion
    • Contributing
    • Discord Roles
    • Content
    • Links
  • πŸ“°Archives
    • Bean Sprout
      • BSM Dashboard
    • Governance Proposals (June 2023)
    • Fundraiser
Powered by GitBook
On this page
  • Convert Whitelist
  • Generalized Convert
Edit on GitHub
Export as PDF
  1. Peg Maintenance

Convert

PreviousCrop RatioNextFlood

Last updated 6 months ago

Conversions within the between Bean and LP Deposits serve a major role in peg maintenance.

Conversions from one Deposited asset to another are permissioned by a Convert Whitelist. Conversions can be added or removed from the Convert Whitelist via .

When the Bean price is above peg (i.e., is positive), Deposited Beans may be Converted to Deposited LP tokens while retaining grown Stalk from Seeds. This Conversion allows the Silo Member to add Beans to liquidity pools, which has the practical effect of selling Beans above peg. In doing so, Beanstalk incentivizes Stalkholders to grow liquidity for Beans at the expense of additional Bean mints, as the Bean price is decreased back towards peg.

When the Bean price is below peg (i.e., deltaB is negative), Deposited LP tokens may be Converted to Deposited Beans without forfeiting grown Stalk from Seeds or any Stalk due to LP impermanent loss. This Conversion allows Stalkholders to remove excess Beans from liquidity pools and increase the price back towards peg without leaving the Silo, minimizing debt issuance.

Unripe Beans are also convertible to Unripe BEAN:ETH LP, and vice versa, in a similar fashion. See the section of the page for more info.

Convert Whitelist

In order for a Farmer to be able to Convert a Deposited asset to another, that Conversion must be on the Convert Whitelist.

Additional Conversions may be added to the Convert Whitelist via . In order for a Conversion to be added to the Convert Whitelist, Beanstalk requires:

  1. The From token address;

  2. The To token address;

  3. Conditions under which the From token can be converted to the To token; and

  4. A function to determine the number of To tokens received for Converting a given number of From tokens (see for complete formulas).

Current Convert Whitelist

From token
To token
Conditions

Any token on the Deposit Whitelist*

The same token as From token

Anytime

Unripe token

Underlying token

Anytime

Unripe Bean

Unripe BEAN:wstETH LP

deltaB in the BEAN:wstETH Well > 0

Unripe BEAN:wstETH LP

Unripe Bean

deltaB in the BEAN:wstETH Well < 0

Bean

Whitelisted Well LP token

deltaB in the given Well > 0

Whitelisted Well LP token

Bean

deltaB in the given Well < 0

Performance

Generalized Convert

Stalk Penalty

Generalized Convert introduced the ability to Convert against peg and a Stalk penalty for doing so. The penalty applies a 100% reduction in Grown Stalk of the Converted Deposit based on the amount that was Converted against peg.

For example, if 20 BDV is Converted, and only 10 of the BDV Converted is against peg, then 50% of the Grown Stalk associated with Deposit will be burned. No penalty is applied if the Convert brings the cumulative deltaB closer to 0.

Convert Capacity

To prevent flash loan attacks that allow Converting against peg without incurring the Stalk penalty, a Convert capacity mechanism was introduced.

Every Convert updates the amount of BDV Converted per block on a per Well and overall basis. The total capacity available before a penalty applies is based on deltaB for each corresponding Well and the overall deltaB.

*Any token on the can be Converted to the same token in order to allow Stalkholders to update the BDV of their LP tokens when their BDV increases due to impermanent loss.

Convert functionality was first added in , and generalized to support a Convert Whitelist in . Since BIP-7 was committed, Conversions by Stalkholders have played a significant role in peg maintenance.

With the introduction of Generalized Convert in , which supports LP token -> LP token Converts as well as Converts against peg (with an associated Stalk penalty). A per-block Convert cap mechanism protects against flash loan attacks.

βš–οΈ
BIP-7
BIP-21
BIP-50
Silo
Beanstalk governance
Barn
Beanstalk governance
Section 14.4 in the whitepaper
Unripe Assets
deltaB
Deposit Whitelist
This screenshot of the Bean price chart is from September 12, 2022. See for the latest data.
app.bean.money