Mint and Redeem nTokens
How to integrate with Notional as a liquidity provider via nTokens
Lending and borrowing on Notional is facilitated by liquidity providers who hold nTokens. nTokens provide liquidity across all fCash markets at predefined ratios called the deposit shares. For more information about how nTokens work see the documentation. For a more in depth analysis of the economic returns of nTokens go here. For current nToken governance settings go here.
Minting nTokens
Minting nTokens can be done via the batchBalanceAction
or batchBalanceAndTradeAction
methods by specifying one of the following DepositAction types:
DepositAssetAndMintNToken (3): specify
depositAmount
in the asset token decimal precision.DepositUnderlyingAndMintNToken (4): specify
depositAmount
in the underlying token decimal precision.ConvertCashToNToken (6): specify
depositAmount
in 8 decimal Notional internal precision
When market utilization is near the specified leverage threshold, minting nTokens may result in lending in addition to providing liquidity. This will not have an effect how the transaction is submitted but will increase the overall gas limit required. Transactions may revert if they do not supply a sufficiently high gas limit. The Notional UI increases the gas limit by 5%, you may want to do the same (or more).
Redeeming nTokens
Generally speaking, nToken redemption can be done via the batchBalanceAction
or batchBalanceAndTradeAction
methods by specifying RedeemNToken
as the DepositAction. In this case the depositAmount
should be set to the nTokens to be redeemed in 8 decimal precision. Because RedeemNToken
occurs before fCash trades are processed, it is possible to redeem nTokens and use the resulting cash to lend on the protocol. This can be useful to deleverage an account in a single transaction.
When redeeming nTokens, fCash will be sold on the market to convert it back to cash. There are slippage costs associated with this that may make it impossible to redeem nTokens as cash. See the description in the documentation. For the vast majority of accounts, this will not be an issue. However, if this problem does arise there is a method called nTokenRedeem
that allows accounts to manually redeem nTokens without selling fCash. nTokens will always be redeemable via this second method.
Borrowing with nTokens as Collateral
nTokens are automatically listed as collateral inside Notional. There is no need to transfer or enable nTokens as collateral. An account can borrow cross currency (i.e. borrow USDC against nETH) or local currency (i.e. borrow ETH against nETH).
Note that an account can borrow ETH against nETH and then use that ETH to mint additional nETH. This is called providing liquidity on leverage, and the maximum amount of leverage allowed is determined by the nToken PV Haircut percentage. Borrowing local currency against nTokens does not expose an account to cross currency exchange rate risk but it does expose it to interest rate risk.
See the Monitor Account Risk section for more details on how to manage risk.
See the Lend and Borrow fCash section on how to initiate a borrow transaction.
Claiming Incentives
NOTE incentives for a particular currency are automatically claimed and transferred whenever an nToken balance is changed (minted or redeemed). To manually claim incentives overall all nToken balances you can call the nTokenClaimIncentives
method from the address that is holding the nTokens.
ERC20 Compatibility
nTokens are ERC20 compliant and can be transferred via their deployed addresses here. You can also retrieve the nToken address for a currency id via the nTokenAddress
view method.
In addition to normal ERC20 approvals, nTokens also offer a "blanket" approval option. Users can give a third party Ethereum address allowance across all nTokens. This can be used to allow a protocol to transfer any of their nToken balances with a single approve transaction (i.e. a blanket approval for nDAI, nUSDC, nETH).
To use this approval mechanism, call the nTokenTransferApproveAll
method on the Notional proxy smart contract.
Last updated