Skip to content

Commit

Permalink
reduce max makers in filler, add error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
wphan committed Dec 21, 2023
1 parent c3ded43 commit 79e5c1c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/bots/filler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const FILL_ORDER_BACKOFF = 2000; // the time to wait before trying to a node in
const THROTTLED_NODE_SIZE_TO_PRUNE = 10; // Size of throttled nodes to get to before pruning the map
const TRIGGER_ORDER_COOLDOWN_MS = 1000; // the time to wait before trying to a node in the triggering map again
const MAX_COMPUTE_UNIT_PRICE_MICRO_LAMPORTS = 10000; // cap the computeUnitPrice to pay per fill tx
const MAX_MAKERS_PER_FILL = 50; // max number of unique makers to include per fill
const MAX_MAKERS_PER_FILL = 20; // max number of unique makers to include per fill

const SETTLE_PNL_CHUNKS = 4;
const MAX_POSITIONS_PER_USER = 8;
Expand Down Expand Up @@ -1373,7 +1373,7 @@ export class FillerBot implements Bot {
);
})
.catch((e) => {
// console.error(e);
console.error(e);
logger.error(
`Failed to process fill tx logs (error above) (fillTxId: ${fillTxId}):`
);
Expand All @@ -1385,7 +1385,7 @@ export class FillerBot implements Bot {
});
})
.catch(async (e) => {
// console.error(e);
console.error(e);
logger.error(
`Failed to send packed tx (error above) (fillTxId: ${fillTxId}):`
);
Expand Down
2 changes: 2 additions & 0 deletions src/bots/liquidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ function findBestSpotPosition(
positionTakerOverPctDenominator
);

liquidatorUser.getSpotMarketAssetAndLiabilityValue();

if (isBorrow) {
if (spotMarket.maintenanceLiabilityWeight < currentLibWeight) {
bestAmount = tokenAmount;
Expand Down
2 changes: 1 addition & 1 deletion src/bots/uncrossArbBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ export class UncrossArbBot implements Bot {
'Transaction was not confirmed'
)
) {
console.error(`Unsurpressed error:\n`);
console.error(`Unsurpressed error:\n`, e);
webhookMessage(
`[${this.name}]: :x: error simulating tx:\n${
simError.logs ? simError.logs.join('\n') : ''
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ program
'0'
)
.option(
'--perp-markets <string>',
'comma delimited list of perp market ID(s) for applicable bots (willing to inherit risk), omit for all',
'--perp-market-indicies <string>',
'comma delimited list of perp market index(s) for applicable bots (willing to inherit risk), omit for all',
''
)
.option(
'--spot-markets <string>',
'comma delimited list of spot market ID(s) for applicable bots (willing to inherit risk), omit for all',
'--spot-markets-indicies <string>',
'comma delimited list of spot market index(s) for applicable bots (willing to inherit risk), omit for all',
''
)
.option(
Expand Down

0 comments on commit 79e5c1c

Please sign in to comment.