@reserve-protocol/dtf-rebalance-lib 2.3.2 → 2.3.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.
@@ -218,18 +218,6 @@ const getOpenAuction = (rebalance, _supply, _initialSupply, _initialAssets = [],
218
218
  // EJECT -- used later to adjust weights.high and limits.high
219
219
  if (portionBeingEjected.gt(1e-5)) {
220
220
  round = AuctionRound.EJECT;
221
- // if the ejections are mostly what's left, target JUST the ejection if that puts us at <100%
222
- let ejectionTarget = progression.add(portionBeingEjected.mul(1.1)); // buy up to 10% extra
223
- if (ejectionTarget.gt(target) && ejectionTarget.lt(numbers_1.ONE)) {
224
- target = ejectionTarget;
225
- }
226
- if (debug) {
227
- console.log(" EJECT round detected:");
228
- console.log(" portionBeingEjected:", portionBeingEjected.toString());
229
- console.log(" progression:", progression.toString());
230
- console.log(" ejectionTarget:", ejectionTarget.toString());
231
- console.log(" target:", target.toString());
232
- }
233
221
  }
234
222
  if (target.lte(numbers_1.ZERO) || target.lt(initialProgression) || target.gt(numbers_1.ONE)) {
235
223
  throw new Error("something has gone very wrong");
@@ -404,13 +392,6 @@ const getOpenAuction = (rebalance, _supply, _initialSupply, _initialAssets = [],
404
392
  if (tokenSurplusValue.gte(numbers_1.ONE)) {
405
393
  surplusTokens.push(token);
406
394
  surplusTokenSizes.push(tokenSurplusValue.toNumber());
407
- if (debug && newWeights[i].spot === 0n) {
408
- console.log(` EJECTING ${token}:`);
409
- console.log(` assets[${i}]: ${_assets[i].toString()}`);
410
- console.log(` sellDownTo: ${sellDownTo.toString()}`);
411
- console.log(` surplusAmount: ${surplusAmount.toString()}`);
412
- console.log(` surplusValue: ${tokenSurplusValue.toString()}`);
413
- }
414
395
  }
415
396
  }
416
397
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reserve-protocol/dtf-rebalance-lib",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "description": "Rebalancing library for DTFs in typescript",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",