Request Withdrawals
Learn more how to request withdrawals via protocol
Request Withdrawals
There is only a single function for creating a withdrawal request. After calling this function successfully, the liquidity asset (USDC, EURC) will be send back to your wallet directly from the vault.
To make a withdrawal request, you must call the following function...
function requestRedeem(uint256 shares) external returns (uint256 assets);
...where shares is the number of vault tokens you wish to be redeemed. It will return the withdrawal request amount in assets.
Demo of Making a Withdrawal Request
To view a live example of making a withdrawal request, you can view our product documentation here.
Previewing Requests
Preview Redeem Request
To simulate the result of a withdrawal request at the current block and see how many assets would be withdrawn for a given number of vault tokens (i.e. shares), you can call the following function...
function previewRedeemRequest(
uint256 shares
) external view returns (uint256 assets);
It will returns the amount of assets that would be requested if this entire redeem request were to be processed at the current block. Note: This is equivalent of EIP-4626 previewRedeem.
Preview Withdrawal Request
To simulate the result of a withdrawal request at the current block and see how many vault tokens (i.e. shares) would be burned if this entire withdrawal request were to be processed at the current block, you can call the following function...
function previewWithdrawRequest(
uint256 assets
) external view returns (uint256 shares);
It will returns the amount of shares that would be burned if this entire withdrawRequest were to be processed at the current block. Note: This is equivalent of EIP-4626 previewWithdraw.
Convert to Assets
To see the get the value of a certain number of vault tokens as converted to liquidity assets (USDC, EURC), you can call the following function for a specified number of assets and it will return the number of shares.
function convertToShares(
uint256 assets
) external view returns (uint256 shares);
Convert to Shares
To see the value of a certain number of assets (USDC, EURC) converted to vault tokens (i.e. shares), you can call the following function for a specified number of assets and it will return the number of shares.
function convertToAssets(
uint256 shares
) external view returns (uint256 assets);
Last updated