Exit Leveraged Vaults

Exit Leveraged Vault

Notional users can use the exitVault method to exit or update a vault position:

# Exit a vault (USDC borrow) by redeeming the account's vault shares and repaying its fCash debt.

vaultShares = notional.getVaultAccount(account.address, vaultAddress)["vaultShares"]
fCash = abs(notional.getVaultAccount(account.address, vaultAddress)["accountDebtUnderlying"])
tx = notional.exitVault(account.address, vaultAddress, account.address, vaultShares, fCash, 0, "", {'from': account})

A user could increase his leverage ratio by partially redeeming his vault shares without repaying his debt position.

Last updated