Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mainnet #327

Merged
merged 15 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions src/bots/liquidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2390,6 +2390,11 @@ export class LiquidatorBot implements Bot {
subAccountToLiqPerp: number,
baseAmountToLiquidate: BN
): Promise<boolean> {
// 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,
Expand Down
2 changes: 2 additions & 0 deletions src/experimental-bots/entrypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -207,6 +208,7 @@ const runBot = async () => {
additionalConnections,
trackTxLandRate: config.global.trackTxLandRate,
confirmationStrategy,
throwOnTimeoutError: false,
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/experimental-bots/swift/takerExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ const runBot = async () => {
confirmationStrategy,
additionalConnections,
trackTxLandRate: config.global.trackTxLandRate,
throwOnTimeoutError: false,
});
} else if (txSenderType === 'while-valid') {
txSender = new WhileValidTxSender({
Expand All @@ -369,6 +370,7 @@ const runBot = async () => {
skipConfirmation,
additionalConnections,
trackTxLandRate: config.global.trackTxLandRate,
throwOnTimeoutError: false,
});
}

Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down