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
  • Withdraw a Prime Cash Balance from Notional
  • Withdraw Prime Cash from Notional (Borrow Prime)
  1. Contract interaction guides
  2. Trading guide

Withdraw (Prime Cash)

Withdraw a Prime Cash Balance from Notional

Users can use the withdraw method to redeem their Prime Cash balances from Notional:

# Redeem 100 Prime USDC from Notional to a user's wallet in USDC. 
tx = notional.withdraw(3, 100e8, True, {'from': account})

# Withdraw 100 Prime USDC from Notional to a user's wallet in Prime USDC.
tx = notional.withdraw(3, 100e8, False, {'from': account})

Note that the Prime Cash balance precision is 1e8.

Withdraw Prime Cash from Notional (Borrow Prime)

Users can use the withdraw method to borrow Prime Debts from Notional:

# Deposit 100 USDC on Notional. USDC external precision is 1e6.
notional.depositUnderlyingToken(account.address, 2, 100e6, {'from': account})

# In order to Borrow Prime Cash the user needs to enable Prime Borrow.
notional.enablePrimeBorrow(True, {'from': account})

# Borrow 50 Prime DAI from Notional to the user's wallet in DAI.
tx = notional.withdraw(3, 50e8, True, {'from': account})
PreviousWithdraw liquidity (Redeem nTokens)NextSettle Account

Last updated 1 year ago