Commit Graph

2533 Commits

Author SHA1 Message Date
microwavedcola1 9797ce70d7 v0.21.27 2024-01-24 14:29:52 +01:00
microwavedcola1 e079f199c2
ts: use potential serum tokens in deposit limits (#857)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-24 14:26:33 +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
Adrian Brzeziński 84882a8d20 v0.21.24 2024-01-23 00:13:37 +01:00
Adrian Brzeziński 774ab42df8 upgrade mangolana 2024-01-23 00:11:23 +01:00
Adrian Brzeziński 5f6d75fb68 v0.21.23 2024-01-22 19:00:10 +01:00
Adrian Brzeziński e69214f408
max borrow fix (#855)
* fix

* ts: compute correct init scaled asset weight

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

---------

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-22 18:56:50 +01:00
Christian Kamm 40b6b49680 Test: Max borrow with init asset weight scaling 2024-01-22 12:56:37 +01:00
Christian Kamm 43b9cac3a1
Rust client: Allow sending transactions to multiple rpcs (#853) 2024-01-19 16:35:30 +01:00
Christian Kamm 8383109f0d
Add a token-token platform liquidation fee (#849)
The liqor liquidation fee and platform liquidation fee for the asset and
liab token are both payed by the liqee.

The platform liquidation fee is added to the Bank's
collected_fees_native and tracked in collected_liquidation_fees.
2024-01-19 16:34:55 +01:00
Adrian Brzeziński bff4828bbf
use deposit limits (#852)
* edit max source token

* deposit limits adjustments

* fix comment

* pr fixes

* fix

* fix
2024-01-18 17:47:57 +01:00
Christian Kamm 511814ca97
Rust client: Revamp transaction confirmation (#850)
- Allow user configuration of confirmation settings
- Provide a timeout setting, default is 60s
2024-01-17 10:30:25 +01:00
Adrian Brzeziński 8d11d27a13 publish 0.21.22 2024-01-16 15:08:00 +01:00
microwavedcola1 5d677b858d ts: fix import
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-16 14:55:23 +01:00
Adrian Brzeziński 146d87d9ec publish 0.21.21 2024-01-16 13:24:51 +01:00
Adrian Brzeziński 377a88b870 use polimorphic websockets 2024-01-16 13:17:10 +01:00
Adrian Brzeziński c1ff2c0777 v0.21.20 2024-01-16 12:30:31 +01:00
Adrian Brzeziński d695838f28 upgrade mangolana 2024-01-16 12:28:21 +01:00
Adrian Brzeziński a86f6614e7 fix node fetch 2024-01-16 11:23:08 +01:00
Adrian Brzeziński 791f31129c v0.21.19 2024-01-16 11:22:16 +01:00
Adrian Brzeziński fee9b41300 publish 0.21.18 2024-01-16 11:13:14 +01:00
Adrian Brzeziński e4bbc41a88 import fix 2024-01-16 11:02:39 +01:00
Adrian Brzeziński dfccdaf1fb
Feature/confirm txes fix (#847)
* connections

* merge

* use new mangolana

* v0.21.21

* fix

* fix

* fix error parsing

* fix

* fix

* fix

* v0.21.24

* fix version

* fix

* fix
2024-01-16 10:59:18 +01:00
microwavedcola1 5d186421bb ts: take liquidation batches to a script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-16 10:47:52 +01:00
microwavedcola1 fce4e18735 Merge branch 'mc/deposit-limits' into deploy 2024-01-16 10:22:04 +01:00
microwavedcola1 6e3c284220 ts: deposit limits 2024-01-16 10:21:15 +01:00
Christian Kamm 18729cf04c
Configurable interest rate for 0% utilization (#848) 2024-01-15 12:45:00 +01:00
microwavedcola1 81be62093e v0.21.17 2024-01-12 13:14:08 +01:00
microwavedcola1 f7dcb99c5f ts: fix node fetch
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-12 13:12:19 +01:00
Christian Kamm 637b43fec4 Idl update 2024-01-12 10:56:24 +01:00
Adrian Brzeziński 9296caf6f5 publish 0.21.15 2024-01-12 02:08:41 +01:00
Adrian Brzeziński 6e72188bd4 Revert "Improve tx confirmation (#846)"
This reverts commit 19a0f7d59d.
2024-01-12 02:03:46 +01:00
Adrian Brzeziński 7bdaaf4824 publish 0.21.14 2024-01-11 21:18:02 +01:00
Adrian Brzeziński 19a0f7d59d
Improve tx confirmation (#846)
* improve tx confirmation with mangolana

* dedupe

* support multiple connections

* fix
2024-01-11 21:14:05 +01:00
Adrian Brzeziński 68e119e726
use fast clone (#843)
* use fast clone

* fix

* add health check copy tests

* fix

* fix

* add more test
2024-01-11 21:13:41 +01:00
Lou-Kamades c9531f4bc4
Add TxCallbackOptions (#844)
* ts: include slot when fetching LatestBlockHash

* ts: add txSignatureBlockHash to postTxConfirmationCallback

* v0.21.9

* v0.21.11

* v0.21.12

* v0.21.13 - add TxCallbackOptions
2024-01-10 14:12:04 -06:00
Lou-Kamades 0971557047
Expand usage of postTxConfirmationCallback (#842)
* ts: include slot when fetching LatestBlockHash

* ts: add txSignatureBlockHash to postTxConfirmationCallback

* v0.21.9
2024-01-09 14:38:57 -06:00
Christian Kamm 53bc52efe7
Update openbook v1 fast listing default parameter (#841) 2024-01-09 15:14:52 +01:00
Christian Kamm ce0713070a Merge remote-tracking branch 'origin/deploy' into dev 2024-01-09 12:31:20 +01: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 857dcb397f
Allow fast listing admin to register openbook v1 markets (#839) 2024-01-08 14:18:43 +01:00
Adrian Brzeziński bc8bdaed89
small type fixes + post tx approve fcn (#830)
* background confirmations

* fixes

* background confirmation callback

* fix

* fix
2024-01-07 20:14:26 +01:00
Christian Kamm 40f2842c10
ts client: Support deposit-into-existing (#837)
And add a script for using it.
2024-01-04 20:21:09 +01:00
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
Britt Cyr 797e866f04
Add a type to the perp cancel order instructions when not found (#833) 2024-01-04 16:00:54 +01:00
Christian Kamm 7d177fdb26
Merge pull request #827 from blockworks-foundation/ckamm/persistent-errors
Liquidator: more useful logs by tracking repeated errors better
2024-01-03 16:22:08 +01:00
microwavedcola1 cf1ca29cee ts: stock mm, fix perp market name
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-03 10:25:54 +01:00
microwavedcola1 56e45ad7e4 ts: rndr stock mm, quote at liq price for liqudiations
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-03 10:17:26 +01:00
microwavedcola1 f3365d4e58 ts: make backup keeper relaxed
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-03 09:55:39 +01:00
microwavedcola1 375284df25 ts: update script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-03 09:46:17 +01:00