Convert Facet
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.
Parameter | Type | Description |
---|---|---|
|
| Input parameters to determine the Conversion type. |
|
| The Stems of the Deposits to Convert. |
|
| The amounts within each Deposit to Convert. |
Return Value | Type | Description |
---|---|---|
|
| The new Stems of the Converted Deposit. |
|
| The amount of tokens Converted from. |
|
| The amount of tokens Converted to. |
|
| The BDV of the Deposits Converted from. |
|
| The BDV of the Deposits Converted to. |
View Functions
None.
Events
Emitted upon each Conversion.
Parameter | Type | Description |
---|---|---|
|
| Address of Farmer that Converted. |
|
| Whitelisted token that was Converted from. |
|
| Whitelisted token that was Converted to. |
|
| Amount of |
|
| Amount of |
Emitted when account
removes a single Deposit from the Silo. Occurs during Withdraw and Convert.
Parameter | Type | Description |
---|---|---|
|
| The Farmer whose Deposit was removed. |
|
| Whitelisted token address. |
|
| The Stem of the Deposit. |
|
| The token amount of the Deposit. |
|
| The BDV associated with the Deposit. |
Emitted when account
removes multiple Deposits from the Silo. Occurs during Withdraw and Convert.
Parameter | Type | Description |
---|---|---|
|
| The Farmer whose Deposits were removed. |
|
| Whitelisted token address. |
|
| Stems of the Deposits. |
|
| The token amounts of the Deposits, corresponding to |
|
| Sum of |
|
| The BDVs associated with the Deposits, corresponding to |
Last updated