Euler - Mainnet

Deposit ETH/ERC20_Token. Euler-v1.0 connector on mainnet triggers methods like deposit, withdraw, borrow, repay, mint, burn, eTransfer, dTransfer, approveSpenderDebt, enterMarket, exitMarket. 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.

Deposit

Deposit a token to Euler for lending / collaterization.

spells.add({  connector: "EULER-A",  method: "deposit",  args: [subAccount, token, amt, enableCollateral, getId, setId]});
Parameter Type Description
subAccount uint256 Sub-account Id (0 for primary and 1 - 255 for sub-account)
token address The address of the token to deposit.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
amt uint256 The amount of the token to deposit. (For max: `uint256(-1)`)
enableCollateral bool True for entering the market
getId uint256 ID to retrieve amt.
setId uint256 ID stores the amount of tokens deposited.

Withdraw

Withdraw deposited token and earned interest from Euler

spells.add({  connector: "EULER-A",  method: "withdraw",  args: [subAccount, token, amt, getId, setId]});
Parameter Type Description
subAccount uint256 Subaccount number
token address The address of the token to withdraw.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
amt uint256 The amount of the token to withdraw. (For max: `uint256(-1)`)
getId uint256 ID to retrieve amt.
setId uint256 ID stores the amount of tokens withdrawn.

Borrow

Borrow a token from Euler

spells.add({  connector: "EULER-A",  method: "borrow",  args: [subAccount, token, amt, getId, setId]});
Parameter Type Description
subAccount uint256 Subaccount number
token address The address of the token to borrow.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
amt uint256 The amount of the token to borrow.
getId uint256 ID to retrieve amt.
setId uint256 ID stores the amount of tokens deposited.

Repay

Repay a token from Euler

spells.add({  connector: "EULER-A",  method: "repay",  args: [subAccount, token, amt, getId, setId]});
Parameter Type Description
subAccount uint256 Subaccount number
token address The address of the token to repay.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
amt uint256 The amount of the token to repay. (For max: `uint256(-1)`)
getId uint256 ID to retrieve amt.
setId uint256 ID stores the amount of tokens deposited.

Mint

Mint a token from Euler. Mint creates an equal amount of deposits and debts. (self-borrow)

spells.add({  connector: "EULER-A",  method: "mint",  args: [subAccount, token, amt, getId, setId]});
Parameter Type Description
subAccount uint256 Subaccount number
token address The address of the token to mint.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
amt uint256 The amount of the token to mint.
getId uint256 ID to retrieve amt.
setId uint256 ID stores the amount of tokens deposited.

Burn

Burn a token from Euler. Burn removes equal amount of deposits and debts.

spells.add({  connector: "EULER-A",  method: "burn",  args: [subAccount, token, amt, getId, setId]});
Parameter Type Description
subAccount uint256 Subaccount number
token address The address of the token to burn.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
amt uint256 The amount of the token to burn.
getId uint256 ID to retrieve amt.
setId uint256 ID stores the amount of tokens deposited.

ETransfer

ETransfer deposits from one sub-account to another.

spells.add({  connector: "EULER-A",  method: "eTransfer",  args: [subAccountFrom, subAccountTo, token, amt, getId, setId]});
Parameter Type Description
subAccountFrom uint256 subAccount from which deposit is transferred
subAccountTo uint256 subAccount to which deposit is transferred
token address The address of the token to etransfer.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
amt uint256 The amount of the token to etransfer. (For max: `uint256(-1)`)
getId uint256 ID to retrieve amt.
setId uint256 ID stores the amount of tokens deposited.

DTransfer

DTransfer deposits from one sub-account to another.

spells.add({  connector: "EULER-A",  method: "dTransfer",  args: [subAccountFrom, subAccountTo, token, amt, getId, setId]});
Parameter Type Description
subAccountFrom uint256 subAccount from which debt is transferred
subAccountTo uint256 subAccount to which debt is transferred
token address The address of the token to dtransfer.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
amt uint256 The amount of the token to dtransfer. (For max: `uint256(-1)`)
getId uint256 ID to retrieve amt.
setId uint256 ID stores the amount of tokens deposited.

ApproveSpenderDebt

Approve sender to send debt.

spells.add({  connector: "EULER-A",  method: "approveSpenderDebt",  args: [subAccountId, debtSender, token, amt, setId]});
Parameter Type Description
subAccountId uint256 Subaccount id of receiver
debtSender address Address of sender
token address The address of the token.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
amt uint256 The amount of the token.
setId uint256 ID stores the amount of tokens deposited.

EnterMarket

Enter Market.

spells.add({  connector: "EULER-A",  method: "enterMarket",  args: [subAccountId, tokens]});
Parameter Type Description
subAccountId uint256 Subaccount number
tokens address[] Array of new token markets to be entered

ExitMarket

Exit Market.

spells.add({  connector: "EULER-A",  method: "exitMarket",  args: [subAccountId, token]});
Parameter Type Description
subAccountId uint256 Subaccount number
token address token address

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.