Lou-Kamades
20eef53f9c
implement fallbacks for perp_liq_base_or_positive_pnl
2024-04-16 11:58:22 -05:00
Lou-Kamades
22af31c7ee
add fallbacks to perp_force_close_position
2024-04-16 11:06:18 -05:00
Lou-Kamades
659e7fa4ba
add fallbacks to perp_liq_negative_pnl_or_bankruptcy
2024-04-16 11:06:06 -05:00
Lou-Kamades
2170f70ed8
perp_place_order uses fallbacks
2024-04-15 15:19:48 -05:00
Lou-Kamades
f5913cde5e
ensure account_retriever uses perp fallbacks
2024-04-15 14:56:06 -05:00
Lou-Kamades
d34a5e25f2
test: add test_liq_perps_force_cancel_stale_oracle
2024-04-15 12:20:16 -05:00
Lou-Kamades
c9fffdadfb
perp markets can use fallback oracles from built health accounts
2024-04-15 12:19:36 -05:00
Lou-Kamades
5a37232c2b
add fallback_oracle to PerpMarket
2024-04-15 11:18:10 -05:00
Serge Farny
4c3814c466
Changelog for v0.24.0 ( #942 )
2024-04-15 09:09:37 +02:00
thibaultosec
ccc479ba21
add audit report for v0.24.0 ( #941 )
...
Co-authored-by: CanardMandarin <thibault.marboud@gmail.com>
2024-04-15 08:36:10 +02:00
Serge Farny
fe86295d3c
program; fix health check ix gate ( #940 )
2024-04-11 07:22:29 +02:00
Serge Farny
d0125e9fdf
liquidator: rebalance with openbook (limit order) ( #938 )
...
liquidator: rebalance with limit order
2024-04-10 16:47:45 +02:00
Serge Farny
75a07e986a
program: remove delegate account withdrawal limit ( #939 )
...
This is necessary for new liquidator feature of rebalancing using limit orders:
We need to close the token and market slot so that it's available for new liquidation, but at the same time, it's possible that the min order quantity for a given market is still bigger than allowed max withdrawal.
2024-04-10 15:24:39 +02:00
Serge Farny
01d5237162
Liquidator: add Sanctum swap ( #919 )
...
liquidator: add sanctum swap
2024-04-10 11:35:56 +02:00
Christian Kamm
653cf9f30b
token_withdraw: avoid silencing errors with is_ok() ( #936 )
2024-04-08 16:28:25 +02:00
Christian Kamm
9df73a0dfd
Audit: Remove unused fn, add comments ( #935 )
2024-04-08 15:14:52 +02:00
Serge Farny
55105e085f
rust client: add a CU estimate for token withdrawal ( #934 )
2024-04-08 12:43:40 +02:00
Serge Farny
e38798ed0c
liquidator: add a sequence check in rebalancing ( #926 )
...
liquidator: add a sequence check in rebalancing
2024-04-03 11:55:04 +02:00
Serge Farny
2520c7d095
liquidator: forcefully exit process if snapshot job die ( #924 )
...
* liquidator: forcefully exit process if snapshot job die
* client: return snapshot_job join handle so it can be watched for early unexpected exit
2024-04-01 14:45:01 +02:00
Serge Farny
0b7e62e671
liquidator: do not panic if token or perp rebalancing fails ( #927 )
2024-04-01 10:30:49 +02:00
Serge Farny
e3a7ed9e32
liquidator: randomly select token/perps for rebalancing to avoid failing at every try if one token is having an issue ( #921 )
2024-03-27 14:07:32 +01:00
Serge Farny
ceeac9d3a4
service-mango-health: use jemalloc ( #922 )
2024-03-27 14:07:13 +01:00
Serge Farny
f54bb6f0b0
Serge/liquidator split tcs and liquidation ( #914 )
...
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)
2024-03-20 15:25:52 +01:00
Serge Farny
769f940a66
program: fix health check ix ( #918 )
2024-03-18 17:52:51 +01:00
Christian Kamm
6f85dfa42d
Merge remote-tracking branch 'origin/deploy' into dev
2024-03-14 11:26:33 +01:00
Christian Kamm
4bf45f2576
liqtest readme update
2024-03-14 09:53:43 +01:00
Christian Kamm
e20052f6e5
Fix logging in liqtest scripts
2024-03-14 08:58:04 +01:00
Christian Kamm
25bf71c646
Add liqtest test script readme
2024-03-14 08:43:49 +01:00
microwavedcola1
dc8e903d13
ts: update
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-03-13 10:44:54 +01:00
Christian Kamm
4ea7c531ef
liquidator: make alternate routes configurable ( #916 )
2024-03-13 09:13:07 +01:00
Christian Kamm
c2398d1abe
Fix service-mango-health build after bad merge resolution
2024-03-13 09:00:52 +01:00
microwavedcola1
a93ef13310
ts: new changes to token param updates
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-03-12 11:39:31 +01:00
microwavedcola1
928ac343f8
Fix merge errors
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-03-12 11:27:30 +01:00
Serge Farny
b3b4cc8223
program: add a min health check ( #913 )
...
add a min health check
2024-03-12 08:27:40 +01:00
Christian Kamm
4fcaf09c09
test: Allow replay of live transaction in program test ( #911 )
2024-03-11 15:08:58 +01:00
Christian Kamm
2cd4376466
cli: save-snapshot also captures alts ( #912 )
2024-03-11 15:08:25 +01:00
Christian Kamm
61117ccd11
withdraw: replace overflow with better error ( #910 )
2024-03-11 14:02:54 +01:00
Serge Farny
0728bb566f
program: sequence check as u8 ( #909 )
...
* program: sequence check as u8 (reuse existing padding)
2024-03-11 10:45:53 +01:00
microwavedcola1
3338edae88
v0.23.1
2024-03-10 14:28:41 +01:00
microwavedcola1
d9068758d2
ts: fix lint
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-03-10 14:27:31 +01:00
microwavedcola1
f2442428b6
Merge branch 'main' into deploy
2024-03-10 14:26:29 +01:00
Christian Kamm
077199ed39
ts: rework getMaxWithdrawWithBorrowForToken ( #900 )
...
* ts: rework getMaxWithdrawWithBorrowForToken
* binary seach for maxWithdraw
* tests
* warnings
* revert later, change for debugging
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* fix looking deeper than 0.5 tokens
* no borrows on no-borrow-tokens
---------
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
2024-03-10 14:11:30 +01:00
Adrian Brzeziński
ef5da37fba
switchboard migrator example
2024-03-08 16:47:24 +01:00
Serge Farny
494835631b
program: add a sequence check IX ( #908 )
...
Add a sequence check IX
This new IX `SequenceCheck` can be used to avoid having multiple concurrent TX in flight causing unexpected result (multiple borrow for example)
2024-03-07 14:59:05 +01:00
Adrian Brzeziński
6841ca5166
add mangolana, fee and auto retry to create proposal for scripts
2024-03-07 13:27:57 +01:00
Serge Farny
81f05b32c7
service-mango-health: add config for snapshot interval (reduce memory pressure) ( #906 )
2024-03-07 11:44:46 +01:00
Serge Farny
5affbb9cee
liquidator: add some latency metrics ( #904 )
...
liquidator: add some latency metrics
2024-03-07 11:44:23 +01:00
microwavedcola1
043b08fcc3
ts: update
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-03-07 09:08:36 +01:00
Adrian Brzeziński
b296c23bbe
v0.22.5
2024-03-05 17:15:07 +01:00
Adrian Brzeziński
1a6a544ecd
max accounts error margin fcn ( #905 )
...
* add error for max accounts limit
* fix
2024-03-05 16:56:35 +01:00