Curve sUSD

Curve sUSD Resolver

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_susd.getPosition(address);
ParameterTypeDescription
addressaddress/stringThe owner address.

Returns: Object with all the Position details.

{
  "curveBalance": 0,
  "totalSupply": 0,
  "virtualPrice": "1.0088886123601257",
  "userShare": 0,
  "daiPoolBalance": 0,
  "usdcPoolBalance": 0,
  "usdtPoolBalance": 0,
  "susdPoolBalance": 0,
  "stakedCurveBalance": 0,
  "rewardsEarned:" 0,
  "snxTokenBalance": 0

}
Return ParameterTypeDescription
curveBalancenumberUser's curve token balance.
totalSupplynumberTotal supply of the curve token
virtualPricenumber/stringVirtual price of the curve token on sUSD pool.
userSharenumberThe users share in % eg - 1 = 1% share
daiPoolBalancenumberBalance of Dai in the pool.
usdcPoolBalancenumberBalance of USDC in the pool.
usdtPoolBalancenumberBalance of USDT in the pool.
susdPoolBalancenumberBalance of sUSD in the pool.
stakedCurveBalancenumberThe amount of curve tokens staked in synthetix staking pool.
rewardsEarnednumberSNX tokens earned from synthetix staking pool.
snxTokenBalancenumberSNX token balance.

Get Buy Amount

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

dsa.curve_susd.getBuyAmount(buyToken, sellToken, sellAmt, slippage)
ParameterTypeDescription
buyTokenstringThe buy token symbol.
sellTokenstringThe sell token symbol.
sellAmtnumberThe amount of tokens to sell. Amount to be written in normal form eg - 1.1 ETH, 100 DAI.
slippagenumberThe slippage in percent eg - 1 means 1%, 10 means 10%, etc.

Returns: Object of buy token details.

{
  buyAmt: "2208.0499999999997",
  buyAmtRaw: "2208050000000000000000",
  unitAmt: "216388900000000000000",
  virtualPrice: "1.0088886123601257"
}
Return ParameterTypeDescription
buyAmtnumber/stringExpected buy token amount.
buyAmtRawnumber/stringExpected buy token amount in decimal form.
unitAmtnumber/stringThe unit amount is the minimum amount of curve token amount expected per token amount. It is calculated with the help of slippage. The parameter is passed directly in the curve connector.
virtualPricenumber/stringVirtual price of the curve token on sUSD pool.

Get Deposit Amount

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

dsa.curve_susd.getDepositAmount(token, amount, slippage)
ParameterTypeDescription
tokenstringThe deposit token symbol.
amountnumberThe amount of tokens to deposit. This should be a decimal value.
slippagenumberThe slippage to deposit in percent eg - 1 means 1%, 10 means 10%, etc.

Returns: Object of buy token details.

{
  curveAmt: "2208.0499999999997",
  curveAmtRaw: "2208050000000000000000",
  unitAmt: "216388900000000000000",
  virtualPrice: "1.0088886123601257"
}
Return ParameterTypeDescription
curveAmtnumber/stringExpected deposit token amount.
curveAmtRawnumber/stringExpected deposit token amount in decimal form.
unitAmtnumber/stringThe unit amount is the minimum amount of curve token expected per token. It is calculated with the help of slippage. The parameter is passed directly in the curve connector.
virtualPricenumber/stringVirtual price of the curve token on sUSD pool.

Get Withdraw Amount

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

dsa.curve_susd.getWithdrawAmount(token, amount, slippage)
ParameterTypeDescription
tokenstringThe withdraw token symbol.
amountnumberThe amount of tokens to withdraw. This should be a decimal value.
slippagenumberThe slippage to withdraw in percent eg - 1 means 1%, 10 means 10%, etc.

Returns: Object of withdraw token details.

{
  curveAmt: "2208.0499999999997",
  curveAmtRaw: "2208050000000000000000",
  unitAmt: "216388900000000000000",
  virtualPrice: "1.0088886123601257"
}
Return ParameterTypeDescription
curveAmtnumber/stringExpected Curve token amount to redeem.
curveAmtRawnumber/stringExpected Curve token amount to redeem in decimal form.
unitAmtnumber/stringThe unit amount is the minimum amount of curve token expected per token. It is calculated with the help of slippage. The parameter is passed directly in the curve connector.
virtualPricenumber/stringVirtual price of the curve token on sUSD pool.

Get Withdraw Raw Amount

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

dsa.curve_susd.getWithdrawTokenAmount(token, amt, slippage)
ParameterTypeDescription
tokenstringThe withdraw token symbol.
amountnumberThe amount of Curve tokens to redeem. This should be a decimal value.
slippagenumberThe slippage to withdraw in percent eg - 1 means 1%, 10 means 10%, etc.

Returns: Object of withdraw token details.

{
  amt: "2208.0499999999997",
  amtRaw: "2208050000000000000000",
  unitAmt: "216388900000000000000",
  virtualPrice: "1.0088886123601257"
}
Return ParameterTypeDescription
amtnumber/stringExpected withdraw token amount.
amtRawnumber/stringExpected withdraw token amount in decimal form.
unitAmtnumber/stringThe unit amount is the minimum amount of curve token expected per token. It is calculated with the help of slippage. The parameter is passed directly in the curve connector.
virtualPricenumber/stringVirtual price of the curve token on sUSD pool.

If you still can't find something you're looking for or have any questions, ask them at our developers community on Telegram, 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.