@reserve-protocol/dtf-rebalance-lib 0.2.14 → 0.2.15

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.
@@ -86,7 +86,8 @@ const getStartRebalance = (_supply, tokens, _folio, decimals, _targetBasket, _pr
86
86
  const priceMultiplier = numbers_1.D27d.div(new utils_1.Decimal(`1e${decimals[i]}`));
87
87
  // {USD/wholeTok} = {USD/wholeTok} * {1}
88
88
  const lowPrice = prices[i].mul(numbers_1.ONE.sub(priceError[i]));
89
- const highPrice = prices[i].mul(numbers_1.ONE.add(priceError[i]));
89
+ // {USD/wholeTok} = {USD/wholeTok} / {1}
90
+ const highPrice = prices[i].div(numbers_1.ONE.sub(priceError[i]));
90
91
  // D27{USD/tok} = {USD/wholeTok} * D27{wholeTok/tok}
91
92
  newPrices.push({
92
93
  low: (0, numbers_1.bn)(lowPrice.mul(priceMultiplier)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reserve-protocol/dtf-rebalance-lib",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "description": "Rebalancing library for DTFs in typescript",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",