microwavedcola1
a44120c470
add group to mintinfo, for better gpa support
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-03 19:07:43 +02:00
microwavedcola1
e6727cbfae
fix clippy warning
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-03 06:21:34 +02:00
microwavedcola1
7803cae654
fix clippy warning
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-03 06:16:41 +02:00
microwavedcola1
dfd1dc5216
fix clippy warning
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-03 06:11:41 +02:00
microwavedcola1
204ab6963d
checked math
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-03 06:09:01 +02:00
microwavedcola1
d6fe317ac9
checked math
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-03 06:06:03 +02:00
microwavedcola1
9debc63a6a
update idl, add tokenmint to stuboracle for gpa ( #34 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-03 05:43:32 +02:00
microwavedcola1
884d638e36
Merge pull request #33 from blockworks-foundation/mc/stub-oracle-ext
...
Mc/stub oracle ext
2022-04-03 05:36:24 +02:00
microwavedcola1
ace5df2a85
revert unintended changes
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-03 05:21:16 +02:00
microwavedcola1
d7a8c5c91d
add todo
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-02 21:04:00 +02:00
microwavedcola1
77ddbd4eeb
fix test
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-02 21:02:48 +02:00
microwavedcola1
c7d3103e6b
--wip-- [skip ci]
2022-04-02 20:42:17 +02:00
microwavedcola1
4d1a9e4556
refactor
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-02 20:15:56 +02:00
Christian Kamm
9f0a7f67ae
Orderbook: Port over unittests
2022-04-02 13:51:26 +02:00
Christian Kamm
cbc3cc7bbd
MangoAccount: Rename how tokens/serum3/perps data is stored
...
token_account_map -> tokens
serum3_account_map -> serum3
perp -> perps
2022-04-02 13:51:26 +02:00
microwavedcola1
1d15db37c5
clippy
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-02 10:02:12 +02:00
microwavedcola1
9cd08a1355
improve checks
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-02 09:52:40 +02:00
microwavedcola1
87bcc538cd
compiles
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-02 09:05:31 +02:00
microwavedcola1
0bdbd19ddd
Make Serum3 ix anchor friendly
...
Make work with changes in mango account, add no deploy part to release script
Clippy
Fixes from cr
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-02 08:59:07 +02:00
Christian Kamm
d26caf1c87
Perp: Rename fields to be explicit about being in lots
2022-04-01 15:47:12 +02:00
Christian Kamm
f2607889e3
Perps: Place accounts and open orders in MangoAccount::perp
...
Also make test_perp succeed by fixing the FillEvent size.
2022-04-01 12:45:01 +02:00
Christian Kamm
f48a7f5ed9
Clippy: Address issues
2022-04-01 12:21:19 +02:00
Christian Kamm
833a909aa4
Orderbook: unify new_bid/new_ask
2022-04-01 12:21:19 +02:00
Christian Kamm
6505abcd54
Side: Make inversion function be associated
2022-04-01 12:21:19 +02:00
Christian Kamm
10ab9804d1
Rename perp instructions to have perp_ prefix
2022-04-01 08:01:56 +02:00
Christian Kamm
8038f9e257
Add CloseAccount instruction to make testing easier
2022-03-31 17:22:56 +02:00
microwavedcola1
9e2d5de914
add gt 0 checks
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-31 16:02:18 +02:00
microwavedcola1
78df0082c4
Some progress on initial ts example
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-31 15:58:18 +02:00
Christian Kamm
56e3bd8740
Rearrange accounts to avoid padding bytes
2022-03-31 14:37:05 +02:00
Christian Kamm
9cf4f1a748
Rearrange MangoAccount to avoid padding bytes
2022-03-31 14:01:08 +02:00
Christian Kamm
85b0b420d4
Disable address lookup tables
...
Because the ALT program isn't available on devnet yet, so prohibits
testing there.
2022-03-31 09:25:47 +02:00
microwavedcola1
795fa532da
update program, and deploy to devnet
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-30 17:16:32 +02:00
microwavedcola1
faba5c47bf
remove unwanted code
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-30 17:03:56 +02:00
microwavedcola1
46cb811c99
Merge branch 'mc/consume_events'
2022-03-30 13:22:31 +02:00
Christian Kamm
afbfd3b7f9
serum3_register_market: better validation
...
Previously we just trusted the base and quote token index to be correct,
now the appropriate banks are validated.
2022-03-30 12:24:49 +02:00
Christian Kamm
babbff6bec
Add is_bankrupt check to most instructions
2022-03-30 12:24:49 +02:00
microwavedcola1
00ac0dfce9
comments and test
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-30 11:58:45 +02:00
Christian Kamm
14d4147efa
liq test: Cover more cases
2022-03-30 09:37:31 +02:00
Christian Kamm
d6ebffd346
liq: functionality fixes and test
2022-03-29 17:47:19 +02:00
Christian Kamm
69426d6d96
liq: Introduce HealthCache to get init/maint health after liquidation
...
The concept only works if all serum3 open orders have been fully
cancelled and settled.
2022-03-29 09:18:13 +02:00
microwavedcola1
64e3ba0d7c
--wip-- [skip ci]
2022-03-28 21:13:16 +02:00
Christian Kamm
a6ff388e20
health: avoid divisions, reducing compute needs
2022-03-27 14:47:42 +02:00
Christian Kamm
d9ac178481
liq token: Adjust fee handling
...
Use the sum of the fees configured for the tokens.
2022-03-27 14:47:42 +02:00
Christian Kamm
82819720e0
liq token: progress
...
Change bank.deposit()/withdraw() to work with I80F48 values so we don't
need to round during liquidation.
2022-03-27 14:46:51 +02:00
Christian Kamm
c391c29347
liq token: Instruction outline
2022-03-27 14:46:51 +02:00
microwavedcola1
b139f6beab
ask example test
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-26 17:27:50 +01:00
microwavedcola1
b851dd13ad
add new ask
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-26 17:06:55 +01:00
microwavedcola1
c83be301e4
extend
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-26 06:41:39 +01:00
microwavedcola1
1e5a6f90bc
extend
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-26 06:37:32 +01:00
microwavedcola1
223179b278
basic test to measure cu
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-26 06:16:52 +01:00