ButterBatchProcessing
Functions:
Events:
Graphs:
Function Definitions:
constructor()
getAccountBatches()
Parameter Name | Type | Description |
---|---|---|
| address | The address for whom we want to retrieve batches |
getMinAmountToMint()
this controls slippage in the minting process
getMinAmount3CrvFromRedeem()
this controls slippage in the redeeming process
valueOfComponents()
valueOf3Crv()
depositForMint()
Parameter Name | Type | Description |
---|---|---|
| uint256 | Amount of 3cr3CRV to use for minting |
| address | User that gets the shares attributed to (for use in zapper contract) |
depositForRedeem()
Parameter Name | Type | Description |
---|---|---|
| uint256 | amount of Butter to be redeemed |
withdrawFromBatch()
Parameter Name | Type | Description |
---|---|---|
| bytes32 | From which batch should funds be withdrawn from |
| uint256 | Amount of Butter or 3CRV to be withdrawn from the queue (depending on mintBatch / redeemBatch) |
| address | User that gets the shares attributed to (for use in zapper contract) |
claim()
Parameter Name | Type | Description |
---|---|---|
| bytes32 | Id of batch to claim from |
| address | User that gets the shares attributed to (for use in zapper contract) |
claimAndStake()
Parameter Name | Type | Description |
---|---|---|
| bytes32 | Id of batch to claim from |
| address | User that gets the shares attributed to (for use in zapper contract) |
moveUnclaimedDepositsIntoCurrentBatch()
the indices of batchIds must match the amountsInHysi to work properly (This will be done by the frontend)
Parameter Name | Type | Description |
---|---|---|
| bytes32[] | the ids of each batch where butter should be moved from |
| uint256[] | how many shares should redeemed in each of the batches |
| enum ButterBatchProcessing.BatchType | the batchType where funds should be taken from (Mint -> Take Hysi and redeem then, Redeem -> Take 3Crv and Mint Butter) |
batchMint()
This function deposits 3CRV in the underlying Metapool and deposits these LP token to get yToken which in turn are used to mint Butter This process leaves some leftovers which are partially used in the next mint batches. In order to get 3CRV we can implement a zap to move stables into the curve tri-pool handleKeeperIncentive checks if the msg.sender is a permissioned keeper and pays them a reward for calling this function (see KeeperIncentive.sol)
batchRedeem()
This function reedeems Butter for the underlying yToken and deposits these yToken in curve Metapools for 3CRV In order to get stablecoins from 3CRV we can use a zap to redeem 3CRV for stables in the curve tri-pool handleKeeperIncentive checks if the msg.sender is a permissioned keeper and pays them a reward for calling this function (see KeeperIncentive.sol)
setApprovals()
setStaking()
updateSweetheart()
Parameter Name | Type | Description |
---|---|---|
| address | The address that shall become/lose their sweetheart status |
setCurvePoolTokenPairs()
Parameter Name | Type | Description |
---|---|---|
| address[] | An array of addresses for the yToken needed to mint Butter |
| struct ButterBatchProcessing.CurvePoolTokenPair[] | An array structs describing underlying yToken, crvToken and curve metapool |
setProcessingThreshold()
The cooldown is the same for redeem and mint batches
Parameter Name | Type | Description |
---|---|---|
| uint256 | Cooldown in seconds |
| uint256 | Amount of MIM necessary to mint immediately |
| uint256 | Amount of Butter necessary to mint immediately |
setSlippage()
Parameter Name | Type | Description |
---|---|---|
| uint256 | amount in bps (e.g. 50 = 0.5%) |
| uint256 | amount in bps (e.g. 50 = 0.5%) |
setRedemptionFee()
Per default both of these values are not set. Therefore a fee has to be explicitly be set with this function
Parameter Name | Type | Description |
---|---|---|
| uint256 | Redemption fee rate in basis points |
| address | The recipient which receives these fees (Should be DAO treasury) |
claimRedemptionFee()
recoverLeftover()
This should only be used if there is a clear trend that a certain amount of yToken leftover wont be used in the minting process
Parameter Name | Type | Description |
---|---|---|
| address | address of the yToken that should be recovered |
| uint256 | amount of yToken that should recovered |
pause()
All function with the modifer whenNotPaused
cant be called anymore. Namly deposits and mint/redeem
unpause()
All function with the modifer whenNotPaused
cant be called anymore. Namly deposits and mint/redeem
Events
Deposit
Withdrawal
SlippageUpdated
BatchMinted
BatchRedeemed
Claimed
WithdrawnFromBatch
MovedUnclaimedDepositsIntoCurrentBatch
CurveTokenPairsUpdated
ProcessingThresholdUpdated
RedemptionFeeUpdated
SweetheartUpdated
StakingUpdated
Graphs
Dependency Graph
Inheritance Graph
Last updated