ButterWhaleProcessing


Functions:

Events:

Graphs:


Function Definitions:

constructor()

constructor(contract IContractRegistry _contractRegistry, contract IStaking _staking, contract ISetToken _setToken, contract IERC20 _threeCrv, contract Curve3Pool _threePool, contract BasicIssuanceModule _basicIssuanceModule, address[] _yTokenAddresses, struct ButterWhaleProcessing.CurvePoolTokenPair[] _curvePoolTokenPairs) public 

mint()

mint(uint256 _amount, uint256 _slippage, bool _stake) external 

This function deposits 3CRV in the underlying Metapool and deposits these LP token to get yToken which in turn are used to mint Butter

Parameter NameTypeDescription

_amount

uint256

Amount of 3cr3CRV to use for minting

_slippage

uint256

The accepted slippage in basis points.

_stake

bool

Do you want to stake your minted Butter?

redeem()

redeem(uint256 _amount, uint256 _slippage) external 

This function reedeems Butter for the underlying yToken and deposits these yToken in curve Metapools for 3CRV

Parameter NameTypeDescription

_amount

uint256

amount of Butter to be redeemed

_slippage

uint256

The accepted slippage in basis points.

zapMint()

zapMint(uint256[3] _amounts, uint256 _min_3crv_amount, uint256 _slippage, bool _stake) external 

The amounts in _amounts must align with their index in the curve three-pool

Parameter NameTypeDescription

_amounts

uint256[3]

An array of amounts in stablecoins the user wants to deposit

_min_3crv_amount

uint256

The min amount of 3CRV which should be minted by the curve three-pool (slippage control)

_slippage

uint256

The accepted slippage in basis points.

_stake

bool

Do you want to stake your minted butter?

zapRedeem()

zapRedeem(uint256 _amount, uint256 _stableCoinIndex, uint256 _min_stable_amount, uint256 _slippage) external 

The _stableCoinIndex must align with the index in the curve three-pool

Parameter NameTypeDescription

_amount

uint256

amount of Butter to be redeemed

_stableCoinIndex

uint256

Defines which stablecoin the user wants to receive

_min_stable_amount

uint256

The min amount of stables which should be returned by the curve three-pool (slippage control)

_slippage

uint256

The accepted slippage in basis points.

setApprovals()

setApprovals() external 

getMinAmountToMint()

getMinAmountToMint(uint256 _valueOfBatch, uint256 _valueOfComponentsPerUnit, uint256 _slippage) public  returns (uint256)

getMinAmount3CrvFromRedeem()

getMinAmount3CrvFromRedeem(uint256 _valueOfComponents, uint256 _slippage) public  returns (uint256)

valueOfComponents()

valueOfComponents(address[] _tokenAddresses, uint256[] _quantities) public  returns (uint256)

valueOf3Crv()

valueOf3Crv(uint256 _units) public  returns (uint256)

setCurvePoolTokenPairs()

setCurvePoolTokenPairs(address[] _yTokenAddresses, struct ButterWhaleProcessing.CurvePoolTokenPair[] _curvePoolTokenPairs) public 
Parameter NameTypeDescription

_yTokenAddresses

address[]

An array of addresses for the yToken needed to mint Butter

_curvePoolTokenPairs

struct ButterWhaleProcessing.CurvePoolTokenPair[]

An array structs describing underlying yToken, crvToken and curve metapool

setRedemptionFee()

setRedemptionFee(uint256 _feeRate, address _recipient) external 

Per default both of these values are not set. Therefore a fee has to be explicitly be set with this function

Parameter NameTypeDescription

_feeRate

uint256

Redemption fee rate in basis points

_recipient

address

The recipient which receives these fees (Should be DAO treasury)

claimRedemptionFee()

claimRedemptionFee() external 

recoverLeftover()

recoverLeftover(address _yTokenAddress, uint256 _amount) external 

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 NameTypeDescription

_yTokenAddress

address

address of the yToken that should be recovered

_amount

uint256

amount of yToken that should recovered

updateSweetheart()

updateSweetheart(address _sweetheart, bool _enabled) external 
Parameter NameTypeDescription

_sweetheart

address

The address that shall become/lose their sweetheart status

setStaking()

setStaking(address _staking) external 

pause()

pause() external 

All function with the modifer whenNotPaused cant be called anymore. Namly deposits and mint/redeem

unpause()

unpause() external 

All function with the modifer whenNotPaused cant be called anymore. Namly deposits and mint/redeem

Events

Minted

Minted(address account, uint256 amount, uint256 butterAmount)

Redeemed

Redeemed(address account, uint256 amount, uint256 claimableTokenBalance)

ZapMinted

ZapMinted(address account, uint256 mintAmount, uint256 butterAmount)

ZapRedeemed

ZapRedeemed(address account, uint256 redeemAmount, uint256 claimableTokenBalance)

CurveTokenPairsUpdated

CurveTokenPairsUpdated(address[] yTokenAddresses, struct ButterWhaleProcessing.CurvePoolTokenPair[] curveTokenPairs)

RedemptionFeeUpdated

RedemptionFeeUpdated(uint256 newRedemptionFee, address newFeeRecipient)

SweetheartUpdated

SweetheartUpdated(address sweetheart, bool isSweeheart)

StakingUpdated

StakingUpdated(address beforeAddress, address afterAddress)

Graphs

Dependency Graph

Inheritance Graph

Last updated