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
  • Redeem nTokens (sell asset and don't accept residuals)
  • Redeem nTokens (don't sell asset and accept residuals)
  • Redeem nTokens (sell asset and accept residuals)
  1. Contract interaction guides
  2. Trading guide

Withdraw liquidity (Redeem nTokens)

Redeem nTokens (sell asset and don't accept residuals)

# Redeem 100 nDAI. Sell fDAI residuals to Prime DAI and don't accept fDAI residuals. 
notional.nTokenRedeem(account.address, 2, 100e8, True, False, {'from': account})

Note that by setting sellTokenAssets to True and acceptResidualAssets to False, the nToken redeemer will only receive Prime DAI in exchange for his nDAI. If the nDAI account has accrued any fDAI residuals, they will be sold for Prime Cash during the redeem action. Trading fCash for Prime Cash is subject to fCash trading fees. A large nToken redemption might therefore lead the redeemer to face slippage when redeeming.

Redeem nTokens (don't sell asset and accept residuals)

# Redeem 100 nDAI. Don't sell fDAI residuals to Prime DAI and accept fDAI residuals.
notional.nTokenRedeem(account.address, 2, 100e8, False, True, {'from': account})

Note that by setting sellTokenAssets to False and acceptResidualAssets to True, the nToken redeemer will likely receive fDAI in all maturities and some Prime DAI.

Redeem nTokens (sell asset and accept residuals)

# Redeem 100 nDAI. Sell fDAI residuals to Prime DAI and accept fDAI residuals.
notional.nTokenRedeem(account.address, 2, 100e8, True, True, {'from': account})

Note that by setting sellTokenAssets to True and acceptResidualAssets to True, the nToken redeemer will trade fDAI residuals for Prime DAI. If selling residuals is impossible due to low fCash liquidity, the redeemer will receive the fCash residuals assets to his portfolio.

PreviousAdd liquidity (Mint nTokens)NextWithdraw (Prime Cash)

Last updated 1 year ago