Commit Graph

130 Commits

Author SHA1 Message Date
Christian Kamm d9a9c7d664
liquidation: Add flag to disable asset liquidation (#867)
This can be used to remove the oracle dependency for tokens with zero maint asset
weight that are not borrowable.
2024-02-07 12:52:01 +01:00
Christian Kamm 712a2e3bd6
Settler: Keep going on error (#873)
in particular: don't panic when a health cache can't be constructed
2024-02-07 12:50:35 +01:00
Christian Kamm 6c6a75d90d
liquidator: batch serum-cancel step (#861) 2024-01-29 15:07:24 +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 43b9cac3a1
Rust client: Allow sending transactions to multiple rpcs (#853) 2024-01-19 16:35:30 +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
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
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
Christian Kamm 34aebf01f2
oracle: don't force logging in OracleState functions (#828)
The msg!() caused writes to stdout in the liquidator etc in codepaths
that just wanted to check if the oracle was usable.
2024-01-03 08:37:35 +01:00
Christian Kamm 5e5900f94e liquidator: less error spam on bad jup price updates 2023-12-29 10:16:18 +01:00
Christian Kamm b18d0dd154 Rework ErrorTracking
- keep track of different error types per key
- skip for a given duration once too many errors came in
- wipe if no new errors are seen for a while
- simplify logging of actively skipped cases
2023-12-29 10:16:18 +01:00
Christian Kamm eb6622b4fc client/liq: support jupiter api tokens 2023-12-27 14:47:58 +01:00
Christian Kamm e2bfa9a1e6 client: configurable jupiter urls (#800)
(cherry picked from commit 71f0e5cc13)
2023-12-27 14:15:45 +01:00
Christian Kamm d2327f8d11 liquidator: rebalance asynchronously 2023-12-22 09:02:06 +01:00
Christian Kamm 0a55184ec7 liquidator: stop withdraw attempts on delgated accounts 2023-12-22 08:35:21 +01:00
Christian Kamm cdf804e971 liquidator: don't panic when unable to build health cache 2023-12-22 08:11:34 +01:00
Christian Kamm b12b998e3a liquidator: cover errors during tcs execution
previously they could abort the liquidator
2023-12-15 11:55:21 +01:00
Christian Kamm 99cb3d4f4c liquidator: Pick better asset/liab for liq_token 2023-12-15 11:40:25 +01:00
Christian Kamm b6ddd991b0 liquidator: early out when no tcs tx were sent 2023-12-14 21:48:01 +01:00
Christian Kamm 47faa8a7f1 liq: get rid of separate rebalance job (#815)
Previously, the separate job and the post-liquidation rebalance could
run at the same time and would occasionally perform the same action at
the same time, leading to overshooting.

Now rebalancing never happens twice. In the future it should potentially
just run separately from liquidation, but that needs a review of the
assumptions the liquidation job is making first.

(cherry picked from commit e8e7e445d3)
2023-12-13 09:27:21 +01:00
Christian Kamm 9ba0004760 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.

(cherry picked from commit ce16d79b13)
2023-12-13 09:27:04 +01:00
Christian Kamm 5cfbb8386d liquidator: fix token info for same-name, fix delays (#795)
(cherry picked from commit 0483faef1e)
2023-12-13 09:20:52 +01:00
Christian Kamm e8e7e445d3
liq: get rid of separate rebalance job (#815)
Previously, the separate job and the post-liquidation rebalance could
run at the same time and would occasionally perform the same action at
the same time, leading to overshooting.

Now rebalancing never happens twice. In the future it should potentially
just run separately from liquidation, but that needs a review of the
assumptions the liquidation job is making first.
2023-12-11 17:41:11 +01:00
Christian Kamm e7bfa4e03e Deposit limits (#806)
- limit deposits (via deposit, flash loan, tcs)
- limit potential deposits via openbook settle
  by restricting placable orders via potential_serum_tokens
- introduce Serum3PlaceOrderV2 for this purpose
- account for new limits in liquidator, max_swap

(cherry picked from commit 42e31ae859)
2023-12-05 15:57:26 +01:00
Christian Kamm 42e31ae859
Deposit limits (#806)
- limit deposits (via deposit, flash loan, tcs)
- limit potential deposits via openbook settle
  by restricting placable orders via potential_serum_tokens
- introduce Serum3PlaceOrderV2 for this purpose
- account for new limits in liquidator, max_swap
2023-12-05 15:43:38 +01:00
Christian Kamm 71f0e5cc13
client: configurable jupiter urls (#800) 2023-12-05 13:23:11 +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
Lou-Kamades 838df8cd7c
Merge pull request #790 from blockworks-foundation/lou/fallback-oracle
Add fallback oracles
2023-12-01 12:59:38 -06:00
Lou-Kamades 59001b3631 reduce CU cost of fallback oracles 2023-11-28 22:55:19 -06:00
Christian Kamm 0483faef1e
liquidator: fix token info for same-name, fix delays (#795) 2023-11-24 11:04:59 +01:00
Christian Kamm 9a68a2dd7d
liquidator: make tcs mode configurable (#794)
tcs devnet tests want borrow-buy-token
2023-11-24 11:04:48 +01:00
shuoer86 8129cf45b4
chore: fix typos (#778) 2023-11-23 08:59:19 +01:00
Christian Kamm 12d74789ef
cli: save-snapshot command (#773) 2023-11-08 10:27:55 +01:00
Christian Kamm 7af1d58558
Some clippy fixes (#776) 2023-11-08 09:51:36 +01:00
Christian Kamm 0ad26d845f
liquidator: Allow excluding tokens from rebalance (#774) 2023-11-08 08:51:41 +01:00
Christian Kamm c49efb2213
Change conditions for perp settle incentive (#771)
- Only ever give an incentive when pnl is at least 1% of the position
  value. That way large positions (like $100k in SOL-PERP) don't get
  settled on 0.1% price fluctuations. The price now needs to change by
  1% for settlement to occur.
- For low health incentives, cap the percentual incentive at 2x the flat
  settle fee. We want to give the settler incentive to use these first,
  but the settler doesn't take on risk, so the reward doesn't need to be
  large.
2023-11-07 12:01:02 +01:00
Christian Kamm f690514638
rust client: ix cu limits based on health compute cost (#768)
Many instructions now return PreparedInstructions instead of a direct
Instruction or Vec<Instruction>. That way they can keep track of the
expected cu cost of the instructions for the compute limit instruction
that gets added once all instructions are made.
2023-11-03 11:20:37 +01:00
Christian Kamm a81d0918cc tcs start: use same naming convention as in other ix
liqee/liqor over account/caller
2023-10-30 13:41:19 +01:00
microwavedcola1 edaf874174
deploy -> dev (#759)
* ts: get yarn lock from dev

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

* v0.19.20

* ts: add missing dependency

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

* ts: add error when no free token position is found (#707)

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

* Mc/tcs improvements (#706)

* ts: additional tcs helpers

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

* Fixes from review

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

* Revert "Fixes from review"

This reverts commit 1def10353511802c030a100fd23b2c2f4f198eaa.

---------

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

* v0.19.21

* v0.19.22

* ts: tcs fix price display input to tx

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

* v0.19.23

* v0.19.25

* script: log all

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

* ts: fix tcs order price limits

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

* v0.19.27

* ts: fix getTimeToNextBorrowLimitWindowStartsTs (#710)

* ts: fix getTimeToNextBorrowLimitWindowStartsTs

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

* Fixes from review

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

---------

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

* 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>

* v0.19.29

* ts: update debug script

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

* release 19.1 -> deploy + serum3 open orders estimation ts patch (#719)

* Serum3 open orders: Fix health overestimation (#716)

When bids or asks crossed the oracle price, the serum3 health would be
overestimated before.

The health code has no access to the open order quantites or prices and
used to assume all orders are at oracle price.

Now we track an account's max bid and min ask in each market and use that
as a worst-case price. The tracking isn't perfect for technical reasons
(compute cost, no notifications on fill) but produces an upper bound on
bids (lower bound on asks) that is sufficient to make health not
overestimate.

The tracked price is reset every time the serum3 open orders on a book
side are completely cleared.

(cherry picked from commit 2adc0339dc)

* Changelog, version bump for program v0.19.1

* ts: ts patch for the PR

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

---------

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>

* Rust client: Use alts for every transaction (#720)

(cherry picked from commit 40ad0b7b66)

* Jupiter: ensure source account is initialized

Backport of 9b224eae1b / #721

* client/liquidator: jupiter v6 (#684)

Add rust client functions for v6 API that are usuable in parallel to the v4 ones.

(cherry picked from commit 0f10cb4d92)

* Jupiter: Ensure source account is initialized (#721)

(cherry picked from commit 9b224eae1b)

* Mc/update cu budget for perp settle pnl (#724)

* ts: bump perp settle pnl cu budget

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

* ts: helpers for withdrawing tokens from bad oracles (#726)

* ts: helpers for withdrawing tokens from bad oracles

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

* Fixes from review

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

* Fixes from review

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

* Fixes from review

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

* Fixes from review

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

* rename

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

* rename

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

* Fix usage of field

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

* Fixes from review

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

---------

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

* v0.19.31

* ts: higher min. cu limit for each tx (#727)

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

* v0.19.32

* ts: if more ixs then more cu (#728)

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

* Mc/tcs p95 (#708)

* use more fine grain price impact

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

* ts: for computing tcs premium use more fine grain price impact

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

---------

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

* update

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

* 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>

* ts: rename params to indicate that they are in native

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

* ts: cleanup tcs create parameter naming (#730)

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

* wip: Mc/update risk params (#729)

* v0.19.33

* ts: script to update risk params

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

* create proposals helpers

* fix

* Update env params

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

* Update

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

* Update

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

* simulate before run

* fix presets

* fix

---------

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: Adrian Brzeziński <a.brzezinski94@gmail.com>

* ts: upgrade anchor (#735)

* ts: upgrade anchor

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

* Fixes from review

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

---------

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

* script for tx error grouping, and ts helper code for finding tx error reason (#747)

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

* v0.19.34

* ts: fix script for updating token params

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

* Fix typo

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

* script: update script to remove files which are of 0 size

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

* script: error tx grouping, blacklist some more

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

* fix (#753)

* jupiter: clearer slippage_bps argument name

---------

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>
Co-authored-by: Adrian Brzeziński <a.brzezinski94@gmail.com>
2023-10-19 10:03:07 +02:00
Christian Kamm c354f55423
v0.20.0 minor fixes from self-audit (#751)
* tcs::is_startable only true for premium auctions
* individual tcs premium auction / linear auction ix gates
* drop unnecessary I80F48::from(...)
* minor: adjust confusing wording in v2 mango account format doc
* idl update
* ts: prettier
2023-10-11 15:19:53 +02:00
Christian Kamm a4745dae27
liquidator: improve jupiter quote cache (#748) 2023-10-09 19:56:45 +02:00
Christian Kamm 817bf9bbc6
Tcs: linear and premium auctions (#717) 2023-10-07 21:27:19 +02:00
Christian Kamm fd997e2e2c Cargo: Remove explicit workspace-inheritance feature use
solana-release cargo version was updated
2023-10-05 11:05:12 +02:00
Steve f625284593
Update to solana 1.16.14 and anchor 0.28.0 (#718)
- Change fixed to be a git dependency (no more submodules!)
- Upgrade fixed to a version compatible with borsh 0.10
- Upgrade openbook-v2 dependency (for anchor compat)
- Move services from mango-feeds repo into bin/
- Update mango-feeds-connector

Co-authored-by: Christian Kamm <mail@ckamm.de>
Co-authored-by: Riordan Panayides <riordan@panayid.es>
2023-10-05 10:56:45 +02:00
Christian Kamm 9b224eae1b
Jupiter: Ensure source account is initialized (#721) 2023-09-18 09:21:46 +02:00
Christian Kamm 139555a46e
liquidator: Make the check interval configurable (#702)
And reduce the default from 5s to 1s.
2023-09-01 16:27:17 +02:00
Christian Kamm aca2b2e679
liquidator: Work on groups without openbook markets (#701) 2023-09-01 15:05:43 +02:00
Christian Kamm 0f10cb4d92
client/liquidator: jupiter v6 (#684)
Add rust client functions for v6 API that are usuable in parallel to the v4 ones.
2023-08-24 16:45:01 +02:00
Christian Kamm 072cd766ca
liquidator: parallel tcs execution (#679) 2023-08-18 15:36:02 +02:00
Christian Kamm a04f5e0df0 liquidator: better startup for tests 2023-08-14 16:15:32 +02:00
Christian Kamm f1e2b521f2 liquidator: Deal with net-borrow restricted tcs executions 2023-08-14 16:14:30 +02:00
Christian Kamm 8746060be0
liquidator: increase tx budget for tcs trigger instructions (#674) 2023-08-11 12:48:50 +02:00
Christian Kamm 4eca3eb9f0
liquidator: Collect and report persistent errors (#672) 2023-08-11 12:10:07 +02:00
Christian Kamm 1f55d549a6
liquidator: execute tcs with volume-weighted randomness (#670) 2023-08-11 12:08:34 +02:00
Christian Kamm a7705a2a1b
liquidator: Allow overriding compute limit for potentially costly ix (#669) 2023-08-09 15:26:13 +02:00
Christian Kamm 7e32e2e0bd
liquidator: Add telemetry (#668)
The DAO would like to know how many potential liquidators are around.
2023-08-08 18:17:23 +02:00
Christian Kamm cce2620de8
liquidator: Improve logging for tcs execution (#648) 2023-07-17 13:16:01 +02:00
Christian Kamm db8f5ae30d liquidator: when rebalancing allow multi-hop jupiter routes
and if that doesn't fit into a transaction, try a direct route with USDC
or SOL.
2023-07-12 08:57:21 +02:00
Christian Kamm c58ee91356 Client: jupiter swap and tx builder improvements
- jupiter swap now supports multiple hops
- tx builder can check resulting tx size
2023-07-12 08:57:21 +02:00
Christian Kamm b8376b4b89
logging improvements (#641)
- switch logging to tracing crate
- update liquidator logging to use tracing features
2023-07-12 08:38:38 +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
microwavedcola1 c38d2ec225
add disclaimer to bots (#610)
* Update README.md

* Update README.md

* Update README.md

* link to license

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

* Fixes from review

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

---------

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-06-20 19:33:08 +02:00
Maximilian Schneider c956f153b0
Expose instruction builders for Openbook (#601) 2023-06-15 17:20:31 +02:00
Maximilian Schneider 0b22e41acd
manage dependencies in workspace (#588)
* move important dependencies to workspace
* enable workspace inheritance
2023-05-17 20:48:14 +02:00
Christian Kamm 5fc7aa1092
Configurable perp settle token (#550)
This changes perp market margining to no longer assume all pnl is in USD
while settlement is in USDC. Instead, a configurable settle token is used for
pnl and settlement, defaulting to USDC. 

There is no difference while the USDC price is forced to $1 and the init and liab
weights are 1. But with this patch, it becomes possible to change that.

For now it is not recommended to use a token other than USDC or USDT (or
another USD targeting stable token) for perp settlement.

The patch also updates all insurance vault use to be aware that the insurance
fund is not in USD but in USDC and apply the USDC price before payouts.
To do this, the previous PerpLiqNegativePnlOrBankruptcy was replaced by
a new PerpLiqNegativePnlOrBankruptcyV2 instruction.

Co-authored-by: microwavedcola1 <89031858+microwavedcola1@users.noreply.github.com>
2023-05-17 15:50:05 +02:00
Maximilian Schneider c006948319
Enable self-trading protection (#533)
Co-authored-by: Christian Kamm <mail@ckamm.de>
2023-05-15 10:40:41 +02:00
Christian Kamm 5a05e9cb2e
Update anchor to v0.27.0, stop using submodule (#582) 2023-05-12 13:54:53 +02:00
Christian Kamm 953e2f76b2
Ckamm/liq fixes (#571)
* 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.
2023-05-05 09:11:12 +02:00
riordanp 757a3ee0cc
Use ghcr.io container registry (#549)
* Use ghcr.io container registry

* Update base image urls
2023-04-17 16:57:51 +01:00
microwavedcola1 b796965d6a
re-enable token rebalance in liquidator (#545)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-04-17 11:18:50 +02:00
microwavedcola1 350d558ee3 disable for now
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-04-14 11:42:02 +02:00
riordanp 6be7810c56
Add prometheus metrics to crank (#517)
* Add prometheus metrics to keeper
2023-03-29 15:51:32 +01:00
microwavedcola1 cce8bb4b14
liquidator docs (#512)
* liquidator docs

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

* update

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

* update

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

---------

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-03-21 18:37:01 +01:00
riordanp fc1341f731
Rename settle-bot to settler, fix build (#492)
* Fix settler build, rename due to heroku not liking '-'

* Temporarily remove ref tag

* Remove temporary branch trigger
2023-03-14 19:10:24 +01:00
Christian Kamm 0349ace3b6
Downgrade the `fixed` crate to v1.11.0 (#500) 2023-03-12 08:50:42 +01:00
Christian Kamm 7803c47912
Liquidator: Withdraw full dust amount on rebalance (#499)
The amount was sometimes too high (stale?), causing withdraw errors.
2023-03-09 10:01:02 +01:00
Christian Kamm 5c7a2e3e10
Use the overflow-checks=true equivalent with the fixed crate (#476)
* Vendor `fixed` crate to have checked math in release mode
* remove all cm!()
* drop superfluous parens
* drop use of checked_math crate
* manual removal of redundant checked_* functions
2023-02-24 11:56:33 +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