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.
- DepositAssetAndMintNToken (3): specify
depositAmountin the asset token decimal precision.
- DepositUnderlyingAndMintNToken (4): specify
depositAmountin the underlying token decimal precision.
- ConvertCashToNToken (6): specify
depositAmountin 8 decimal Notional internal precision
Generally speaking, nToken redemption can be done via the
batchBalanceAndTradeActionmethods by specifying
RedeemNTokenas the DepositAction. In this case the
depositAmountshould be set to the nTokens to be redeemed in 8 decimal precision. Because
RedeemNTokenoccurs 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
nTokenRedeemthat allows accounts to manually redeem nTokens without selling fCash. nTokens will always be redeemable via this second method.
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.
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
nTokenClaimIncentivesmethod from the address that is holding the nTokens.
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
nTokenTransferApproveAllmethod on the Notional proxy smart contract.