# Curve sUSD

## Sell

Sell Stable ERC20 Token.Copy

```
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

Deposit Token into the Curve Pool.Copy

```
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

Withdraw Token from the Curve Pool.Copy

```
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.                                      |
