Withdrawals
Handling withdrawals
To initiate a withdrawal, use the following code:
const redeemTx = await sdk.vaults.redeem(vaultAddress, poolId, amount);
await redeemTx.wait();Where:
- vaultAddress– One of the vaults set up by Yelay. See vault addresses here: 🔗 Yelay Vault Addresses
- poolId– 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