Lending & Borrowing
dYdX connector triggers methods like deposit, borrow, withdraw, payback, and more. You can view details like source code, ABIs on Etherscan.
0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
to indicate ETH.dsa.maxValue
for the maximum amount in function.getId
and setId
, pass 0.Lend / Collateralize tokens.
spells.add({
connector: "dydx",
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 tokens.
spells.add({
connector: "dydx",
method: "withdraw",
args: [token, amount, getId, setId]
});
Parameter | Type | Description |
---|---|---|
token | address | The token address to withdraw. |
amount | number | The amount of tokens to withdraw. use -1 or `dsa.maxValue` to withdraw 100%. |
getId | number | ID fetches the amount of token to withdraw. |
setId | number | ID stores the amount of token withdrawn. |
Borrow tokens.
spells.add({
connector: "dydx",
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 debt.
spells.add({
connector: "dydx",
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. |
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.
Best way to stay connected with our progress.