Dapp Use Cases
ERC4626 Deposit and Withdraw
Make sure that deposit and withdraw are correct
Use Case
ERC4626 is a standard for creating yield-bearing tokens that are compatible with ERC20. It is used in many DeFi protocols, including Aave, Compound, and Yearn.
There are two functions available to pre-calculate the amount of shares that will be received when depositing and withdrawing assets: previewDeposit
and previewWithdraw
.
This assertions makes sure that deposit
and withdraw
are correct as per the preview functions.
Explanation
This assertion makes sure that the deposit
and withdraw
functions are correct.