Async deposit flow
1) User requests a deposit
Args:
assets: the quantity of underlying to deposit.
controller: the address that will control the request. The user address.
owner: the address from which the asset will be transfered from. The user address.
After the transaction, users can check their pending requests by calling:
Args:
requestId, the id of the deposit request. Put 0 as a wildcard.
controller. User address.
Return:
Amount of assets pending
2) User claim his shares
After a settleDeposits, the shares are claimable and waiting in the vault.
Claiming the shares is not mandatory to start earning.
A user can know the amount of claimable shares by calling:
He can claim them by calling:
Args:
shares: the amount of shares to claim. Between 0 and the return of maxMint(userAddress).
receiver: user address.
Ux tip - Claim shares and request redeem in one tx
A user with claimable shares can directly request a redemption by calling:
Note: Already claimed shares can be requested to be redeemed via this method. It also means that you could only use this function to do redemption requests.
This will improve the UX and remove one transaction in the process.
Last updated