Skip to content

Commit d89642c

Browse files
committed
fix: ignore reserve price updates
1 parent 0f604a7 commit d89642c

File tree

5 files changed

+788
-764
lines changed

5 files changed

+788
-764
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@
2020
"pino-pretty": "^13.1.1"
2121
},
2222
"devDependencies": {
23-
"@aws-sdk/client-s3": "^3.884.0",
24-
"@biomejs/biome": "^2.2.2",
23+
"@aws-sdk/client-s3": "^3.887.0",
24+
"@biomejs/biome": "^2.2.4",
2525
"@commander-js/extra-typings": "^14.0.0",
2626
"@commitlint/cli": "^19.8.1",
2727
"@commitlint/config-conventional": "^19.8.1",
28-
"@gearbox-protocol/biome-config": "^1.0.1",
28+
"@gearbox-protocol/biome-config": "^1.0.2",
2929
"@gearbox-protocol/cli-utils": "^5.45.16",
3030
"@gearbox-protocol/liquidator-contracts": "^1.36.0-experimental.41",
3131
"@gearbox-protocol/liquidator-v2-contracts": "^2.4.0",
32-
"@gearbox-protocol/sdk": "8.28.4",
32+
"@gearbox-protocol/sdk": "8.31.2",
3333
"@gearbox-protocol/types": "^1.14.8",
3434
"@types/node": "^24.3.1",
3535
"@uniswap/sdk-core": "^7.7.2",
3636
"@uniswap/v3-sdk": "^3.25.2",
3737
"@vlad-yakovlev/telegram-md": "^2.1.0",
3838
"abitype": "^1.1.0",
39-
"axios": "^1.11.0",
39+
"axios": "^1.12.1",
4040
"axios-retry": "^4.5.0",
4141
"date-fns": "^4.1.0",
4242
"di-at-home": "^0.0.7",
@@ -45,12 +45,12 @@
4545
"lint-staged": "^16.1.6",
4646
"nanoid": "^5.1.5",
4747
"node-pty": "^1.0.0",
48-
"pino": "^9.9.4",
48+
"pino": "^9.9.5",
4949
"tsx": "4.20.5",
5050
"typescript": "^5.9.2",
5151
"viem": "^2.37.5",
5252
"vitest": "^3.2.4",
53-
"zod": "^4.1.5"
53+
"zod": "^4.1.8"
5454
},
5555
"commitlint": {
5656
"extends": [

src/attachSDK.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export default async function attachSDK(): Promise<ICreditAccountsService> {
7272
marketConfigurators: config.marketConfigurators,
7373
chainId: config.chainId,
7474
networkType: config.network,
75+
ignoreUpdateablePrices: true, // we'll perform price updates in credit account service calls
7576
redstone: {
7677
historicTimestamp: optimisticTimestamp,
7778
gateways: config.redstoneGateways,

src/config/common.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,18 @@ export const CommonSchema = z.object({
302302
description: "Slippage value for pathfinder",
303303
env: "SLIPPAGE",
304304
}),
305+
/**
306+
* By default, reserve prices are not updated (except for deleverage mode)
307+
*/
308+
updateReservePrices: z
309+
.boolean()
310+
.optional()
311+
.default(false)
312+
.register(zommandRegistry, {
313+
flags: "--update-reserve-prices",
314+
description: "Update reserve prices",
315+
env: "UPDATE_RESERVE_PRICES",
316+
}),
305317
/**
306318
* Flag to enable less eager liquidations for LRT tokens
307319
*/

src/services/Scanner.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ export class Scanner {
164164
maxHealthFactor: this.#maxHealthFactor,
165165
includeZeroDebt: false,
166166
creditManager: this.config.debugManager,
167+
ignoreReservePrices:
168+
this.config.liquidationMode !== "deleverage" &&
169+
!this.config.updateReservePrices,
167170
};
168171
accounts = await this.caService.getCreditAccounts(queue, blockNumber);
169172
if (this.#diagnoster) {

0 commit comments

Comments
 (0)