Yelay V3 SDK Docs
  • Intro
  • Main entities
  • Setting up your account
  • Initialization
  • Deposit
  • Withdrawals
  • Tracking balance and TVL
  • Yield tracking and claiming
  • Supportive methods
  • Deposits with timelock
  • Yelay's yield farming sources
Powered by GitBook
On this page

Withdrawals

PreviousDepositNextTracking balance and TVL

Last updated 2 months ago

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: 🔗

  • 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.

Yelay Vault Addresses