AbstractBatchController


Functions:

Events:

Graphs:


Function Definitions:

setBatchStorage()

setBatchStorage(contract AbstractBatchStorage _address) external 

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

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

grantClientAccess()

grantClientAccess(address newClient) external 

acceptClientAccess()

acceptClientAccess(address owner) external 

setStaking()

setStaking(address _staking) external 

setSlippage()

setSlippage(uint256 _mintSlippage, uint256 _redeemSlippage) external 
Parameter NameTypeDescription

_mintSlippage

uint256

amount in bps (e.g. 50 = 0.5%)

_redeemSlippage

uint256

amount in bps (e.g. 50 = 0.5%)

setProcessingThreshold()

setProcessingThreshold(uint256 _cooldown, uint256 _mintThreshold, uint256 _redeemThreshold) external 

The cooldown is the same for redeem and mint batches

Parameter NameTypeDescription

_cooldown

uint256

Cooldown in seconds

_mintThreshold

uint256

Amount of MIM necessary to mint immediately

_redeemThreshold

uint256

Amount of 3X necessary to mint immediately

depositForMint()

depositForMint(uint256 amount, address depositFor) external 
Parameter NameTypeDescription

amount

uint256

Amount of DAI to use for minting

depositFor

address

User that gets the shares attributed to (for use in zapper contract)

depositForRedeem()

depositForRedeem(uint256 amount) external 
Parameter NameTypeDescription

amount

uint256

amount of 3X to be redeemed

withdrawFromBatch()

withdrawFromBatch(bytes32 _batchId, uint256 _amountToWithdraw, address _withdrawFor, address _recipient) external  returns (uint256)
Parameter NameTypeDescription

_batchId

bytes32

From which batch should funds be withdrawn from

_amountToWithdraw

uint256

Amount of 3X or DAI to be withdrawn from the queue (depending on mintBatch / redeemBatch)

_withdrawFor

address

User that gets the shares attributed to (for use in zapper contract)

withdrawFromBatch()

withdrawFromBatch(bytes32 _batchId, uint256 _amountToWithdraw, address _withdrawFor) external  returns (uint256)
Parameter NameTypeDescription

_batchId

bytes32

From which batch should funds be withdrawn from

_amountToWithdraw

uint256

Amount of 3X or DAI to be withdrawn from the queue (depending on mintBatch / redeemBatch)

_withdrawFor

address

User that gets the shares attributed to (for use in zapper contract)

claimAndStake()

claimAndStake(bytes32 _batchId) external 
Parameter NameTypeDescription

_batchId

bytes32

Id of batch to claim from

claimForAndStake()

claimForAndStake(bytes32 _batchId, address _claimFor) public 

claim()

claim(bytes32 batchId, address _claimFor) external  returns (uint256)
Parameter NameTypeDescription

batchId

bytes32

Id of batch to claim from

_claimFor

address

User that gets the shares attributed to (for use in zapper contract)

moveUnclaimedIntoCurrentBatch()

moveUnclaimedIntoCurrentBatch(bytes32[] batchIds, uint256[] shares, bool mint) external 

Since our output token is not the same as our input token we would need to swap the output token via 2 hops into out input token. If we want to do so id prefer to create a second function to do so as it would also require a slippage parameter and the swapping logic

Parameter NameTypeDescription

batchIds

bytes32[]

the ids of each batch where targetToken should be moved from

shares

uint256[]

how many shares should be claimed in each of the batches

mint

bool

should move token into the currentMintBatch vs currentRedeemBatch

Events

ProcessingThresholdUpdated

ProcessingThresholdUpdated(struct AbstractBatchController.ProcessingThreshold prevThreshold, struct AbstractBatchController.ProcessingThreshold newTreshold)

SlippageUpdated

SlippageUpdated(struct AbstractBatchController.Slippage prev, struct AbstractBatchController.Slippage current)

StakingUpdated

StakingUpdated(address beforeAddress, address afterAddress)

WithdrawnFromBatch

WithdrawnFromBatch(bytes32 batchId, uint256 amount, address to)

Claimed

Claimed(address account, enum BatchType batchType, uint256 shares, uint256 claimedToken)

Deposit

Deposit(address from, uint256 deposit)

DepositedUnclaimedSetTokenForRedeem

DepositedUnclaimedSetTokenForRedeem(uint256 amount, address account)

Withdrawal

Withdrawal(address to, uint256 amount)

Graphs

Dependency Graph

Inheritance Graph

Last updated