Updated susd and y pool resolver

This commit is contained in:
Thrilok Kumar 2020-07-19 22:54:24 +05:30
parent c5374d83b9
commit 7876a9cb64
2 changed files with 3 additions and 3 deletions

View File

@ -242,5 +242,5 @@ contract Resolver is CurveHelpers {
contract InstaCurveResolver is Resolver {
string public constant name = "Curve-SUSD-Resolver-v1.2";
string public constant name = "Curve-SUSD-Resolver-v1.3";
}

View File

@ -199,7 +199,7 @@ contract Resolver is CurveHelpers {
ICurve curve = ICurve(getCurveSwapAddr());
curveAmt = curve.calc_token_amount(amts, true);
virtualPrice = curve.get_virtual_price();
unitAmt = getDepositUnitAmt(token, yAmt, curveAmt, slippage);
unitAmt = getDepositUnitAmt(token, depositAmt, curveAmt, slippage);
}
function getWithdrawAmount(address token, uint withdrawAmt, uint slippage)
@ -214,7 +214,7 @@ contract Resolver is CurveHelpers {
ICurve curve = ICurve(getCurveSwapAddr());
curveAmt = curve.calc_token_amount(amts, false);
virtualPrice = curve.get_virtual_price();
unitAmt = getWithdrawtUnitAmt(token, yAmt, curveAmt, slippage);
unitAmt = getWithdrawtUnitAmt(token, withdrawAmt, curveAmt, slippage);
}
function getWithdrawTokenAmount(address token, uint curveAmt, uint slippage)