Commit Graph

2122 Commits

Author SHA1 Message Date
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 6e2363c86f
Improve CU benchmarks (#690) 2023-08-24 16:33:08 +02:00
Lou-Kamades 2237986c4b
Merge pull request #687 from blockworks-foundation/lou/yarn-dedup
ci: add yarn duplicates check
2023-08-24 09:32:43 -05:00
Christian Kamm f63163d737
Account limits: Prefer 4 perp + 4 serum (#689) 2023-08-21 16:26:49 +02:00
Christian Kamm a151ebcf11
Account size: restict more, but only increases (#688)
* Account size: Don't fail on unrelated resize

If the account was previously resized to larger than is allowed now,
don't fail unrelated resizes.

* Further reduce account size limits

Out of caution and future-proofing. Can always raise again.

Perp settle pnl needs 6 accounts plus 2 health account lists that could
be nearly fully disjoint.
2023-08-21 14:34:52 +02:00
Christian Kamm b7a0f9bdad Further program changelog additions for v0.19.0 2023-08-19 13:10:03 +02:00
Christian Kamm fb5794fbad Program changelog additions for v0.19.0 2023-08-19 08:21:01 +02:00
Christian Kamm 34a875d968
Restrict account growth (#686)
Because of the 64-accounts-per-tx limit. Making a single account use
more than half of these could be problematic.
2023-08-19 08:20:40 +02:00
Christian Kamm 6fd158ff6c
account_create_v2: fix bad account size (#685) 2023-08-19 08:17:03 +02:00
Lou-Kamades 939cc45bf9
ci: add yarn duplicates check 2023-08-18 10:53:52 -05:00
Christian Kamm 3480b62945
Changelog and version bump for program v0.19.0 (#683) 2023-08-18 15:38:28 +02:00
Christian Kamm 6e9878e31d
Tcs trigger: Avoid building a health cache for expired tcs (#682) 2023-08-18 15:37:59 +02:00
Christian Kamm cbc96fe79f
FlashLoan: Allow mango ix after flash loan end (#681)
This lifts an unnecessary restriction, making it possible to do things
like flash loan and then liquidate with the resulting balances in a
single transaction.

The "no mango ix after FlashLoanEnd" limitation was unnecessary:
After the flash loan ends, the mango accounts are in a valid state
again. And it's impossible to use a two FlashLoanEnd for a single
FlashLoanBegin for the same reason that isolated FlashLoanEnds are
rejected.
2023-08-18 15:37:15 +02:00
Christian Kamm a244c27df6
Add account_create_v2 instruction (#680)
This one allows specifying the number of tcs slots. That way accounts
can be created without needing a separate extend instruction afterwards.
2023-08-18 15:36:36 +02:00
Christian Kamm 072cd766ca
liquidator: parallel tcs execution (#679) 2023-08-18 15:36:02 +02:00
Christian Kamm 0c26977ec9
Merge pull request #677 from blockworks-foundation/ckamm/tcs-net-borrow
Tcs and liquidator and net borrow limits
2023-08-18 15:35:16 +02:00
Lou-Kamades 2460afce85
Merge pull request #662 from blockworks-foundation/lou/estimate-priority-fees
Add estimatePrioritizationFee to the ts client
2023-08-16 15:42:55 -05:00
Adrian Brzeziński 27097faa2f
listing fixes (#678)
* remove listing tools

* adjust stalness slots in trustless instruction
2023-08-15 13:33:48 +02:00
Christian Kamm ad47e9f2e9 tcs liq test: Add net borrow limit test 2023-08-14 16:15:57 +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 727f9a2400 tcs: Change low-health-closure to absolute $1
Health ratio was too expensive to compute on-chain
2023-08-14 16:14:30 +02:00
Christian Kamm 7e804b228f tcs: net borrow checks 2023-08-14 16:14:30 +02:00
Christian Kamm 1dd934f8ad ts: fix stub oracle reading 2023-08-14 15:15:56 +02:00
Christian Kamm 643a997723
Oracles: Fix units of deviation in OracleState (#675) 2023-08-11 16:47:52 +02:00
Lou-Kamades 3b67bfee8a
ts client: estimate priority fees for only write accounts 2023-08-11 09:18:41 -04: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
Lou-Kamades aace8a06e5
TS: add estimatePrioritizationFee 2023-08-10 22:03:41 -04:00
Christian Kamm f462c62816 ts: reuse tcs creation function 2023-08-10 13:48:28 +02:00
Christian Kamm 27dadbb6bc ts: Use tcsCreateV2 2023-08-10 13:39:39 +02:00
Christian Kamm b2e578bc61 Merge remote-tracking branch 'origin/deploy' into dev 2023-08-10 13:32:06 +02:00
Christian Kamm a7705a2a1b
liquidator: Allow overriding compute limit for potentially costly ix (#669) 2023-08-09 15:26:13 +02:00
microwavedcola1 25a90580fd Fix group in script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-09 15:01:19 +02:00
Christian Kamm e4a9a56f89
Pass all params to token_register (#665)
Makes governance a little easier
2023-08-09 13:55:53 +02:00
Maximilian Schneider e4162a8281
Leverage & Balance Sheet helpers (#637) 2023-08-09 13:54:09 +02:00
microwavedcola1 9a2433263d Disallowing PDA token owners currently causes errors when the user wallet is a Smart Wallet (PDA). Fix that
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-09 13:32:03 +02:00
Christian Kamm 6dcd5c925c
FlashLoan swaps: Allow charging a fee (#660)
To give more flexibility to the DAO.

The fee is deducted from any deposits that happen during the flash loan
and controlled per-bank with TokenEdit.
2023-08-09 13:27:25 +02:00
Christian Kamm faa0649c6a Fix program tests after temporary delegate addition 2023-08-09 13:18:28 +02:00
microwavedcola1 8d924a8b9b
Delegate with expiry (#663)
* delegate with expiry

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

* update idl

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>

---------

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-09 12:05:16 +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 4810b6afbc
Tcs: store a display-only intention enum (#667)
This way the ui can know what the user created the tcs order for.

Introduces tcs create and trigger v2 logs.
2023-08-08 18:16:59 +02:00
microwavedcola1 6d83741300 v0.18.14 2023-08-08 15:00:29 +02:00
microwavedcola1 5755480248 threshold price ui helper for tcs in ts client
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-08 14:59:43 +02:00
microwavedcola1 b40a4e7e9e v0.18.13 2023-08-08 14:11:49 +02:00
microwavedcola1 cb3159811c Fix max sell in tcs client code
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-08 14:11:11 +02:00
Christian Kamm 785e6353c1 Fix compile after merges 2023-08-08 10:36:21 +02:00
Christian Kamm 774c67909e
Tcs: Use fees config from Bank instead of Group (#659)
To give more flexibility to the DAO, the maximum tcs fees from
the buy and sell banks will be used.
2023-08-08 10:21:13 +02:00
microwavedcola1 ada933453e v0.18.12 2023-08-08 08:25:00 +02:00