@meteora-ag/dlmm 1.7.0 → 1.7.1-rc.1
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/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12300,9 +12300,9 @@ function findBaseDeltaY(amountY, minDeltaId, maxDeltaId) {
|
|
|
12300
12300
|
if (minDeltaId.eq(maxDeltaId)) {
|
|
12301
12301
|
return amountY;
|
|
12302
12302
|
}
|
|
12303
|
-
const m1 = minDeltaId.neg()
|
|
12303
|
+
const m1 = minDeltaId.neg();
|
|
12304
12304
|
const m2 = maxDeltaId.neg();
|
|
12305
|
-
const b = m2.neg().mul(m1.sub(m2).addn(1));
|
|
12305
|
+
const b = m2.neg().addn(1).mul(m1.sub(m2).addn(1));
|
|
12306
12306
|
const c = m1.mul(m1.addn(1)).divn(2);
|
|
12307
12307
|
const d = m2.mul(m2.subn(1)).divn(2);
|
|
12308
12308
|
const a = b.add(c.sub(d));
|
|
@@ -12316,7 +12316,7 @@ function findY0AndDeltaY(amountY, minDeltaId, maxDeltaId, activeId) {
|
|
|
12316
12316
|
};
|
|
12317
12317
|
}
|
|
12318
12318
|
let baseDeltaY = findBaseDeltaY(amountY, minDeltaId, maxDeltaId);
|
|
12319
|
-
const y0 = baseDeltaY.neg().mul(maxDeltaId).
|
|
12319
|
+
const y0 = baseDeltaY.neg().mul(maxDeltaId.neg().subn(1));
|
|
12320
12320
|
while (true) {
|
|
12321
12321
|
const amountInBins = getAmountInBinsBidSide(
|
|
12322
12322
|
activeId,
|