LogoLogo
  • Overview
  • Learn
    • Lend
    • Borrow
    • Interest Rate
    • Liquidate
    • Flash Loans
    • NEPT Token
    • Risks
  • Develop
    • Contracts
      • Market
      • Interest Model
      • Token
      • Oracle
      • Querier
      • Flashloan Reciever
      • nToken
    • Token Addresses
  • User Guides
    • How to Lend on Neptune
    • How to Borrow on Neptune
    • How to Stake with the Neptune Validator
    • How to bridge TIA to Injective
  • Socials and Media
  • Audits
Powered by GitBook
On this page
  • How Borrowing Works
  • Advantages of Borrowing
  • Margin Sub Accounts
  • Collateral
  • Collateral Types
  • Borrowing
  • Account Health
  1. Learn

Borrow

The Neptune Protocol enables users to borrow digital assets by depositing collateral. Through a sophisticated risk management system, users can create multiple margin accounts, each with configurable risk parameters and isolation settings. The protocol continuously monitors account health and enforces borrowing limits through dynamic interest rates and multi-stage liquidation mechanisms.

How Borrowing Works

Borrowing in Neptune Protocol follows these key steps:

  1. Deposit Collateral: Users deposit supported assets as collateral into their chosen margin account

  2. Borrow Assets: Users can borrow assets up to their account's borrowing capacity

  3. Maintain Health: Account health must stay above 1.0 to avoid liquidation

  4. Repay Debt: Users can repay borrowed assets plus accrued interest at any time

A users borrowing capacity depends on the collateral value, debt value and asset-specific parameters.

Advantages of Borrowing

Borrowing in DeFi offers several key benefits to users. It enables access to liquidity without selling assets, allowing users to maintain their long-term positions while accessing capital for other opportunities. Users can leverage their existing crypto holdings to obtain working capital, take advantage of trading opportunities, or manage short-term expenses. Additionally, borrowing can be used for tax-efficient lending strategies, as borrowing against assets doesn't typically trigger taxable events like selling would. The permissionless and transparent nature of DeFi borrowing also means users can access loans 24/7 without traditional credit checks or lengthy approval processes.

Margin Sub Accounts

Neptune empowers users with the ability to create multiple isolated margin accounts, each serving as a separate risk container. This powerful feature enables users to:

  • Implement different trading strategies without cross-contamination of risk

  • Maintain distinct collateral ratios for different purposes

  • Isolate high-risk positions from conservative positions

  • Organize borrowing activities by purpose (e.g., trading, yield farming, or long-term holdings)

Each sub-account operates independently, ensuring that the performance and health of one account has no impact on the others, providing users with maximum flexibility and risk management control.

Collateral

To open a margin account and start borrow, a user must first supply a crypto asset as collateral. Collateral is used in the protocol to ensure that outstanding debts can be repaid and maintain system solvency. This means Neptune is an over-collateralized borrowing platform, meaning the value of the collateral must maintain a higher value of the outstanding debt.

Collateral assets have two main parameters that determine the maximum a user can borrow against them and when they would be liquidated;

  • allowable_LTV

  • liquidation_LTV

The maximum a user can borrow against a collateral is equal to the allowable_LTV parameter of the collateral asset

Where:

  • Collateral Value: The USD value of the deposited collateral asset

  • Allowable LTV: The maximum loan-to-value ratio permitted for this collateral type (e.g., 0.8 for 80%)

A margin account can be liquidated if the account health falls below the liquidation_LTV parameter of the collateral asset.

Where:

  • Collateral Value: The USD value of the deposited collateral asset

  • Liquidation LTV: The loan-to-value ratio at which the collateral can be liquidated (e.g., 0.7 for 70%)

Multiple collaterals can be used in a margin account, which would then be considered 'cross margin'. Using multiple collaterals can help offset the volatility of any one collateral and protect the account from liquidation.

The value a user can borrow against a basket of mixed collaterals is:

Where:

  • i: Represents each individual collateral asset in the account

  • n: The total number of different collateral assets

  • Collateral Value_i: The USD value of the i-th collateral asset

  • Allowable LTV_i: The maximum loan-to-value ratio for the i-th collateral type

Collateral Types

Neptune's advanced configuration allows a user to choose how they use assets as collateral for different risk configurations. The following are a few of the different collateral types that can be used;

Tokens

Tokens are common crypto assets such as ETH, USDC or INJ. Their value is derived from the price they trade at on open markets.

LSTs

LSTs (Liquid Staking Tokens) are derivatives of tokens that can be staked to earn yield. They are commonly interest bearing and compound in value over time. Their value is derived from their underlying asset value plus the interest they accrue over time.

nTokens

nTokens are interest bearing receipt token representing a users lending deposits in Neptune. nTokens compound in value over time and can be redeemed for their underlying assets. Using nTokens allows a user to borrow against their lending positions.

Borrowing

Once a user has collateral in a margin account they can now borrow any available crypto asset(s) they choose. The amount a user can borrow is determined by the value of their collateral.

Borrowing assets from Neptune incurs a cost, know as the borrow interest, which grows over time and compounds to the debt position. The cost to borrow is dynamic and is set by the Neptune interest rate controller.

Where:

  • Borrow Rate: The annual interest rate charged for borrowing (expressed as a decimal, e.g., 0.05 for 5% APR)

  • Borrowed Amount: The USD value of the assets borrowed from the protocol

Account Health

Account health is a metric used in Neptune to represent the risk of a select margin account. It is calculated based on the value of margin account's collateral and debt values

Where:

  • Weighted Collateral Value: The sum of all USD collateral values multiplied by their respective liquidation_LTV

  • Total Debt Value: The total USD value of all borrowed assets plus accrued interest

An account health of great than 1 mean the account is in a healthy state. An account health below 1 means the account is now subject to liquidation, where a user's collateral can be seized by a third party who repays their outstanding debt.

PreviousLendNextInterest Rate

Last updated 2 months ago

Max Borrow=Collateral Value×Allowable LTV\text{Max Borrow} = \text{Collateral Value} \times \text{Allowable LTV}Max Borrow=Collateral Value×Allowable LTV
Liquidation Value=Collateral Value×Liquidation LTV\text{Liquidation Value} = \text{Collateral Value} \times \text{Liquidation LTV}Liquidation Value=Collateral Value×Liquidation LTV
Max Borrow=∑i=1n(Collateral Valuei×Allowable LTVi)\text{Max Borrow} = \sum_{i=1}^{n} (\text{Collateral Value}_i \times \text{Allowable LTV}_i)Max Borrow=i=1∑n​(Collateral Valuei​×Allowable LTVi​)
Borrow Interest=Borrow Rate×Borrowed Amount\text{Borrow Interest} = \text{Borrow Rate} \times \text{Borrowed Amount}Borrow Interest=Borrow Rate×Borrowed Amount
Account Health=Weighted Collateral ValueTotal Debt Value\text{Account Health} = \frac{\text{Weighted Collateral Value}}{\text{Total Debt Value}}Account Health=Total Debt ValueWeighted Collateral Value​