Skip to main content

getBurnAmount

Description:

How many osToken burn do you need to make to withdraw all deposit.

Arguments:

NameTypeRequiredDescription
vaultAddressstringYesThe address of the vault
ltvPercentbigintYessdk.vault.getVault
mintedAssetsbigintYessdk.osToken.getPosition
stakedAssetsbigintYessdk.vault.getStakeBalance
newStakedAssetsbigintYesThe future amount of stake after the deposit

Returns:

type Output = bigint

Example:

sdk.osToken.getBurnAmount({
ltvPercent: 0n,
mintedAssets: 0n,
stakedAssets: 0n,
newStakedAssets: 0n,
vaultAddress: '0x...',
})