microwavedcola1
d59d05eae5
default group is group num 2 on mainnet
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-13 20:10:49 +02:00
microwavedcola1
5221bbd53b
Merge branch 'dev'
...
--wip-- [skip ci]
2022-08-13 19:55:37 +02:00
Christian Kamm
ccba4ee597
Cleanups and bugfixes from the audit ( #163 )
...
* AccountExpand: cleanups from audit
* Group instructions: cleanups from audit
* AccountClose: cleanups from audit
* TokenAddBank: Audit fixes, including significant bugs
Must not take collected_fees and bump from the existing bank.
* Instruction comment updates
* GroupEdit: Add version/testing flag changes
Ported from mc/vanity
2022-08-13 19:54:58 +02:00
microwavedcola1
41e42da620
debug banks helper script
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-13 19:36:09 +02:00
Christian Kamm
21815612ae
Let all PDA seeds start with a unique prefix ( #166 )
...
This is mostly paranoia. Now it's guaranteed that different PDA types
have unique seeds.
2022-08-13 19:30:35 +02:00
tjs
d68951e77d
add custom sendTransaction to support post send callbacks
2022-08-12 17:15:12 -07:00
microwavedcola1
261c856bb2
reduce max source swap targetError so that we dont error out
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-12 11:08:08 +02:00
microwavedcola1
a484aed42b
simulate on non existent token positions ( #162 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-12 11:05:39 +02:00
microwavedcola1
164303e005
uncomment
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-12 10:21:06 +02:00
microwavedcola1
00c533d9d7
Merge branch 'dev'
2022-08-12 08:31:20 +02:00
microwavedcola1
4f25742b26
simHealthWithTokenPositionChanges -> simHealthRatioWithTokenPositionChanges
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-12 08:30:13 +02:00
tjs
ac0155b79d
fix for simHealthWithTokenPositionChanges
...
needs to keep track of health changes in the loop
2022-08-11 16:43:46 -07:00
Christian Kamm
92a37f23ed
Remove is_bankrupt
...
Instead, check for any liquidatable assets in liq_token_bankruptcy.
Bankrupt accounts may use the same operations as any other
negative-health account.
2022-08-11 22:57:53 +02:00
tjs
4507a6a72a
health ratio ui function
2022-08-11 12:06:01 -07:00
microwavedcola1
5402012064
apply loan origination fee buffer
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-11 17:59:49 +02:00
microwavedcola1
185b077285
remove stray log
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-11 17:48:43 +02:00
microwavedcola1
eee10a22bb
mc/max swap ( #159 )
...
* rework getMaxSourceForTokenSwap
* Fix assets and liabs method
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-11 17:44:12 +02:00
Christian Kamm
7dc3fc2ad9
Merge remote-tracking branch 'origin/main' into dev
2022-08-10 17:18:42 +02:00
microwavedcola1
cfdd59379e
improve logging
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-10 17:17:16 +02:00
Christian Kamm
2f3c5e281c
ts: prettier
2022-08-10 16:25:06 +02:00
Christian Kamm
38f5502dc7
Liquidator: round up when paying back borrows to close token pos
2022-08-10 16:24:48 +02:00
Christian Kamm
6d8290bebd
ts: script to decode anchor events
2022-08-10 16:22:58 +02:00
Christian Kamm
ad3cee5568
ts: improve liqtest scripts
2022-08-10 16:22:58 +02:00
Christian Kamm
222358ff14
ts: script to make liquidation candidates
2022-08-10 16:22:58 +02:00
Christian Kamm
79e3b2db98
ts: disable loan fees in liq tests
2022-08-10 16:22:58 +02:00
Christian Kamm
68c52dbdc8
ts: Settle and close in script, including borrows
2022-08-10 16:22:58 +02:00
Christian Kamm
3257017770
ts: client and script fixes
2022-08-10 16:22:56 +02:00
Christian Kamm
55e891417e
ts: also close accounts after withdraws
2022-08-10 16:20:25 +02:00
Christian Kamm
45327e7dd1
ts: script to withdraw everything, to lose fewer funds on close
2022-08-10 16:20:25 +02:00
Christian Kamm
b2056c82e0
ts: script to add funds to liqtest group
2022-08-10 16:20:25 +02:00
Christian Kamm
aff011c774
ts: script to create liqtest group with stub oracles
2022-08-10 16:20:25 +02:00
Christian Kamm
29c7d5b45a
ts: mb-admin-close script closes all groups for the key
2022-08-10 16:20:23 +02:00
microwavedcola1
5c34b60105
Fix health account builder code
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-10 10:15:28 +02:00
microwavedcola1
68de248c5b
fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-10 09:31:58 +02:00
microwavedcola1
476241e8b8
fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-10 09:29:08 +02:00
microwavedcola1
2728aaeb2d
revamp script
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-10 09:26:16 +02:00
microwavedcola1
d6468082b6
Merge branch 'dev'
2022-08-10 09:08:11 +02:00
microwavedcola1
8b086b3e87
more logging
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-10 08:22:31 +02:00
microwavedcola1
e0c57af53f
some debugging scripts
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-10 07:32:21 +02:00
tjs
85bb7e3a25
add idempotent ata ix to withdraw fn
2022-08-09 18:16:08 -07:00
tjs
e2acd28de9
use idempotentata instruction in marginTrade
2022-08-09 15:27:34 -07:00
microwavedcola1
970187af41
rename env vars ( #154 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-09 13:50:37 +02:00
tjs
49538df6ab
skippreflight on accountCreate
2022-08-08 16:14:30 -07:00
microwavedcola1
9ded7ca007
optional args should be sent as null
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-08 21:04:49 +02:00
microwavedcola1
c3b6db4a3c
optional args should be sent as null
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-08 21:04:19 +02:00
microwavedcola1
c490ab6965
update changelog and IDL
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-08 19:06:13 +02:00
microwavedcola1
d8340ba594
update idl
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-08 17:07:57 +02:00
microwavedcola1
24c359ef92
keeper token rate update - group multiple ixs into one ( #151 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-08 13:40:33 +02:00
microwavedcola1
4f72985f2d
also allow editing group insurance fund ( #149 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-07 14:16:23 +02:00
microwavedcola1
e06736660a
remove account size, make mango account feature position counts explicit ( #148 )
...
* remove account size from program, make position counts explicit
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* cargo-fix
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-07 14:16:06 +02:00