getBurnAmount
Description:
How many osToken burn do you need to make to withdraw all deposit.
Arguments:
Name | Type | Required | Description |
---|---|---|---|
vaultAddress | string | Yes | The address of the vault |
ltvPercent | bigint | Yes | sdk.vault.getVault |
mintedAssets | bigint | Yes | sdk.osToken.getPosition |
stakedAssets | bigint | Yes | sdk.vault.getStakeBalance |
newStakedAssets | bigint | Yes | The 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...',
})