asset()
must not reverttotalAssets()
must not revertmaxDeposit()
must not revertmaxMint()
must not revertmaxRedeem()
must not revertmaxWithdraw()
must not revert
deposit()
must deduct assets from the ownerdeposit()
must credit shares to the receiverdeposit()
must mint greater than or equal to the number of shares predicted bypreviewDeposit()
mint()
must deduct assets from the ownermint()
must credit shares to the receivermint()
must consume less than or equal to the number of assets predicted bypreviewMint()
withdraw()
must deduct shares from the ownerwithdraw()
must credit assets to the receiverwithdraw()
must deduct less than or equal to the number of shares predicted bypreviewWithdraw()
redeem()
must deduct shares from the ownerredeem()
must credit assets to the receiverredeem()
must credit greater than or equal to the number of assets predicted bypreviewRedeem()
withdraw()
must allow proxies to withdraw tokens on behalf of the owner using share token approvalsredeem()
must allow proxies to redeem shares on behalf of the owner using share token approvals- Third party
withdraw()
calls must update the msg.sender's allowance - Third party
redeem()
calls must update the msg.sender's allowance - Third parties must not be able to
withdraw()
tokens on an owner's behalf without a token approval - Third parties must not be able to
redeem()
shares on an owner's behalf without a token approval
maxDeposit()
must assume the receiver/sender has infinite assetsmaxMint()
must assume the receiver/sender has infinite assetspreviewMint()
must not account for msg.sender asset balancepreviewDeposit()
must not account for msg.sender asset balancepreviewWithdraw()
must not account for msg.sender share balancepreviewRedeem()
must not account for msg.sender share balance
-
Shares may never be minted for free using:
previewDeposit()
previewMint()
convertToShares()
-
Tokens may never be withdrawn for free using:
previewWithdraw()
previewRedeem()
convertToAssets()
-
Shares may never be minted for free using:
deposit()
mint()
-
Tokens may never be withdrawn for free using:
withdraw()
redeem()
-
decimals()
should be larger than or equal toasset.decimals()
-
Accounting system must not be vulnerable to share price inflation attacks
-
deposit/mint
must increasetotalSupply/totalAssets
-
withdraw/redeem
must decreasetotalSupply/totalAssets
-
previewDeposit()
must not account for vault specific/user/global limits -
previewMint()
must not account for vault specific/user/global limits -
previewWithdraw()
must not account for vault specific/user/global limits -
previewRedeem()
must not account for vault specific/user/global limits