@reserve-protocol/dtf-rebalance-lib 0.0.17 → 0.0.18
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/dist/open-auction.js +8 -8
- package/package.json +1 -1
- package/src/open-auction.ts +10 -8
package/dist/open-auction.js
CHANGED
@@ -223,10 +223,10 @@ const getOpenAuction = (rebalance, _supply, _initialFolio = [], _targetBasket =
|
|
223
223
|
high: (0, numbers_1.bn)(spotLimit.add(spotLimit.mul(delta)).mul(numbers_1.D18d)),
|
224
224
|
};
|
225
225
|
if (round == AuctionRound.EJECT && rebalanceTarget.eq(numbers_1.ONE)) {
|
226
|
-
//
|
227
|
-
newLimits.
|
228
|
-
|
229
|
-
newLimits.high
|
226
|
+
// aim 1% higher if executed permissonlessly
|
227
|
+
newLimits.spot += newLimits.spot * 1n / 100n;
|
228
|
+
// leave 10% room to increase low in the future if ejection leaves dust behind
|
229
|
+
newLimits.high += newLimits.high * 10n / 100n;
|
230
230
|
}
|
231
231
|
// low
|
232
232
|
if (newLimits.low < rebalance.limits.low) {
|
@@ -282,10 +282,10 @@ const getOpenAuction = (rebalance, _supply, _initialFolio = [], _targetBasket =
|
|
282
282
|
.div(numbers_1.D18d)),
|
283
283
|
};
|
284
284
|
if (round == AuctionRound.EJECT && rebalanceTarget.eq(numbers_1.ONE)) {
|
285
|
-
//
|
286
|
-
newWeightsD27.
|
287
|
-
|
288
|
-
newWeightsD27.high
|
285
|
+
// aim 1% higher if executed permissonlessly
|
286
|
+
newWeightsD27.spot += newWeightsD27.spot * 1n / 100n;
|
287
|
+
// leave 10% room to increase low in the future if ejection leaves dust behind
|
288
|
+
newWeightsD27.high += newWeightsD27.high * 10n / 100n;
|
289
289
|
}
|
290
290
|
if (newWeightsD27.low < weightRange.low) {
|
291
291
|
newWeightsD27.low = weightRange.low;
|
package/package.json
CHANGED
package/src/open-auction.ts
CHANGED
@@ -330,10 +330,11 @@ export const getOpenAuction = (
|
|
330
330
|
}
|
331
331
|
|
332
332
|
if (round == AuctionRound.EJECT && rebalanceTarget.eq(ONE)) {
|
333
|
-
//
|
334
|
-
newLimits.
|
335
|
-
|
336
|
-
|
333
|
+
// aim 1% higher if executed permissonlessly
|
334
|
+
newLimits.spot += newLimits.spot * 1n / 100n
|
335
|
+
|
336
|
+
// leave 10% room to increase low in the future if ejection leaves dust behind
|
337
|
+
newLimits.high += newLimits.high * 10n / 100n
|
337
338
|
}
|
338
339
|
|
339
340
|
// low
|
@@ -403,10 +404,11 @@ export const getOpenAuction = (
|
|
403
404
|
}
|
404
405
|
|
405
406
|
if (round == AuctionRound.EJECT && rebalanceTarget.eq(ONE)) {
|
406
|
-
//
|
407
|
-
newWeightsD27.
|
408
|
-
|
409
|
-
|
407
|
+
// aim 1% higher if executed permissonlessly
|
408
|
+
newWeightsD27.spot += newWeightsD27.spot * 1n / 100n
|
409
|
+
|
410
|
+
// leave 10% room to increase low in the future if ejection leaves dust behind
|
411
|
+
newWeightsD27.high += newWeightsD27.high * 10n / 100n
|
410
412
|
}
|
411
413
|
|
412
414
|
if (newWeightsD27.low < weightRange.low) {
|