* 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)
- 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
* rename usd_opt to usdc_opt in OracleAccountInfos
* use fallbacks when fetching bank+ price in AccountFetcher struct
* feat: add derive_fallback_oracle_keys to MangoGroupContext
* test: properly assert failure CU in test_health_compute_tokens_fallback_oracles
* provide fallback oracle accounts in the rust client
* liquidator: update for fallback oracles
* set fallback config in mango services
* support fallback oracles in rust settler + keeper
* fix send error related to fetching fallbacks dynamically in tcs_start
* drop derive_fallback_oracle_keys_sync
* add fetch_multiple_accounts to AccountFetcher trait
* revert client::new() api
* deriving oracle keys uses account_fetcher
* use client helpers for deriving health_check account_metas
* add health_cache helper to mango client
* add get_slot to account_fetcher
* lint
* cached account fetcher only fetches uncached accounts
* ensure keeper client does not use cached oracles for staleness checks
* address minor review comments
* create unique job keys for CachedAccountFetcher.fetch_multiple_accounts
* fmt
* improve hashing in CachedAccountFetcher.fetch_multiple_accounts
---------
Co-authored-by: Christian Kamm <mail@ckamm.de>
- Don't just restart on new listings, but also on significant changes to
old listings such as oracle changes.
- Cover the liquidator and settler in addition to the keeper.
(cherry picked from commit ce16d79b13)
- Don't just restart on new listings, but also on significant changes to
old listings such as oracle changes.
- Cover the liquidator and settler in addition to the keeper.
Users can request token swaps to happen when the oracle price
is within a price band. Once the price is right, an executor can
trigger the swap. The executors are rewarded with a premium
over the oracle price.
This allows limit and stop loss orders on arbitrary spot pairs.
The PR comes with basic ts support and adjustments to the liquidator,
to execute available token conditional swaps.
Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
* liquidator: Don't attempt to close in-use token positions
This could happen if the user manually used serum on the liquidator
account.
* Client: Move jup's CU ix outside of flash loan
That makes a flash loan based jup swap usable with delegates.