Skip to main content

getMaxWithdrawAmount

Description:

How much a user can withdraw. The result accounts for the user's minted osToken; if there is no minted balance, it equals their staked assets. Pass withBurn: true to also include the assets that would be freed by burning the user's osToken, capped by the balance held in their wallet.

Arguments:

NameTypeRequiredInfo
vaultAddressstringYesThe address of the vault
userAddressstringYesThe address of the user
withBurnbooleanNoInclude assets freed by burning osToken (capped by the wallet)

Returns:

type Output = bigint

Example:

await sdk.vault.getMaxWithdrawAmount({
vaultAddress: '0x...',
userAddress: '0x...',
})