@triadxyz/triad-protocol 2.3.2-beta → 2.3.3-beta
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/trade.js +5 -1
- package/package.json +1 -1
package/dist/trade.js
CHANGED
|
@@ -742,7 +742,11 @@ class Trade {
|
|
|
742
742
|
let adjustedPrice = orderPrice;
|
|
743
743
|
if (feeBps > 0) {
|
|
744
744
|
const priceSpread = new bn_js_1.default(1000000).sub(orderPrice);
|
|
745
|
-
const fee = priceSpread
|
|
745
|
+
const fee = priceSpread
|
|
746
|
+
.mul(new bn_js_1.default(feeBps))
|
|
747
|
+
.div(new bn_js_1.default(10000))
|
|
748
|
+
.mul(orderPrice)
|
|
749
|
+
.div(new bn_js_1.default(1000000));
|
|
746
750
|
adjustedPrice = orderPrice.add(fee);
|
|
747
751
|
}
|
|
748
752
|
const maxSharesForPrice = remainingUSDC
|