* liquidator: randomly select token/perps for rebalancing to avoid failing at every try if one token is having an issue (#921)
(cherry picked from commit e3a7ed9e32)
* liquidator: do not panic if token or perp rebalancing fails (#927)
(cherry picked from commit 0b7e62e671)
* Liquidator: add Sanctum swap (#919)
liquidator: add sanctum swap
(cherry picked from commit 01d5237162)
* liquidator: add more LST for sanctum swap (#944)
(cherry picked from commit c0b61b3b37)
* liquidator: forcefully exit process if snapshot job die
* client: return snapshot_job join handle so it can be watched for early unexpected exit
(cherry picked from commit 2520c7d095)
- always allow them, now that v0.22 is deployed and delegates can
withdraw small token amounts to the owner's ata
- increase the dust amount to $0.001 to avoid issues where the logic is
a few lamports off
liquidator: split TCS triggering and liquidation job
Concurrent execution of candidate lookup and tx building/sending
- Also added an health assertion IX to protect liqor in multi liquidation scenario
- And a timeout for jupiter v6 queries (avoid blocking liquidation because of slow TCS)
* service-mango-health: add a new service that compute health for all mango accounts and persist an history in postgres sql
(cherry picked from commit 6aa8a883f4)
liquidator: add a way to restrict token accepted by the liquidator
- add allow/forbid list of token for liquidation & conditional token swap triggering
- add allow/forbid list for perp market liquidation
- housekeeping: extract cli args to a dedicated file
- move more hardcoded thing to config and stop using token name (replace with token index)
rust client:
- add serum3 place order to command
- add serum3 create open orders command
- add serum3 close open orders command
- auto create serum3 open orders if needed when placing a new order
- auto close serum3 slot if needed when placing a new order & also close unused token if needed to place a serum3 order
- New permissionless instruction to regularly charge collateral fees
- Bank and group configuration to set rate and interval
- Keeper addition to call the instruction
* perp: auto close perp market account when needing to open a new one with no slot available
* rust_client: do not send health accounts when deactivating a perp position (not needed on program side)
* rust_client: add perp place order command