Withdrawals
Handling withdrawals
To initiate a withdrawal, use the following code:
const vault = '0x1234';
const pool = 1234;
const amount = 1000000n; // Amount of shares to redeem
const redeemTx = await sdk.actions.redeem(vault, pool, amount);Where:
vault– One of the vaults set up by Yelay. See vault addresses here: 🔗 Yelay Vault Addressespool– One of the projects (also referred to as "pools") set up by the client within the vault.amount– The amount to withdraw.
Withdrawals always return the vault’s native asset:
A USDC vault returns USDC.
A WETH vault returns WETH, and so on.
Last updated