@reserve-protocol/dtf-rebalance-lib 0.2.2 → 0.2.3
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 +1 -1
- package/package.json +1 -1
package/dist/open-auction.js
CHANGED
@@ -395,7 +395,7 @@ const getOpenAuction = (rebalance, _supply, _initialFolio = [], _targetBasket =
|
|
395
395
|
if (folio[i].lt(buyUpTo)) {
|
396
396
|
deficitTokens.push(token);
|
397
397
|
// {USD} += {wholeTok/wholeShare} * {USD/wholeTok} * {wholeShare}
|
398
|
-
deficitValue = deficitValue.add(folio[i]
|
398
|
+
deficitValue = deficitValue.add(buyUpTo.sub(folio[i]).mul(prices[i]).mul(supply));
|
399
399
|
}
|
400
400
|
else if (folio[i].gt(sellDownTo)) {
|
401
401
|
surplusTokens.push(token);
|