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
  • Deposit a single Currency to a Notional account
  • Deposit Prime Cash to a Notional Account
  • Batch deposit to a Notional Account
  1. Contract interaction guides
  2. Trading guide

Deposit (Prime Lend)

Deposit a single Currency to a Notional account

To deposit underlying tokens to Notional, users can use the depositUnderlyingToken method:

# Deposit DAI on Notional. DAI external precision is 1e18.
notional.depositUnderlyingToken(account.address, 2, 10e18, {'from': account})

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

# Deposit 1 ETH on Notional
notional.depositUnderlyingToken(account.address, 1, 1e18, {'from': account, 'value':1e18})

Deposit Prime Cash to a Notional Account

To deposit Prime Cash to Notional, users can use the depositAssetToken method:

# Deposit 10 pDAI to a Notional Account. pCash external precision is 1e8.
notional.depositAssetToken(account.address, 2, 10e8, {'from': account})

# Deposit 100 pUSDC to a Notional Account. pCash external precision is 1e8.
notional.depositAssetToken(account.address, 3, 100e8, {'from': account})

# Deposit 1 pETH to a Notional Account. pCash external precision is 1e8.
notional.depositAssetToken(account.address, 1, 1e8, {'from': account})

Batch deposit to a Notional Account

To deposit multiple tokens to Notional at once, users can use the batchBalanceAction method:

from helpers import get_balance_action

# Deposit 100 DAI & 10 USDC
depositActionDAI = get_balance_action(2, "DepositUnderlying", depositActionAmount=100e18)
depositActionUSDC = get_balance_action(3, "DepositUnderlying", depositActionAmount=10e6)

tx = notional.batchBalanceAction(account.address, [depositActionDAI, depositActionUSDC], {'from': account})

Note that the array of actions must be sorted by currency ids when using batch functions.

PreviousTrading guideNextTrade fCash (Borrow & Lend Fixed)

Last updated 5 months ago