EVM Withdraw
Queue a withdrawal of vault shares from DeFi protocols (currently Veda vaults). Unlike immediate redemptions, withdrawals enter a processing queue managed by the protocol.
Important Notes
- Only one withdrawal request can be active at a time per address
- Submitting a new withdrawal request replaces the existing one — amounts are updated, not added
- Minimum withdrawal: 0.00010001 vault shares
Supported Networks
Production: Ethereum, Base, BSC, Corn
Basic Usage
import { createLombardSDK, Chain, DeployProtocol } from '@lombard.finance/sdk';
import { config } from './lib/lombard';
const sdk = createLombardSDK(config);
const withdraw = sdk.chain.evm.withdraw({
sourceChain: Chain.ETHEREUM,
protocol: DeployProtocol.Veda,
});
await withdraw.prepare({
amount: '0.5',
});
// Check if approval is needed
if (withdraw.needsApproval) {
await withdraw.approve();
}
const result = await withdraw.execute();Status Flow
IDLE → NEEDS_APPROVAL → READY → COMPLETEDNEEDS_APPROVAL may be skipped if sufficient allowance exists.
Checking Pending Withdrawals
const pendingWithdrawals = await sdk.api.vaultWithdrawals('0x1234...');Events
import { WithdrawEvent } from '@lombard.finance/sdk';
withdraw.on(WithdrawEvent.StatusChange, (status) => {
console.log('Status:', status);
});
withdraw.on(WithdrawEvent.Completed, () => {
console.log('Withdrawal queued!');
});Last updated on