Commit Graph

20 Commits

Author SHA1 Message Date
Serge Farny 53829cb6e5
Clients: log git commit info at start time (#965) 2024-05-23 15:16:55 +02:00
Serge Farny e090104c69
keeper: add CU estimate for perp update funding, perp consume events and token update index & rates (#937) 2024-04-09 10:50:35 +02:00
Christian Kamm c2544d9bbd
keeper: fix all confirmation reporting to be on success (#930) 2024-04-03 11:39:00 +02:00
Christian Kamm 8108b31ff9
keeper: report confirmation times only on success (#928)
reporting a "confirmation time" on an error response made the metrics
confusing
2024-04-02 14:43:49 +02:00
Christian Kamm 54674e4b20 keeper: fix tx size limits on charge collateral fee batching 2024-02-26 09:21:53 +01:00
Christian Kamm d9f55c4c22 keeper: cu limit when batching charge_collateral_fee ix 2024-02-24 10:04:30 +01:00
Christian Kamm 3993a3fa66
collateral fees: fixes after devnet test (#880) 2024-02-14 11:32:57 +01:00
Christian Kamm e57dcdc2a9
Add collateral fees (#868)
- New permissionless instruction to regularly charge collateral fees
- Bank and group configuration to set rate and interval
- Keeper addition to call the instruction
2024-02-13 12:39:28 +01:00
Christian Kamm ea91d9d353
rust client: optionally derive prio fees from feed (#866)
This allows connecting to a lite-rpc feed to receive block priority
updates and computing recently good priority fee values based on that.
2024-02-07 12:52:32 +01:00
Lou-Kamades db98ba5edf
Use fallback oracles in Rust client (#838)
* 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>
2024-01-23 10:26:31 -06:00
Christian Kamm 7a0cb6c8f4
Switch all tokio Interval to MissedTickBehavior::Delay (#840)
Burst can lead to undesired behavior, in particular with rate limits.
2024-01-09 11:25:55 +01:00
Christian Kamm ce16d79b13
bins: Fix restarting on new or changed listings (#802)
- 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.
2023-12-05 13:22:24 +01:00
microwavedcola1 d212e3bf0a
Mc/settler cu limit (#725)
* v0.19.30

* settler: extend cu limit to 250k for perp pnl settling

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* TransactionBuilder: add cu limit/price based on config

---------

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>
2023-09-25 14:13:29 +02:00
microwavedcola1 885427e777
Mc/keeper (#714)
* v0.19.28

* ts: tokenWithdrawAllDepositForMint

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* Fix

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* Fix

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* rust: dont include tokens with errors in crank

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* Fixes from review

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* review fixes

* Fixes from review

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

---------

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>
2023-09-11 13:37:11 +02:00
Christian Kamm 81525ed139 logging improvements (#641)
- switch logging to tracing crate
- update liquidator logging to use tracing features

(cherry picked from commit b8376b4b89)
2023-07-17 13:21:51 +02:00
Christian Kamm e535e81257
Pyth: Read agg.price or prev_price, depending on staleness (#631)
This updates our use of pyth oracle accounts to be more in line with
what the pyth sdk is doing.
2023-07-05 12:58:42 +02:00
Christian Kamm 35064d4ab0
Token conditional swaps (#604)
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>
2023-07-03 14:09:11 +02:00
Maximilian Schneider c956f153b0
Expose instruction builders for Openbook (#601) 2023-06-15 17:20:31 +02:00
riordanp 6be7810c56
Add prometheus metrics to crank (#517)
* Add prometheus metrics to keeper
2023-03-29 15:51:32 +01:00
Christian Kamm 7b9e19cc08
Organize paths, rename crates (#466)
liquidator, keeper, cli and settle-bot moved to bin/
client moved to lib/client

All crates have a "mango-v4-" prefix
2023-02-20 14:08:38 +01:00