@drift-labs/sdk 2.93.0-beta.0 → 2.93.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 CHANGED
@@ -1 +1 @@
1
- 2.93.0-beta.0
1
+ 2.93.0-beta.2
@@ -707,6 +707,16 @@ exports.MainnetPerpMarkets = [
707
707
  oracleSource: __1.OracleSource.PYTH_1K_PULL,
708
708
  pythFeedId: '0x5169491cd7e2a44c98353b779d5eb612e4ac32e073f5cc534303d86307c2f1bc',
709
709
  },
710
+ {
711
+ fullName: 'TRUMP-WIN-2024-BET',
712
+ category: ['Prediction', 'Election'],
713
+ symbol: 'TRUMP-WIN-2024-BET',
714
+ baseAssetSymbol: 'TRUMP-WIN-2024',
715
+ marketIndex: 36,
716
+ oracle: new web3_js_1.PublicKey('7YrQUxmxGdbk8pvns9KcL5ojbZSL2eHj62hxRqggtEUR'),
717
+ launchTs: 1723996800000,
718
+ oracleSource: __1.OracleSource.Prelaunch,
719
+ },
710
720
  ];
711
721
  exports.PerpMarkets = {
712
722
  devnet: exports.DevnetPerpMarkets,
@@ -87,7 +87,7 @@ exports.MainnetSpotMarkets = [
87
87
  {
88
88
  symbol: 'wBTC',
89
89
  marketIndex: 3,
90
- oracle: new web3_js_1.PublicKey('486kr3pmFPfTsS4aZgcsQ7kS4i9rjMsYYZup6HQNSTT4'),
90
+ oracle: new web3_js_1.PublicKey('9Tq8iN5WnMX2PcZGj4iSFEAgHCi8cM6x8LsDUbuzq8uw'),
91
91
  oracleSource: __1.OracleSource.PYTH_PULL,
92
92
  mint: new web3_js_1.PublicKey('3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh'),
93
93
  precision: new __1.BN(10).pow(numericConstants_1.EIGHT),
package/lib/math/amm.js CHANGED
@@ -449,7 +449,7 @@ function getQuoteAssetReservePredictionMarketBounds(amm, direction) {
449
449
  .mul(pegSqrt)
450
450
  .div(amm.pegMultiplier);
451
451
  if (direction === types_1.PositionDirection.LONG) {
452
- quoteAssetReserveLowerBound = this.amm.sqrtK
452
+ quoteAssetReserveLowerBound = amm.sqrtK
453
453
  .muln(22361)
454
454
  .mul(pegSqrt)
455
455
  .divn(100000)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.93.0-beta.0",
3
+ "version": "2.93.0-beta.2",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -780,6 +780,16 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
780
780
  pythFeedId:
781
781
  '0x5169491cd7e2a44c98353b779d5eb612e4ac32e073f5cc534303d86307c2f1bc',
782
782
  },
783
+ {
784
+ fullName: 'TRUMP-WIN-2024-BET',
785
+ category: ['Prediction', 'Election'],
786
+ symbol: 'TRUMP-WIN-2024-BET',
787
+ baseAssetSymbol: 'TRUMP-WIN-2024',
788
+ marketIndex: 36,
789
+ oracle: new PublicKey('7YrQUxmxGdbk8pvns9KcL5ojbZSL2eHj62hxRqggtEUR'),
790
+ launchTs: 1723996800000,
791
+ oracleSource: OracleSource.Prelaunch,
792
+ },
783
793
  ];
784
794
 
785
795
  export const PerpMarkets: { [key in DriftEnv]: PerpMarketConfig[] } = {
@@ -123,7 +123,7 @@ export const MainnetSpotMarkets: SpotMarketConfig[] = [
123
123
  {
124
124
  symbol: 'wBTC',
125
125
  marketIndex: 3,
126
- oracle: new PublicKey('486kr3pmFPfTsS4aZgcsQ7kS4i9rjMsYYZup6HQNSTT4'),
126
+ oracle: new PublicKey('9Tq8iN5WnMX2PcZGj4iSFEAgHCi8cM6x8LsDUbuzq8uw'),
127
127
  oracleSource: OracleSource.PYTH_PULL,
128
128
  mint: new PublicKey('3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh'),
129
129
  precision: new BN(10).pow(EIGHT),
package/src/math/amm.ts CHANGED
@@ -866,7 +866,7 @@ export function getQuoteAssetReservePredictionMarketBounds(
866
866
  .div(amm.pegMultiplier);
867
867
 
868
868
  if (direction === PositionDirection.LONG) {
869
- quoteAssetReserveLowerBound = this.amm.sqrtK
869
+ quoteAssetReserveLowerBound = amm.sqrtK
870
870
  .muln(22361)
871
871
  .mul(pegSqrt)
872
872
  .divn(100000)