Christian Kamm
4795286dbd
Perps: Account for unsettled funding in health
2022-09-07 11:37:20 +02:00
Christian Kamm
c714fb213d
Tests: Auto-advance the slot after sending a transaction
...
This fixes a recurring error where it would look as if a transaction you
send would not be processed at all.
2022-09-07 11:34:47 +02:00
Christian Kamm
3128115dca
PerpMarket: Add helper for getting oracle price
2022-09-06 14:26:06 +02:00
Christian Kamm
79a7bdc299
Checked math: support cm!(a += b)
2022-09-06 08:55:27 +02:00
tjs
fc63328af1
set lastValidBlockHeight for tx confirmation
2022-09-05 17:36:42 -04:00
tjshipe
3e462c5530
Merge pull request #214 from blockworks-foundation/ts/reload-slot
...
reload mango account with slot
2022-09-05 14:06:36 -04:00
Christian Kamm
3c51449040
Tests: Remove unused imports
2022-09-05 18:40:42 +02:00
tjs
27c42e70e9
reload mango account with slot
2022-09-05 12:31:57 -04:00
conj0iner
2693a20e16
Merge pull request #204 from blockworks-foundation/cj/settle_fees
...
Add perp_settle_fees instruction
2022-09-05 23:30:55 +08:00
Conj0iner
c34ee54233
Added perp_settle_fees instruction
2022-09-05 22:18:40 +08:00
tjs
2d0772833b
filter out jupiter token ledger instruction to save space
2022-09-02 18:47:26 -04:00
tjs
c359ce26a7
return new mango account instance from reload
2022-09-02 18:47:09 -04:00
tjs
3f456393a5
use custom sendTransaction in closeMangoAccount
2022-09-02 13:50:01 -04:00
Christian Kamm
3fbc3ca32d
TokenEdit: remove bank_num arg
2022-09-02 13:55:00 +02:00
Christian Kamm
14913c70d2
Merge pull request #210 from blockworks-foundation/ckamm/liq-force-close
...
Liquidate serum open orders
2022-09-02 13:15:42 +02:00
Christian Kamm
b1940eea43
Liquidator: Reduce likelihood of double-sending rebalancing tx
2022-09-02 12:24:28 +02:00
Christian Kamm
ef5552c1c0
Liqtest: Build serum test case
2022-09-02 12:24:18 +02:00
Christian Kamm
90630fa3de
ts client: Enable accounts to have serum slots by default
2022-09-02 12:24:04 +02:00
Christian Kamm
d566db7db0
Liqtest: Settle-and-close settles and closes open serum orders
2022-09-02 12:24:04 +02:00
Christian Kamm
3b3258769f
ts: TokenEdit takes optional arguments
2022-09-02 12:24:04 +02:00
Christian Kamm
8bde9e2bff
Liquidator: Force cancel serum orders
2022-09-02 12:23:59 +02:00
Christian Kamm
22dc07df1d
Liquidation test: Fix scripts
2022-09-02 10:22:35 +02:00
conj0iner
1ed1b684bc
Merge pull request #156 from blockworks-foundation/cj/settle_pnl
...
Added perp_settle_pnl instruction
2022-09-02 00:47:53 +08:00
Conj0iner
97eed4081d
Added perp_settle_pnl instruction
2022-09-02 00:07:57 +08:00
Christian Kamm
511db72f8e
Health token adjustment: Deal with odd I80F48 behavior
...
The identity
a * b = -((-a) * b)
does not hold for I80F48, probably it's rounding to -inf.
This meant that withdrawing the full native token balance could
fail because the magnitude of -position * price was bigger than
position * price.
2022-09-01 14:38:48 +02:00
Christian Kamm
3b93a38395
Merge pull request #208 from blockworks-foundation/ckamm/fix-index-reservation
...
Serum: Index reservation account has 8 bytes
2022-09-01 13:23:27 +02:00
Christian Kamm
868c55fef1
Serum index reservation: use a real account
...
Makes it easier and more future-proof
2022-09-01 12:28:37 +02:00
Christian Kamm
c31f11013f
Serum deregister: Close index reservation account
...
Only safe because this is a testing-only instruction
2022-09-01 12:15:00 +02:00
microwavedcola1
c420d71943
ts: fix withdraw wrapped sol -> sol
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-01 12:11:31 +02:00
Christian Kamm
1f0cd62846
Don't panic if accounts are shorter than 8 bytes
2022-09-01 12:00:09 +02:00
Christian Kamm
5e0001afb8
Serum: Index reservation account has 8 bytes
...
otherwise all code needs to be able to deal with mango accounts that are
smaller than 8 bytes in size.
2022-09-01 11:49:33 +02:00
microwavedcola1
3a1f6f08ee
Merge branch 'dev'
2022-09-01 11:34:42 +02:00
microwavedcola1
0f75baeadd
comment in on demand
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-01 11:27:22 +02:00
microwavedcola1
0222ca8954
ts fixes ( #207 )
...
* ts: use gpa path if rest services has not caught up yet
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: convert wrapped sol to sol when withdrawing
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-01 11:25:58 +02:00
microwavedcola1
149e0eb0c7
Fix client and remove excessive logging in scripts
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-01 10:48:50 +02:00
microwavedcola1
38e3ea672e
changelog
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-01 10:30:24 +02:00
microwavedcola1
2479107d9a
Prepare serum3 release ( #206 )
2022-09-01 10:18:47 +02:00
microwavedcola1
a889e6c206
Fix scripts
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-01 09:56:17 +02:00
microwavedcola1
5ff181d01d
Merge branch 'dev'
2022-09-01 09:52:29 +02:00
microwavedcola1
b30b2f8870
program: serum3 should work when group has version 1, perps and multiple banks should be moved to version 2 or beyond ( #205 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-01 09:48:38 +02:00
microwavedcola1
5f62f15549
mc/i80F48 in-place cleanups ( #203 )
...
* ts: use in place I80F48 wherever applicable
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: dont overwrite I80F48 constants
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-01 09:48:23 +02:00
tjs
8296d660d8
return mangoAccount after reloading
2022-08-31 15:33:07 -04:00
microwavedcola1
0c6cc16023
ts: serum display function for max leverage ( #202 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-31 14:37:45 +02:00
microwavedcola1
cec0fcab99
patch script for strictness
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-31 13:55:15 +02:00
riordanp
4919364d67
Fix keeper dockerfile path
2022-08-31 12:52:30 +01:00
microwavedcola1
5e33c00ec8
Merge branch 'main' into dev
2022-08-31 11:55:54 +02:00
tjshipe
263bc6ff1f
turn on strict null checks and fix issues ( #201 )
2022-08-31 11:41:12 +02:00
microwavedcola1
42f22003d8
deployment script for vanity ( #184 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-31 11:40:39 +02:00
riordanp
3cca63c735
Docker CI Improvements ( #195 )
...
* Push separate images for binaries to GCR
* Add base image version arg to heroku deployment
* Test docker build
* Try setting mode
* Fix tags
* switch back to dev
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-31 11:37:58 +02:00
microwavedcola1
c66dd882b6
ts: Additional serum3 support ( #196 )
...
* get bids and asks for a user on a serum3 market
* get orderbook for a market
* get max bid or ask that a user can place for a market
* simulate health if a bid or ask were to be placed
misc:
* fix remaining accounts list for health when placing perp bids
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
format
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
format
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
remove testing code
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>
script adjustment
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
comments
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-31 11:36:44 +02:00