@gearbox-protocol/sdk 3.0.0-next.91 → 3.0.0-next.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/core/strategy.js +1 -5
- package/package.json +1 -1
package/lib/core/strategy.js
CHANGED
|
@@ -45,11 +45,7 @@ class Strategy {
|
|
|
45
45
|
const lpPrice = prices[targetTokenLC] || sdk_gov_1.PRICE_DECIMALS;
|
|
46
46
|
const lpMoney = price_1.PriceUtils.calcTotalPrice(lpPrice, targetBalance, targetDecimals);
|
|
47
47
|
const lpLTMoney = (lpMoney * lpLT) / sdk_gov_1.PERCENTAGE_FACTOR;
|
|
48
|
-
|
|
49
|
-
const lqPrice = (borrowedMoney * sdk_gov_1.WAD) / lpLTMoney;
|
|
50
|
-
return lqPrice >= 0 ? lqPrice : 0n;
|
|
51
|
-
}
|
|
52
|
-
return 0n;
|
|
48
|
+
return lpLTMoney > 0n ? (borrowedMoney * sdk_gov_1.WAD) / lpLTMoney : 0n;
|
|
53
49
|
}
|
|
54
50
|
static maxLeverageThreshold(lpToken, cms) {
|
|
55
51
|
const lpTokenLC = lpToken.toLowerCase();
|