Swapping and On-chain Liquidity from sUSD Pool
Curve connector triggers methods like buy, sell and withdraw. You can view details like source code, ABIs on Etherscan.
dsa.maxValue
for the maximum amount in functions.getId
and setId
, pass 0.Sell Stable ERC20 Token.
spells.add({
connector: "curve-susd",
method: "sell",
args: [buyAddr, sellAddr, sellAmt, unitAmt, getId, setId]
});
Parameter | Type | Description |
---|---|---|
buyAddr | address | The address of the token to buy. |
sellAddr | address | The address of the token to sell. |
sellAmt | number | The amount of token to sell. |
unitAmt | number | The amount of buyAmt/sellAmt with slippage. |
getId | number | ID stores the amount of token deposited. |
setId | number | ID stores the amount of token deposited. |
Deposit Token into the Curve Pool.
spells.add({
connector: "curve-susd",
method: "deposit",
args: [token, amt, unitAmt, getId, setId]
});
Parameter | Type | Description |
---|---|---|
token | address | The token address to deposit. |
amt | number | The amount of tokens to deposit. use -1 or `dsa.maxValue` to deposit 100%. |
unitAmt | number | The amount of curve_amt/token_amt with slippage. |
getId | number | ID fetches the amount of token to deposit. |
setId | number | ID stores the amount of token deposited. |
Withdraw Token from the Curve Pool.
spells.add({
connector: "curve-susd",
method: "withdraw",
args: [token, amt, unitAmt, getId, setId]
});
Parameter | Type | Description |
---|---|---|
token | address | The token address to deposit. |
amt | number | The amount of tokens to deposit. use -1 or `dsa.maxValue` to withdraw 100%. |
unitAmt | number | The amount of curve_amt/token_amt with slippage. |
getId | number | ID fetches the amount of token to deposit. |
setId | number | ID stores the amount of token deposited. |
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.