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
  • Available nTokens
  • Overview
  • Query Messages
  • 1. Token Info
  • 2. Balance
  • Execute Messages
  • 1. Transfer
  • 2. Send
  • Usage as Collateral
  1. Develop
  2. Contracts

nToken

The nToken Contracts represent receipt tokens issued to lenders when they provide assets to the Neptune Protocol. Each supported market asset has its own nToken contract that tracks lending positions and handles the distribution of lending yields.

Available nTokens

Asset
nToken Contract Address

nAUSD

nSOL

nTIA

nUSDC

nWETH

nUSDT

nATOM

nINJ


Overview

nTokens (Neptune Receipt Tokens) are CW20-compliant tokens that:

  • Are minted when users deposit assets into Neptune lending markets

  • Represent a user's share of the lending pool

  • Automatically accumulate lending yields

  • Can be used as collateral in Neptune markets

  • Can be transferred between users while maintaining the underlying position

The redemption value of nTokens increases over time as lending interest accrues, allowing holders to redeem for more of the underlying asset than they initially deposited.


Query Messages

1. Token Info

Query: token_info

Purpose: Retrieves basic information about the nToken including name, symbol, decimals, and total supply.

Query Input:

{
  "token_info": {}
}

Query Response:

{
  "name": "Neptune USDT",
  "symbol": "nUSDT",
  "decimals": 6,
  "total_supply": "873600917508"
}
Parameter
Type
Description

name

string

The name of the nToken

symbol

string

The symbol of the nToken

decimals

u8

Number of decimal places

total_supply

unit256

Current total supply of the nToken

2. Balance

Query: balance

Purpose: Returns the nToken balance of a specified address.

Query Input:

{
  "balance": {
    "address": "inj1..."
  }
}

Query Response:

{
  "balance": "1000000"
}
Parameter
Type
Description

balance

unit128

The nToken balance of the specified address


Execute Messages

1. Transfer

Execute: transfer

Purpose: Transfers nTokens from the sender to a specified recipient.

Execute Input:

{
  "transfer": {
    "recipient": "inj1...",
    "amount": "1000000"
  }
}
Parameter
Type
Description
Required

recipient

addr

Address to receive the nTokens

Yes

amount

unit128

Amount of nTokens to transfer

Yes

2. Send

Execute: send

Purpose: Transfers nTokens from the sender to a contract, triggering a receive hook on the receiving contract. This is used for operations like redeeming nTokens for the underlying asset through the Market contract.

Execute Input:

{
  "send": {
    "contract": "inj1nc7gjkf2mhp34a6gquhurg8qahnw5kxs5u3s4u",
    "amount": "1000000",
    "msg": "eyJyZWRlZW0iOnt9fQ==" // Base64 encoded message: {"redeem":{}}
  }
}
Parameter
Type
Description
Required

contract

addr

Contract address to receive the nTokens

Yes

amount

unit128

Amount of nTokens to send

Yes

msg

binary

Base64 encoded message to pass to the receiving contract

Yes


Usage as Collateral

nTokens can be used as collateral in Neptune markets, allowing users to maintain their lending positions while borrowing against them. When used as collateral, nTokens are valued based on:

  1. The current market price of the underlying asset

  2. The current redemption rate of the nToken

  3. The collateral parameters set for the specific nToken

This enables strategies like:

  • Leveraging lending positions

  • Maintaining exposure to lending yields while accessing liquidity

  • Complex yield strategies combining lending and borrowing

PreviousFlashloan RecieverNextToken Addresses

Last updated 2 months ago

inj1tkuemghm734h9qy8fh2eu0qp9hyfdlws0llt8g
inj1zcwr03uqw57g88nqvgpwfkazwutpqz9kplny4s
inj1fzquxxxam59z6fzewy2hvvreeh3m04x83zg4vv
inj1dafy7fv7qczzatd98dv8hekx6ssckrflswpjaz
inj1kehk5nvreklhylx22p3x0yjydfsz9fv3fvg5xt
inj1cy9hes20vww2yr6crvs75gxy5hpycya2hmjg9s
inj16jf4qkcarp3lan4wl2qkrelf4kduvvujwg0780
inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f