Convert Facet
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
The Convert Facet handles Conversions between assets in the Silo and Enrooting Unripe Deposits.
Call Functions
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.
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.
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
Emitted upon each Conversion.
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.
Emitted when account
removes a single Deposit from the Silo. Occurs during Withdraw and Convert.
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.
Emitted when account
removes multiple Deposits from the Silo. Occurs during Withdraw and Convert.
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
.
Last updated