Convert
Conversions within the Silo 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 Beanstalk governance.
When the Bean price is above peg (i.e., deltaB 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 Unripe Assets section of the Barn 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 Beanstalk governance. In order for a Conversion to be added to the Convert Whitelist, Beanstalk requires:
The From token address;
The To token address;
Conditions under which the From token can be converted to the To token; and
A function to determine the number of To tokens received for Converting a given number of From tokens (see Section 14.4 in the whitepaper for complete formulas).
Current Convert Whitelist
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
*Any token on the Deposit Whitelist 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.
Performance
Convert functionality was first added in BIP-7, and generalized to support a Convert Whitelist in BIP-21. Since BIP-7 was committed, Conversions by Stalkholders have played a significant role in peg maintenance.
Generalized Convert
With the introduction of Generalized Convert in BIP-50, 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.
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.
Last updated