microwavedcola1
3fcb9000a1
wip docker
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-29 11:15:26 +02:00
microwavedcola1
6a95295eba
ts and keeper improvements
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-27 08:55:19 +02:00
microwavedcola1
f2bfb951fd
anchor as submodule ( #121 )
...
* anchor as submodule
* Use anchor submodule as dependency
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>
2022-07-27 08:52:41 +02:00
microwavedcola1
2fb92abad8
Mc/ts upgrade ( #122 )
...
* upgrade anchor fork, supports anchor idl close now
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* upgrade ts deps
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-26 17:14:07 +02:00
microwavedcola1
0b2e1e6e6c
Mc/realloc 4 ( #119 )
...
Realloc + dynamic mango account
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>
2022-07-25 16:07:53 +02:00
Christian Kamm
46b6bce14b
IDL: Remove NodeRef and NodeRefMut enums
...
Anchor cannot load idls that include enums with tuple variants.
2022-07-22 08:35:30 +02:00
Christian Kamm
7c4d052979
ChainData: Fix returning stale data
...
1. Only the CreatedBank message contains the parent and often that was
not the first message received. That confused the data structure,
because it then considered a chain of slots alive that had only a
single slot in it.
Fixed by tracking as "best_chain" only the top slot that actually has
a parent set.
2. OptimisticallyConfirm messages sometimes arrive before CreateBank,
which would change the slot status from Confirmed back to Processed.
Nothing dependend on confirmed vs processed, but it's been fixed
anyway by making slot status only increase confirmation status.
3. Accept account writes for slots newer than the current best_chain
head as alive.
2022-07-21 12:33:03 +02:00
Christian Kamm
ea85824ccb
Remove code copied from solana-address-lookup-table-program
...
This removes the ProgramInstruction enum from the IDL, which was unused
and could break clients.
2022-07-21 06:49:04 +02:00
microwavedcola1
39686d3d0f
CU of test has increased, accomodate only for this test
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-20 15:51:10 +02:00
microwavedcola1
3eae2cdc34
upgrade anchor to latest, upgrade solana dependencies to match what latest anchor uses
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-20 15:51:10 +02:00
Christian Kamm
f8d4b2443c
Liq: Don't log common+expected simulation errors
2022-07-20 09:47:37 +02:00
Christian Kamm
2bff4bba3d
Drop being_liquidated after bankruptcy resolves
2022-07-20 09:47:37 +02:00
Christian Kamm
b5d3e2164c
Make Serum3Info and PerpInfo pub again
...
Accidentally reverted in bad merge
2022-07-20 09:47:37 +02:00
Christian Kamm
999bb4b597
Liq/Keeper: allow --dotenv=<file> arg
...
Makes it easier to run the tools with different configs, without either
passing everything explicitly or making separate directories for .env
files.
2022-07-19 14:57:25 +02:00
Christian Kamm
a82bab4ed7
Better error when vault doesn't have enough funds
...
The spl_token transfer cpi instruction just says "error code: 1", which
is too opaque.
2022-07-19 13:43:05 +02:00
Christian Kamm
7e0e6e4506
Liq: use clap+dotenv instead of toml config file
2022-07-19 11:35:59 +02:00
Christian Kamm
ca8b900913
Liq: explain re-fetching reason
2022-07-18 18:18:57 +02:00
Christian Kamm
348d8cfcd8
Liq/Client: Various improvements
...
- Abstract away account fetching, so it can be done via RPC or from a
websocket stream (or a geyser plugin) that populates a ChainData
instance.
- Separate out information about tokens, markets into MangoGroupContext.
- Separate all gPA calls into functions in a new file
- The liquidator re-fetches critical accounts via RPC before
liquidation. Unfortunately the websocket stream seems slower :/
- Don't re-implement health account derivation in the liquidator.
Instead reuse the existing code from the client.
- More smaller stuff.
2022-07-18 18:18:57 +02:00
Christian Kamm
eee7ed097b
fix getEquivalentNativeUsdcPosition for null TokenPosition
2022-07-18 18:18:57 +02:00
Christian Kamm
b44f628c01
LiqTokenWithToken: More error contexts
2022-07-18 18:18:57 +02:00
Christian Kamm
1be22faf0d
Liq: Fix up max_swap call when liquidator didn't use tokens yet
2022-07-18 18:18:57 +02:00
Christian Kamm
199819f9c6
Rust client: Print simulation log messages
2022-07-18 18:18:57 +02:00
Christian Kamm
45f3e26386
Improve scripts for making a liquidation candidate
2022-07-18 18:18:57 +02:00
Christian Kamm
50f9eb6913
Liq: trigger a full health check after the snapshot
2022-07-18 18:18:57 +02:00
Christian Kamm
4e87c07a9a
Prefer "group" argument to keeper/liquidator
...
The admin keypair doesn't need to be passed in. It's only convenient for
testing.
2022-07-18 18:18:57 +02:00
Christian Kamm
5231ee7f98
Token edit: Fix bug where mintinfo.oracle goes out of sync
2022-07-18 18:18:57 +02:00
Christian Kamm
33d4412ff8
Example scripts: accept GROUP_NUM env var
2022-07-18 18:18:57 +02:00
Christian Kamm
bbca1d8763
Liq: basic liq_token_bankruptcy use
2022-07-18 18:18:57 +02:00
Christian Kamm
74873ad46b
Liq: format, error handling, logging
2022-07-18 18:18:57 +02:00
Christian Kamm
0158239a56
Liquidator: max_liab_transfer based on min health ratio
2022-07-18 18:18:57 +02:00
Christian Kamm
a75e282793
ts: Always increase stack trace limit
2022-07-17 13:26:57 +02:00
Christian Kamm
88a292e656
Health: Add max_swap_for_source function
2022-07-15 10:09:36 +02:00
microwavedcola1
b3c30eeff1
Update mangoAccount.ts
2022-07-14 15:01:10 +02:00
microwavedcola1
227eda9844
Fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 14:29:44 +02:00
microwavedcola1
62bc3649d7
off by default
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 14:01:47 +02:00
microwavedcola1
1e903bf32c
fix confusing method name
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 14:00:41 +02:00
microwavedcola1
44daaf6eb8
update
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 10:14:23 +02:00
microwavedcola1
14bb4c8650
update
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 10:13:58 +02:00
microwavedcola1
6b31b6af48
update
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 10:12:47 +02:00
microwavedcola1
3e3b5be078
update
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 10:07:18 +02:00
microwavedcola1
2828fed516
update
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 10:06:22 +02:00
microwavedcola1
42a1774d01
Merge branch 'main' into dev
...
--wip-- [skip ci]
2022-07-14 10:05:56 +02:00
microwavedcola1
bc50b61afb
update
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 10:05:43 +02:00
microwavedcola1
fdda9c7a2e
update
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 10:03:36 +02:00
microwavedcola1
01c3f9173b
update
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 09:56:22 +02:00
microwavedcola1
4d6d356b42
update changelog
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 09:54:12 +02:00
microwavedcola1
ba3cf21e29
deposit
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 09:47:42 +02:00
microwavedcola1
e00f189687
log format
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 09:37:11 +02:00
microwavedcola1
db93aeaa32
Fix params
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 09:32:56 +02:00
microwavedcola1
fcd373656b
update idl
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-14 08:53:35 +02:00