V3 Technical Docs
  • Deployed Contracts
    • Notional V3
      • Ethereum Mainnet
      • Arbitrum
  • Security
    • Audits
    • Bug Bounty
  • Currency Ids & Precision
    • Currency Ids
    • Market Indexes
    • Notional Internal Precision
  • Contract interaction guides
    • Intro
    • Trading guide
      • Deposit (Prime Lend)
      • Trade fCash (Borrow & Lend Fixed)
      • Add liquidity (Mint nTokens)
      • Withdraw liquidity (Redeem nTokens)
      • Withdraw (Prime Cash)
      • Settle Account
      • Enter Leveraged Vaults
      • Exit Leveraged Vaults
    • Accounts
    • Prime Cash Markets
    • fCash Markets
    • nTokens
    • Leveraged Vaults
    • Oracles
    • Governance parameters
  • Subgraph guides
    • Notional V3 Subgraphs
      • Fetch Notional Accounts
      • Fetch Notional's reserves
      • Fetch Notional nToken accounts
      • Fetch Historical Trades
      • Fetch an Account's P&L
      • Fetch current fCash and Prime Cash Rates
      • Fetch Historical Prime Cash & Prime Debt Exchange Rates
      • Fetch Prime Cash Market Balances
      • Fetch fCash Market Balances
      • Fetch Outstanding Debt
      • Fetch Historical nToken Exchange Rates
      • Fetch ETH Oracle Exchange Rates
      • Fetch Annual Incentive Rates
      • Fetch Interest Rate Models
      • Fetch Governance Parameters
  • Dune Dashboard
  • Notional Risk Docs
  • Notional V3 Docs
  • Notional Blog
Powered by GitBook
On this page
  • Get Leveraged Vault Configuration Parameters
  • Fetch a Leveraged Vault State
  1. Contract interaction guides

Leveraged Vaults

Get Leveraged Vault Configuration Parameters

The getVaultConfig method can be used to get a Leverage Vault's parameters:

vaultConfigs = notional.getVaultConfig(vaultAddress)
vaultFeeRate = vaultConfigs["feeRate"]/1e9
liquidationRate = vaultConfigs["liquidationRate"]/1e9 - 1
reserveFeeShare = vaultConfigs["reserveFeeShare"]/100
minAccountBorrowSize = vaultConfigs["minAccountBorrowSize"]/1e8
maxRequiredAccountCollateralRatio = vaultConfigs["maxRequiredAccountCollateralRatio"]/1e9
maxDeleverageCollateralRatio = vaultConfigs["maxDeleverageCollateralRatio"]/1e9
minCollateralRatio = vaultConfigs["minCollateralRatio"]/1e9

Fetch a Leveraged Vault State

The getVaultState method can be called to get the total amount of vault shares and debts of a given leveraged vault strategy:

vaultState = notional.getVaultState(accountAddress, maturityTimestamp)
totalVaultShares = vaultState["totalVaultShares"]
totalDebtUnderlying = vaultState["totalDebtUnderlying"]
PreviousnTokensNextOracles

Last updated 11 months ago