@drift-labs/sdk 2.66.0-beta.1 → 2.66.0-beta.2
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/VERSION +1 -1
- package/package.json +1 -1
- package/tests/amm/test.ts +22 -3
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.66.0-beta.
|
|
1
|
+
2.66.0-beta.2
|
package/package.json
CHANGED
package/tests/amm/test.ts
CHANGED
|
@@ -615,11 +615,11 @@ describe('AMM Tests', () => {
|
|
|
615
615
|
assert(termsSuiExample.effectiveLeverageCapped <= 1.000001);
|
|
616
616
|
assert(termsSuiExample.inventorySpreadScale == 1.00007);
|
|
617
617
|
assert(
|
|
618
|
-
termsSuiExample.longSpread ==
|
|
618
|
+
termsSuiExample.longSpread == 269818,
|
|
619
619
|
`SUI long spread got ${termsSuiExample.longSpread}`
|
|
620
620
|
);
|
|
621
621
|
assert(
|
|
622
|
-
termsSuiExample.shortSpread ==
|
|
622
|
+
termsSuiExample.shortSpread == 3920,
|
|
623
623
|
`SUI short spread got ${termsSuiExample.shortSpread}`
|
|
624
624
|
);
|
|
625
625
|
|
|
@@ -680,7 +680,26 @@ describe('AMM Tests', () => {
|
|
|
680
680
|
);
|
|
681
681
|
|
|
682
682
|
console.log(termsSuiExampleMod2);
|
|
683
|
-
|
|
683
|
+
assert(
|
|
684
|
+
_.isEqual(
|
|
685
|
+
termsSuiExampleMod2.maxTargetSpread,
|
|
686
|
+
termsSuiExampleMod1.maxTargetSpread
|
|
687
|
+
)
|
|
688
|
+
);
|
|
689
|
+
assert(
|
|
690
|
+
_.isEqual(
|
|
691
|
+
termsSuiExampleMod2.shortSpreadwPS,
|
|
692
|
+
termsSuiExampleMod1.shortSpreadwPS
|
|
693
|
+
)
|
|
694
|
+
);
|
|
695
|
+
assert(
|
|
696
|
+
_.isEqual(
|
|
697
|
+
termsSuiExampleMod2.longSpreadwPS,
|
|
698
|
+
termsSuiExampleMod1.longSpreadwPS
|
|
699
|
+
)
|
|
700
|
+
);
|
|
701
|
+
|
|
702
|
+
// note: effectiveLeverage as currently implemented is sensitive to peg change
|
|
684
703
|
});
|
|
685
704
|
|
|
686
705
|
it('Spread Reserves (with offset)', () => {
|