[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
  • Sell
  • Deposit
  • Withdraw
  1. 👩‍💻 DSA SDK
  2. Connectors

Curve yUSD

Sell

Sell Stable ERC20 Token

spells.add({
  connector: "curve-y",
  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

spells.add({
  connector: "curve-y",
  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

spells.add({
  connector: "curve-y",
  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.

PreviousCurve sUSDNextResolvers

Last updated 4 years ago