mango-v4/bin/liquidator/src
Lou-Kamades 9ce6b67831
Add an Orca oracle type (#813)
* deps: add whirlpool crate

* allow oracle to read price from Orca CLMM

* test: add test for raw orca CLMM price

* require the USD/USDC oracle when using a CLMM oracle

* test: add CLMM oracle tests

* use KeyedAccountReader instead of AccountInfoRef for fallback fetching functions

* calculate price for inverted orca pools

* ensure that Orca fallback oracles have USDC side

* remove unused Whirlpool impl

* clmm prices have correct decimals and pyth update slot

* manually deserialize the orca Whirlpool

* refactor: use OracleAccountInfos when checking oracle price

* properly handle inverted clmm prices

* update rs client with OracleAccountInfos struct

* refactor: simplify OracleAccountInfos impl

* add clmm oracle integration test

* use OracleAccountInfos::from_reader in account_retriever

* CLM oracles inherit deviation from supplementary quote oracle

* review fixes

* use f64 division for clmm sqrt price

* standardize fixed to f64 conversion

* review fixes
2024-01-04 11:29:54 -06:00
..
liquidate.rs Deposit limits (#806) 2023-12-05 15:43:38 +01:00
main.rs liquidator: less error spam on bad jup price updates 2023-12-29 10:16:18 +01:00
metrics.rs logging improvements (#641) 2023-07-12 08:38:38 +02:00
rebalance.rs Add an Orca oracle type (#813) 2024-01-04 11:29:54 -06:00
telemetry.rs liquidator: Add telemetry (#668) 2023-08-08 18:17:23 +02:00
token_swap_info.rs liquidator: less error spam on bad jup price updates 2023-12-29 10:16:18 +01:00
trigger_tcs.rs Rework ErrorTracking 2023-12-29 10:16:18 +01:00
util.rs Deposit limits (#806) 2023-12-05 15:43:38 +01:00