From 11feb573cbe2999159a9f99254bb1ea1faedb59f Mon Sep 17 00:00:00 2001 From: wphan Date: Fri, 20 Dec 2024 16:50:03 -0800 Subject: [PATCH] mainnet (#327) * Bumping sdk and jit dependencies to 2.104.0-beta.31 and 0.12.18 * Bumping sdk and jit dependencies to 2.104.0-beta.32 and 0.12.19 * Nour/pyth lazer cranker (#321) * add pyth lazer cranker * rm unncessary libraries * remove unnecessary code * add entrypoint for the cranker * added improvements * increase the chunk size * Bumping sdk and jit dependencies to 2.104.0-beta.33 and 0.12.20 * Bumping sdk and jit dependencies to 2.104.0-beta.34 and 0.12.21 * liquidator: use SOL routes when swapping LSTs (#322) * Bumping sdk and jit dependencies to 2.104.0-beta.35 and 0.12.22 * fillers: fix multimaker retry logic (#325) * fillers: fix multimaker retry logic * add missing tip ix * extend auction duration for filler examples * Bumping sdk and jit dependencies to 2.104.0-beta.36 and 0.12.23 * Bumping sdk and jit dependencies to 2.104.0-beta.37 and 0.12.24 * dont throw on timeout * ignore settled markets (#326) --------- Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: moosecat --- package.json | 4 ++-- src/bots/liquidator.ts | 5 +++++ src/experimental-bots/entrypoint.ts | 2 ++ src/experimental-bots/swift/takerExample.ts | 2 +- src/index.ts | 2 ++ yarn.lock | 18 +++++++++--------- 6 files changed, 21 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 37148eb5..18d15bc8 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "main": "lib/index.js", "license": "Apache-2.0", "dependencies": { - "@drift-labs/jit-proxy": "0.12.22", - "@drift-labs/sdk": "2.104.0-beta.35", + "@drift-labs/jit-proxy": "0.12.24", + "@drift-labs/sdk": "2.104.0-beta.37", "@opentelemetry/api": "1.7.0", "@opentelemetry/auto-instrumentations-node": "0.31.2", "@opentelemetry/exporter-prometheus": "0.31.0", diff --git a/src/bots/liquidator.ts b/src/bots/liquidator.ts index 14c38f1c..084c296c 100644 --- a/src/bots/liquidator.ts +++ b/src/bots/liquidator.ts @@ -2390,6 +2390,11 @@ export class LiquidatorBot implements Bot { subAccountToLiqPerp: number, baseAmountToLiquidate: BN ): Promise { + // TODO: remove this once the markets are settled properly + if ([37, 49].includes(perpMarketIndex)) { + return false; + } + let txSent = false; const ix = await this.driftClient.getLiquidatePerpIx( user.userAccountPublicKey, diff --git a/src/experimental-bots/entrypoint.ts b/src/experimental-bots/entrypoint.ts index 82592587..511ef750 100644 --- a/src/experimental-bots/entrypoint.ts +++ b/src/experimental-bots/entrypoint.ts @@ -182,6 +182,7 @@ const runBot = async () => { confirmationStrategy: ConfirmationStrategy.Polling, additionalConnections, trackTxLandRate: config.global.trackTxLandRate, + throwOnTimeoutError: false, }); } else if (txSenderType === 'while-valid') { txSender = new WhileValidTxSender({ @@ -207,6 +208,7 @@ const runBot = async () => { additionalConnections, trackTxLandRate: config.global.trackTxLandRate, confirmationStrategy, + throwOnTimeoutError: false, }); } diff --git a/src/experimental-bots/swift/takerExample.ts b/src/experimental-bots/swift/takerExample.ts index c1b152ee..1c4132d2 100644 --- a/src/experimental-bots/swift/takerExample.ts +++ b/src/experimental-bots/swift/takerExample.ts @@ -63,7 +63,7 @@ export class SwiftTaker { ? lowPrice : highPrice, auctionEndPrice: isVariant(direction, 'long') ? highPrice : lowPrice, - auctionDuration: 30, + auctionDuration: 200, }), subAccountId: 0, slot: new BN(slot), diff --git a/src/index.ts b/src/index.ts index 7fff67b7..ccd053eb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -343,6 +343,7 @@ const runBot = async () => { confirmationStrategy, additionalConnections, trackTxLandRate: config.global.trackTxLandRate, + throwOnTimeoutError: false, }); } else if (txSenderType === 'while-valid') { txSender = new WhileValidTxSender({ @@ -369,6 +370,7 @@ const runBot = async () => { skipConfirmation, additionalConnections, trackTxLandRate: config.global.trackTxLandRate, + throwOnTimeoutError: false, }); } diff --git a/yarn.lock b/yarn.lock index 1d5f97c0..63a13045 100644 --- a/yarn.lock +++ b/yarn.lock @@ -168,19 +168,19 @@ enabled "2.0.x" kuler "^2.0.0" -"@drift-labs/jit-proxy@0.12.22": - version "0.12.22" - resolved "https://registry.yarnpkg.com/@drift-labs/jit-proxy/-/jit-proxy-0.12.22.tgz#76682541b6af0642153c16309f63badd53228982" - integrity sha512-y0qcfBN0ENde7OsaRCNSOtCGY7A6JYOuBY/C/s3zyJcjNzibhPR8GtrvU27zViu1vrusV3BUHRZnItGf88Jndw== +"@drift-labs/jit-proxy@0.12.24": + version "0.12.24" + resolved "https://registry.yarnpkg.com/@drift-labs/jit-proxy/-/jit-proxy-0.12.24.tgz#9baa0017c8d28d50875419929416fbf7a8fe5a55" + integrity sha512-16eE2zipSR5HvWVHyK5kh5yzmqt3E/5af0d98stgE9XMjOY7xewrScjb5PLP5v2k0ktt7Gbaz43atoCbGe4RZw== dependencies: "@coral-xyz/anchor" "0.26.0" - "@drift-labs/sdk" "2.104.0-beta.35" + "@drift-labs/sdk" "2.104.0-beta.37" "@solana/web3.js" "1.91.7" -"@drift-labs/sdk@2.104.0-beta.35": - version "2.104.0-beta.35" - resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.104.0-beta.35.tgz#4dacbea1fa58ec86731859064cb88ac1e953ee8c" - integrity sha512-2KpU9fKtjTFjMPIKnL1CRbSggePl3sVxN2eY5m3yd8v3oc1v1SCW31bCj8M6ESur1kf9E6N0mABuFE3uzsv6KA== +"@drift-labs/sdk@2.104.0-beta.37": + version "2.104.0-beta.37" + resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.104.0-beta.37.tgz#c62cfcc6d5048019acebec03ee2518ad24ea5ec4" + integrity sha512-D/RIfK1RiudrNpE/ITiuB7aGanhOdJCElan+n99nNzoFNZIyN1/ImhjotuF9QmZRx4hGVKV2f4LvCnUq6pvJ6w== dependencies: "@coral-xyz/anchor" "0.29.0" "@coral-xyz/anchor-30" "npm:@coral-xyz/anchor@0.30.1"