Commit Graph

2101 Commits

Author SHA1 Message Date
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
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 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
microwavedcola1 f46c633a4f Fix max number
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-08 08:24:20 +02:00
Christian Kamm 4f810edebc
Allow token withdraws/deposits even with stale oracles (#646) 2023-08-07 16:15:45 +02:00
microwavedcola1 688a632d53 v0.18.11 2023-08-07 13:14:26 +02:00
microwavedcola1 4c083a9a56
ts client: fix getMaxWithdrawWithBorrowForToken (#664)
* fix max withdraw amount, wasnt taking into account scaled weights

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-07 13:12:37 +02:00
microwavedcola1 a7247ad7e7 fix ts calls
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-07 13:11:23 +02:00
microwavedcola1 776545fcdd
token conditional swaps, fixes from review (#653)
* tcs fixes from review, and easy to use helper functions

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

---------

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-07 13:09:19 +02:00
microwavedcola1 a6b6fbbb82 fix ts calls
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-07 11:36:13 +02:00
microwavedcola1 66786410c3 v0.18.9 2023-08-07 09:35:57 +02:00
microwavedcola1 43580ca26a expose idl
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-07 09:35:09 +02:00
microwavedcola1 3356c45d5a v0.18.8 2023-08-04 20:00:11 +02:00
microwavedcola1 14a2821d87 Revert "https://github.com/blockworks-foundation/mango-v4/pull/651 make transaction compatible with smart wallets"
This reverts commit ad5d0e3054.
2023-08-04 19:59:04 +02:00
microwavedcola1 02f840cb94 v0.18.7 2023-08-04 11:30:14 +02:00
microwavedcola1 ad5d0e3054 https://github.com/blockworks-foundation/mango-v4/pull/651 make transaction compatible with smart wallets
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-04 11:29:26 +02:00
Lou-Kamades 98cbf2df59
Merge pull request #652 from blockworks-foundation/lou/token-conditional-logs 2023-08-03 12:30:40 -05:00
Christian Kamm e383ce8171
Idl check: Also check struct and enum types (#657) 2023-08-03 17:22:52 +02:00
Christian Kamm 44f0f4ffa3
Clippy fixes (#656) 2023-08-03 13:27:04 +02:00
Christian Kamm 1be38d14cb
Tcs: Add price display style enum (#654)
Tcs orders always store prices in a fixed "sell per buy" style, but users
can create them in either price direction. When they look at them later,
the ui needs to know what their preferred style is for this order.
2023-08-03 12:37:01 +02:00
Christian Kamm 06f6d75b98
Fix typo in admin_token_withdraw_fees ix (#655) 2023-08-03 12:34:33 +02:00
microwavedcola1 fcf2cbbbb6 Extend changelog
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-03 09:12:49 +02:00
Lou-Kamades 55a3a28ad7
use indexed position in token conditional balance logs 2023-08-01 18:33:21 -07:00
microwavedcola1 216d105ebd v0.18.6 2023-07-31 14:55:27 +02:00