Skip to content

Commit

Permalink
liquidator: error logs, default slot auction
Browse files Browse the repository at this point in the history
  • Loading branch information
wphan committed Jan 5, 2024
1 parent d024dce commit c9e965b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/bots/liquidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import {
DLOB,
calculateEstimatedPerpEntryPrice,
deriveOracleAuctionParams,
getTriggerMarketOrderParams,
getOrderParams,
OrderType,
} from '@drift-labs/sdk';
Expand Down Expand Up @@ -338,6 +337,9 @@ export class LiquidatorBot implements Bot {
this.liquidatorConfig.maxSlippageBps =
this.liquidatorConfig.maxSlippagePct!;
}
if (this.liquidatorConfig.deriskAuctionDurationSlots === undefined) {
this.liquidatorConfig.deriskAuctionDurationSlots = 100;
}

this.liquidatorConfig.deriskAlgoPerp =
config.deriskAlgoPerp ?? config.deriskAlgo;
Expand Down Expand Up @@ -1040,9 +1042,8 @@ export class LiquidatorBot implements Bot {
);
})
.catch((e) => {
logger.error(e);
logger.error(
`Error trying to close perp position for market ${position.marketIndex}`
`Error trying to close perp position for market ${position.marketIndex}: ${e.message}\n${e.stack}`
);
webhookMessage(
`[${this.name}]: :x: error in placePerpOrder\n:${
Expand Down

0 comments on commit c9e965b

Please sign in to comment.