@reserve-protocol/dtf-rebalance-lib 2.2.3 → 2.2.4

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.
@@ -422,7 +422,10 @@ const getOpenAuction = (rebalance, _supply, _initialSupply, _initialAssets = [],
422
422
  const auctionSize = surplusSize > deficitSize ? deficitSize : surplusSize;
423
423
  // update targeting estimates
424
424
  // {1} = {1} + {USD} * {share} / {USD/share}
425
- target = progression.add(new utils_1.Decimal(auctionSize).div(shareValue.mul(supply)));
425
+ const adjustedTarget = progression.add(new utils_1.Decimal(auctionSize).div(shareValue.mul(supply)));
426
+ if (adjustedTarget.lt(numbers_1.ONE)) {
427
+ target = adjustedTarget;
428
+ }
426
429
  const relativeTarget = target.sub(initialProgression).div(numbers_1.ONE.sub(initialProgression));
427
430
  return [
428
431
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reserve-protocol/dtf-rebalance-lib",
3
- "version": "2.2.3",
3
+ "version": "2.2.4",
4
4
  "description": "Rebalancing library for DTFs in typescript",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",