Curve yUSD

Curve Resolver fetch position of user, Buy, Deposit and Withdraw details. You can view details like source code, ABIs on Etherscan.

Get Position

Fetch the Curve position details of an address

dsa.curve_y.getPosition(address);

Returns: Object with all the Position details.Copy

{
  "curveBalance": 0,
  "totalSupply": 0,
  "virtualPrice": "1.0088886123601257",
  "userShare": 0,
  "daiPoolBalance": 0,
  "usdcPoolBalance": 0,
  "usdtPoolBalance": 0,
  "tusdPoolBalance": 0,
  "stakedCurveBalance": 0,
  "rewardsEarned:" 0,
  "yfiTokenBalance": 0

}

Get Buy Amount

Fetch amount of tokens to buy of a user with just a single call.Copy

dsa.curve_y.getBuyAmount(buyToken, sellToken, sellAmt, slippage)

Returns: Object of buy token details

{
  buyAmt: "2208.0499999999997",
  buyAmtRaw: "2208050000000000000000",
  unitAmt: "216388900000000000000",
  virtualPrice: "1.0088886123601257"
}

Get Deposit Amount

Fetch amount of tokens to deposit of a user with just a single call

dsa.curve_y.getDepositAmount(token, amount, slippage)

Returns: Object of buy token details.Copy

{
  curveAmt: "2208.0499999999997",
  curveAmtRaw: "2208050000000000000000",
  unitAmt: "216388900000000000000",
  virtualPrice: "1.0088886123601257"
}

Get Withdraw Amount

Fetch amount of Curve token to redeem of a user with just a single call.Copy

dsa.curve_y.getWithdrawAmount(token, amount, slippage)

Returns: Object of withdraw token details.Copy

{
  curveAmt: "2208.0499999999997",
  curveAmtRaw: "2208050000000000000000",
  unitAmt: "216388900000000000000",
  virtualPrice: "1.0088886123601257"
}

Get Withdraw Raw Amount

Returns token amount and unit amount with just a single call.Copy

dsa.curve_y.getWithdrawTokenAmount(token, amt, slippage)

Returns: Object of withdraw token details.Copy

{
  amt: "2208.0499999999997",
  amtRaw: "2208050000000000000000",
  unitAmt: "216388900000000000000",
  virtualPrice: "1.0088886123601257"
}

Last updated