NOTIONAL-V2-A - Mainnet

Fixed Rate Lending and Borrowing Notional-v1.1 connector on mainnet triggers methods like depositCollateral, withdrawCollateral, claimNOTE, redeemNTokenRaw, redeemNTokenAndWithdraw, redeemNTokenAndDeleverage, depositAndMintNToken, mintNTokenFromCash, depositAndLend, depositCollateralBorrowAndWithdraw, withdrawLend, mintSNoteFromBPT, mintSNoteFromETH, mintSNoteFromWETH, startCoolDown, stopCoolDown, redeemSNote, batchActionRaw. You can view details like source code, ABIs on Etherscan.

  • Use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee to indicate ETH.
  • use -1 or dsa.maxValue for the maximum amount in function.
  • If not sure about the arguments getId and setId, pass 0.

DepositCollateral

Deposit collateral into Notional, this should only be used for reducing risk of

spells.add({  connector: "NOTIONAL-V2-A",  method: "depositCollateral",  args: [currencyId, useUnderlying, depositAmount, getId, setId]});
Parameter Type Description
currencyId uint16 notional defined currency id to deposit
useUnderlying bool if true, will accept a deposit in the underlying currency (i.e DAI), if false
depositAmount uint256 amount of tokens to deposit
getId uint256 id of depositAmount
setId uint256 id to set the value of notional cash deposit increase (denominated in asset cash, i.e. cDAI)

WithdrawCollateral

Withdraw collateral from Notional

spells.add({  connector: "NOTIONAL-V2-A",  method: "withdrawCollateral",  args: [currencyId, redeemToUnderlying, withdrawAmount, getId, setId]});
Parameter Type Description
currencyId uint16 notional defined currency id to withdraw
redeemToUnderlying bool if true, will redeem the amount withdrawn to the underlying currency (i.e. DAI),
withdrawAmount uint256 amount of tokens to withdraw, denominated in asset tokens (i.e. cDAI)
getId uint256 id of withdraw amount
setId uint256 id to set the value of amount withdrawn, if redeemToUnderlying this amount will be in underlying

ClaimNOTE

Claims NOTE tokens and transfers to the address

spells.add({  connector: "NOTIONAL-V2-A",  method: "claimNOTE",  args: [setId]});
Parameter Type Description
setId uint256 the id to set the balance of NOTE tokens claimed

RedeemNTokenRaw

Redeem nTokens allowing for accepting of fCash residuals

spells.add({  connector: "NOTIONAL-V2-A",  method: "redeemNTokenRaw",  args: [currencyId, sellTokenAssets, tokensToRedeem, acceptResidualAssets, getId, setId]});
Parameter Type Description
currencyId uint16 notional defined currency id of nToken
sellTokenAssets bool set to false to accept fCash residuals into portfolio, set to true will
tokensToRedeem uint96 amount of nTokens to redeem
acceptResidualAssets bool undefined
getId uint256 id of amount of tokens to redeem
setId uint256 id to set amount of asset cash from redeem

RedeemNTokenAndWithdraw

Redeems nTokens to cash and withdraws the resulting cash

spells.add({  connector: "NOTIONAL-V2-A",  method: "redeemNTokenAndWithdraw",  args: [currencyId, tokensToRedeem, amountToWithdraw, redeemToUnderlying, getId, setId]});
Parameter Type Description
currencyId uint16 notional defined currency id of nToken
tokensToRedeem uint96 amount of nTokens to redeem
amountToWithdraw uint256 amount of asset cash to withdraw, if set to uint(-1) then will withdraw the
redeemToUnderlying bool if true, will redeem the asset cash withdrawn to underlying tokens
getId uint256 id of amount of tokens to redeem
setId uint256 id to set amount of asset cash or underlying tokens withdrawn

RedeemNTokenAndDeleverage

Redeems nTokens and uses the cash to repay a borrow.

spells.add({  connector: "NOTIONAL-V2-A",  method: "redeemNTokenAndDeleverage",  args: [currencyId, tokensToRedeem, marketIndex, fCashAmount, minLendRate, getId]});
Parameter Type Description
currencyId uint16 notional defined currency id of nToken
tokensToRedeem uint96 amount of nTokens to redeem
marketIndex uint8 the market index that references where the account will lend
fCashAmount uint88 amount of fCash to lend into the market (this has the effect or repaying
minLendRate uint32 minimum rate where the user will lend, if the rate is lower will revert
getId uint256 id of amount of tokens to redeem

DepositAndMintNToken

Deposit asset or underlying tokens and mint nTokens in a single transaction

spells.add({  connector: "NOTIONAL-V2-A",  method: "depositAndMintNToken",  args: [currencyId, depositAmount, useUnderlying, getId, setId]});
Parameter Type Description
currencyId uint16 notional defined currency id to deposit
depositAmount uint256 amount of tokens to deposit
useUnderlying bool if true, will accept a deposit in the underlying currency (i.e DAI), if false
getId uint256 id of depositAmount
setId uint256 id to set the value of nToken balance change

MintNTokenFromCash

Uses existing Notional cash balance (deposits in Notional held as cTokens) and uses them to mint

spells.add({  connector: "NOTIONAL-V2-A",  method: "mintNTokenFromCash",  args: [currencyId, cashBalanceToMint, getId, setId]});
Parameter Type Description
currencyId uint16 notional defined currency id of the cash balance
cashBalanceToMint uint256 amount of account's cash balance to convert to nTokens
getId uint256 id of cash balance
setId uint256 id to set the value of nToken increase

DepositAndLend

Deposits some amount of tokens and lends them in the specified market. This method can also be used to repay a

spells.add({  connector: "NOTIONAL-V2-A",  method: "depositAndLend",  args: [currencyId, depositAmount, useUnderlying, marketIndex, fCashAmount, minLendRate, getId]});
Parameter Type Description
currencyId uint16 notional defined currency id to lend
depositAmount uint256 amount of cash to deposit to lend
useUnderlying bool if true, will accept a deposit in the underlying currency (i.e DAI), if false
marketIndex uint8 the market index to lend to. This is a number from 1 to 7 which corresponds to the tenor
fCashAmount uint88 amount of fCash for the account to receive, this is equal to how much the account will receive
minLendRate uint32 the minimum interest rate that the account is willing to lend at, if set to zero the account will accept
getId uint256 returns the deposit amount

DepositCollateralBorrowAndWithdraw

Deposits some amount of tokens as collateral and borrows. This can be achieved by combining multiple spells but this

spells.add({  connector: "NOTIONAL-V2-A",  method: "depositCollateralBorrowAndWithdraw",  args: [depositCurrencyId, depositAction, depositAmount, borrowCurrencyId, marketIndex, fCashAmount, maxBorrowRate, redeemToUnderlying, getId, setId]});
Parameter Type Description
depositCurrencyId uint16 notional defined currency id of the collateral to deposit
depositAction DepositActionType one of the following values which will define how the collateral is deposited:
depositAmount uint256 amount of cash to deposit as collateral
borrowCurrencyId uint16 id of the currency to borrow
marketIndex uint8 the market index to borrow from. This is a number from 1 to 7 which corresponds to the tenor
fCashAmount uint88 amount of fCash for the account to borrow, this is equal to how much the account must pay
maxBorrowRate uint32 the maximum interest rate that the account is willing to borrow at, if set to zero the account will accept
redeemToUnderlying bool if true, redeems the borrowed balance from cTokens down to the underlying token before transferring
getId uint256 returns the collateral deposit amount
setId uint256 sets the amount that the account borrowed (i.e. how much of borrowCurrencyId it has received)

WithdrawLend

Allows an account to withdraw from a fixed rate lend by selling the fCash back to the market. Equivalent to

spells.add({  connector: "NOTIONAL-V2-A",  method: "withdrawLend",  args: [currencyId, marketIndex, fCashAmount, maxBorrowRate, setId]});
Parameter Type Description
currencyId uint16 notional defined currency id of the lend asset to withdraw
marketIndex uint8 the market index of the fCash asset. This is a number from 1 to 7 which corresponds to the tenor
fCashAmount uint88 amount of fCash at the marketIndex that should be sold
maxBorrowRate uint32 the maximum interest rate that the account is willing to sell fCash at at, if set to zero the
setId uint256 sets the amount that the account has received when withdrawing its lend

MintSNoteFromBPT

Mints sNOTE from the underlying BPT token.

spells.add({  connector: "NOTIONAL-V2-A",  method: "mintSNoteFromBPT",  args: [bptAmount]});
Parameter Type Description
bptAmount uint256 is the amount of BPT to transfer from the msg.sender.

MintSNoteFromETH

Mints sNOTE from some amount of NOTE and ETH

spells.add({  connector: "NOTIONAL-V2-A",  method: "mintSNoteFromETH",  args: [noteAmount, ethAmount, minBPT, getId]});
Parameter Type Description
noteAmount uint256 amount of NOTE to transfer into the sNOTE contract
ethAmount uint256 undefined
minBPT uint256 slippage parameter to prevent front running
getId uint256 undefined

MintSNoteFromWETH

Mints sNOTE from some amount of NOTE and WETH

spells.add({  connector: "NOTIONAL-V2-A",  method: "mintSNoteFromWETH",  args: [noteAmount, wethAmount, minBPT, getId]});
Parameter Type Description
noteAmount uint256 amount of NOTE to transfer into the sNOTE contract
wethAmount uint256 amount of WETH to transfer into the sNOTE contract
minBPT uint256 slippage parameter to prevent front running
getId uint256 undefined

StartCoolDown

Begins a cool down period for the sender

spells.add({  connector: "NOTIONAL-V2-A",  method: "startCoolDown",  args: []});
Parameter Type Description

StopCoolDown

Stops a cool down for the sender

spells.add({  connector: "NOTIONAL-V2-A",  method: "stopCoolDown",  args: []});
Parameter Type Description

RedeemSNote

Redeems some amount of sNOTE to underlying constituent tokens (ETH and NOTE).

spells.add({  connector: "NOTIONAL-V2-A",  method: "redeemSNote",  args: [sNOTEAmount, minWETH, minNOTE, redeemWETH]});
Parameter Type Description
sNOTEAmount uint256 amount of sNOTE to redeem
minWETH uint256 slippage protection for ETH/WETH amount
minNOTE uint256 slippage protection for NOTE amount
redeemWETH bool true if redeeming to WETH to ETH

BatchActionRaw

Executes a number of batch actions on the account without getId or setId integration

spells.add({  connector: "NOTIONAL-V2-A",  method: "batchActionRaw",  args: [actions]});
Parameter Type Description
actions BalanceActionWithTrades[] a set of BatchActionWithTrades that will be executed for this account

If you still can't find something you're looking for or have any questions, ask them at our developers community on Discord or simply send an Email.


Our team is excited about assisting you to build an application using Instadapp Developer Platform. Your questions and feedback help us make a better development environment for future developers.