Skip to content

Commit

Permalink
fix: readme, add excluded iso banks
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbpvsc committed Dec 6, 2023
1 parent c2f75fe commit 493f75d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/alpha-liquidator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Below are the environment variables used by the application, along with their ex

- `SORT_ACCOUNTS_MODE`: An experimental feature flag indicating whether accounts should be sorted by the liquidation amount, with accounts having more to liquidate being prioritized. It accepts a string and converts it to a boolean. Default is `"false"`.

- `EXCLUDE_ISOLATED_BANKS`: A flag indicating whether isolated banks should be excluded from liquidation. It accepts a string and converts it to a boolean. Default is `"false"`.

- `MARGINFI_ACCOUNT_BLACKLIST`: A comma-separated string of MarginFi account public keys to be blacklisted. It gets transformed into an array of `PublicKey` objects. This field is optional.

- `MARGINFI_ACCOUNT_WHITELIST`: A comma-separated string of MarginFi account public keys to be whitelisted. It gets transformed into an array of `PublicKey` objects. This field is optional.
Expand Down
1 change: 1 addition & 0 deletions apps/alpha-liquidator/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ if (!process.env.RPC_ENDPOINT) {
/*eslint sort-keys: "error"*/
let envSchema = z.object({
ACCOUNT_COOL_DOWN_SECONDS: z.string().default("120").transform((s) => parseInt(s, 10)),
EXCLUDE_ISOLATED_BANKS: z.string().optional().default("false").transform((s) => s === "true" || s === "1"),
IS_DEV: z
.string()
.optional()
Expand Down
2 changes: 1 addition & 1 deletion apps/alpha-liquidator/src/liquidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const USDC_MINT = new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v");
const MIN_SOL_BALANCE = env_config.MIN_SOL_BALANCE * LAMPORTS_PER_SOL;
const SLIPPAGE_BPS = env_config.MAX_SLIPPAGE_BPS;

const EXCLUDE_ISOLATED_BANKS: boolean = process.env.EXCLUDE_ISOLATED_BANKS === "true"; // eslint-disable-line
const EXCLUDE_ISOLATED_BANKS = env_config.EXCLUDE_ISOLATED_BANKS;

function getDebugLogger(context: string) {
return require("debug")(`mfi:liquidator:${context}`);
Expand Down

0 comments on commit 493f75d

Please sign in to comment.