Skip to main content

withdrawFromYieldVault

Withdraws assets from an Earn vault, then signs and sends the resulting transaction. As with depositToYieldVault, the vault’s contract address and asset decimals are resolved server-side — you pass a vaultId and a human-readable amount. Unlike a deposit, there is no approval step — the wallet is redeeming shares it already holds — so this is always a single transaction.

Usage

Parameters

Returns

Promise<{ transactionHash: string }> - The hash of the withdraw transaction.

Examples

Withdraw the full position

Supported Chains

withdrawFromYieldVault only supports EVM wallet accounts — vault actions are EVM-only today. Calling it with a non-EVM walletAccount throws a WalletProviderMethodUnavailableError, since only EVM wallet providers implement the underlying executeYieldTransaction method.

React

useWithdrawFromYieldVault invalidates useGetYieldPosition on success — treat that refetch as a nudge, since the withdrawal is only broadcast (not necessarily mined) when the mutation resolves.
Last modified on August 26, 2026