@reserve-protocol/dtf-rebalance-lib 0.2.16 → 0.2.17
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.d.ts +3 -3
- package/dist/open-auction.js +5 -6
- package/package.json +1 -1
package/dist/open-auction.d.ts
CHANGED
@@ -51,13 +51,13 @@ export declare const getTargetBasket: (_initialWeights: WeightRange[], _prices:
|
|
51
51
|
*
|
52
52
|
* Non-AUCTION_LAUNCHERs should use `folio.openAuctionUnrestricted()`
|
53
53
|
*
|
54
|
-
* @param rebalance The result of calling folio.getRebalance()
|
54
|
+
* @param rebalance The result of calling folio.getRebalance(), today
|
55
55
|
* @param _supply {share} The totalSupply() of the basket, today
|
56
56
|
* @param _initialFolio D18{tok/share} Initial balances per share, e.g result of folio.toAssets(1e18, 0) at time rebalance was first proposed
|
57
57
|
* @param _targetBasket D18{1} Result of calling `getTargetBasket()`
|
58
|
-
* @param _folio D18{tok/share} Current ratio of token per share, e.g result of folio.toAssets(1e18, 0)
|
58
|
+
* @param _folio D18{tok/share} Current ratio of token per share, e.g result of folio.toAssets(1e18, 0), today
|
59
59
|
* @param _decimals Decimals of each token
|
60
|
-
* @param _prices {USD/wholeTok} USD prices for each *whole* token
|
60
|
+
* @param _prices {USD/wholeTok} USD prices for each *whole* token, today
|
61
61
|
* @param _priceError {1} Price error to use for each token during auction pricing; should be smaller than price error during startRebalance
|
62
62
|
* @param _finalStageAt {1} The % rebalanced from the initial Folio to determine when is the final stage of the rebalance
|
63
63
|
*/
|
package/dist/open-auction.js
CHANGED
@@ -46,13 +46,13 @@ exports.getTargetBasket = getTargetBasket;
|
|
46
46
|
*
|
47
47
|
* Non-AUCTION_LAUNCHERs should use `folio.openAuctionUnrestricted()`
|
48
48
|
*
|
49
|
-
* @param rebalance The result of calling folio.getRebalance()
|
49
|
+
* @param rebalance The result of calling folio.getRebalance(), today
|
50
50
|
* @param _supply {share} The totalSupply() of the basket, today
|
51
51
|
* @param _initialFolio D18{tok/share} Initial balances per share, e.g result of folio.toAssets(1e18, 0) at time rebalance was first proposed
|
52
52
|
* @param _targetBasket D18{1} Result of calling `getTargetBasket()`
|
53
|
-
* @param _folio D18{tok/share} Current ratio of token per share, e.g result of folio.toAssets(1e18, 0)
|
53
|
+
* @param _folio D18{tok/share} Current ratio of token per share, e.g result of folio.toAssets(1e18, 0), today
|
54
54
|
* @param _decimals Decimals of each token
|
55
|
-
* @param _prices {USD/wholeTok} USD prices for each *whole* token
|
55
|
+
* @param _prices {USD/wholeTok} USD prices for each *whole* token, today
|
56
56
|
* @param _priceError {1} Price error to use for each token during auction pricing; should be smaller than price error during startRebalance
|
57
57
|
* @param _finalStageAt {1} The % rebalanced from the initial Folio to determine when is the final stage of the rebalance
|
58
58
|
*/
|
@@ -168,8 +168,7 @@ const getOpenAuction = (rebalance, _supply, _initialFolio = [], _targetBasket =
|
|
168
168
|
// {1} = {USD/wholeShare} / {USD/wholeShare}
|
169
169
|
const initialProgression = initialFolio
|
170
170
|
.map((initialBalance, i) => {
|
171
|
-
|
172
|
-
if (!rebalance.inRebalance[i] && rebalance.weights[i].spot > 0n) {
|
171
|
+
if (!rebalance.inRebalance[i]) {
|
173
172
|
return numbers_1.ZERO;
|
174
173
|
}
|
175
174
|
// {wholeTok/wholeShare}
|
@@ -183,7 +182,7 @@ const getOpenAuction = (rebalance, _supply, _initialFolio = [], _targetBasket =
|
|
183
182
|
if (debug) {
|
184
183
|
console.log("progression < initialProgression", progression.toString(), initialProgression.toString());
|
185
184
|
}
|
186
|
-
progression = initialProgression; // don't go backwards
|
185
|
+
progression = initialProgression; // don't go backwards, should only happen due to negligible rounding errors
|
187
186
|
}
|
188
187
|
// {1} = {1} / {1}
|
189
188
|
let relativeProgression = initialProgression.eq(numbers_1.ONE)
|