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})
Last updated