[OLD] Instadapp Docs
  • Introduction
  • DeFi Smart Account (DSA)
  • DSA SDK
    • Running Instadapp SDK
  • 💻Instadapp GUI
    • Integrated Protocols
      • Aave
      • Compound Finance
      • MakerDAO
    • Strategies
    • Multi-Protocol Refinancing
    • Authorities
    • Debt Collateral Ratio
  • 👩‍💻 DSA SDK
    • Casting Spells
    • Build a Connector
    • Connectors
      • Basic
      • Authority
      • Instapool
      • MakerDAO
      • Compound
      • Comp
      • Aave
      • dYdX
      • 1Inch
      • Uniswap
      • OasisDEX
      • Kyber
      • Curve sBTC
      • Curve sUSD
      • Curve yUSD
    • Resolvers
      • Accounts
      • Balances
      • Instapool
      • MakerDAO
      • Compound
      • Aave
      • dYdX
      • 1inch
      • Uniswap
      • OasisDex
      • Kyber
      • Curve sBTC
      • Curve sUSD
      • Curve yUSD
    • getId/setId
    • Example Use Cases
      • Long ETH
      • Short DAI
      • Debt Swap
      • Lending Bridge
      • Lending Swap
      • Debt Bridge
  • 👩‍🏫 Tutorials
    • Getting Started
    • Moving Assets into DSA
    • In-App Swaps
  • Additional Info
    • Contract Infomation
    • FAQs
    • Security Audits
    • Release History
  • 🌏Links
    • Homepage
    • DApp
    • Discord
    • Contact Us
Powered by GitBook
On this page
  • Deposit
  • Withdraw
  • Borrow
  • Payback
  1. 👩‍💻 DSA SDK
  2. Connectors

Aave

Interact with the AAVE protocol

These connections are used to interact with AAVE protocol to facilitate transactions like deposit, borrow, withdraw, payback, and more.

Deposit

This connector deposits assets into the AAVE protocol

spells.add({
  connector: "aave",
  method: "deposit",
  args: [token, amount, getId, setId]
});

Parameter

Type

Description

token

address

The token address to deposit.

amount

number

The amount of tokens to deposit. use -1 or `dsa.maxValue` to deposit 100%.

getId

number

ID fetches the amount of token to deposit.

setId

number

ID stores the amount of token deposited.

Withdraw

This connector withdraw assets from the AAVE protocol

spells.add({
  connector: "aave",
  method: "withdraw",
  args: [token, amount, getId, setId]
});

Parameter

Type

Description

token

address

The token address to withdraw. use -1 or `dsa.maxValue` to withdraw 100%.

amount

number

The amount of tokens to withdraw.

getId

number

ID fetches the amount of token to withdraw.

setId

number

ID stores the amount of token withdrawn.

Borrow

This borrow tokens against your credit limit from the AAVE protocol.

spells.add({
  connector: "aave",
  method: "borrow",
  args: [token, amount, getId, setId]
});

Parameter

Type

Description

token

address

The token address to borrow.

amount

number

The amount of tokens to borrow.

getId

number

ID fetches the amount of token to borrow.

setId

number

ID stores the amount of token borrowed.

Payback

This connector pays back borrowed assets to the AAVE protocol.

spells.add({
  connector: "aave",
  method: "payback",
  args: [token, amount, getId, setId]
});

Parameter

Type

Description

token

address

The token address to payback.

amount

number

The amount of tokens to payback. use -1 or `dsa.maxValue` to payback 100%.

getId

number

ID fetches the amount of token to payback.

setId

number

ID stores the amount of token paid back.

PreviousCompNextdYdX

Last updated 4 years ago