Install dependencies using npm:
npm i
also, ts-node has to be installed globally.
Script uses keypair set in Solana config and creates accounts on needed tokens. To liquidate a user xUSD is needed.
To run script use:
npm start
or:
ts-node ./src/index.ts
The script downloads all Exchange Accounts (and updates when they change) to find ones that are at risk of liquidation. If liquidation_deadline comes they are liquidated using funds from a local wallet.