Aave V1 - Mainnet
Lending & Borrowing. AaveV1-v1.1 connector on mainnet triggers methods like deposit, withdraw, borrow, payback, enableCollateral. 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
andsetId
, pass 0.
Deposit
Deposit a token to Aave v1 for lending / collaterization.
spells.add({ connector: "AAVE-V1-A", method: "deposit", args: [token, amt, getId, setId]});
Parameter | Type | Description |
---|---|---|
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)`) |
getId | uint256 | ID to retrieve amt. |
setId | uint256 | ID stores the amount of tokens deposited. |
Withdraw
Withdraw deposited token from Aave v1
spells.add({ connector: "AAVE-V1-A", method: "withdraw", args: [token, amt, getId, setId]});
Parameter | Type | Description |
---|---|---|
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 using Aave v1
spells.add({ connector: "AAVE-V1-A", method: "borrow", args: [token, amt, getId, setId]});
Parameter | Type | Description |
---|---|---|
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 borrowed. |
Payback
Payback debt owed.
spells.add({ connector: "AAVE-V1-A", method: "payback", args: [token, amt, getId, setId]});
Parameter | Type | Description |
---|---|---|
token | address | The address of the token to payback.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) |
amt | uint256 | The amount of the token to payback. (For max: `uint256(-1)`) |
getId | uint256 | ID to retrieve amt. |
setId | uint256 | ID stores the amount of tokens paid back. |
EnableCollateral
Enable an array of tokens as collateral
spells.add({ connector: "AAVE-V1-A", method: "enableCollateral", args: [tokens]});
Parameter | Type | Description |
---|---|---|
tokens | address[] | Array of tokens to enable collateral |
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.
Table of Contents