tylersssss
75593925aa
fix buildHealthRemainingAccounts to not modify the mangoAccount obj ( #369 )
2023-01-10 16:51:03 +01:00
tjs
57a563a2c4
include quote token fixes
2023-01-07 17:23:58 -05:00
tjs
9d168f56bd
- fix sort order of open order accounts in buildHealthRemainingAccounts
...
- refactor buildHealthRemainingAccounts to be more idiomatic
2023-01-07 17:06:35 -05:00
tjs
9efe95cc75
fix serum3PlaceOrder logic so health remaining accounts are in order
2023-01-07 00:10:50 -05:00
Adrian Brzeziński
c28f3cd07a
fixes for open order creation when placing order
2023-01-07 03:01:11 +01:00
microwavedcola1
b6996419ad
Merge branch 'dev'
2023-01-06 08:42:54 +01:00
microwavedcola1
e34f9be60a
Apply loan origination fee only on loans ( #364 )
...
* Apply loan origination fee only on loans
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-01-06 08:42:16 +01:00
microwavedcola1
85a33bde5b
setup fast listing admin required for trustless tokens
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-01-05 20:24:58 +01:00
microwavedcola1
a911a861f9
Merge branch 'dev'
2023-01-05 20:14:26 +01:00
microwavedcola1
292cc9a450
bonk ( #363 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-01-05 20:08:45 +01:00
tjs
65a31bcd5c
use the non deprecated prioritization fee ix
2023-01-05 12:58:20 -05:00
Adrian Brzeziński
e4f238f489
combine open orders create with place order ( #362 )
...
* wip
* place order fix
* fixes
* comment
* cleanup
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
2023-01-05 08:31:07 +01:00
Adrian Brzeziński
068fad98f7
combine open orders create with place order ( #362 )
...
* wip
* place order fix
* fixes
* comment
* cleanup
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
2023-01-05 08:30:15 +01:00
microwavedcola1
5019864b84
Update script to include perp market to reduce only
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-01-04 16:55:01 +01:00
microwavedcola1
5b41ff89a0
Update script to include perp market to reduce only
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-01-04 16:54:28 +01:00
microwavedcola1
3ab8c6072a
add reduce only field on ts classes
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-01-04 13:14:05 +01:00
microwavedcola1
86c9331647
reduce only order type and mode for tokens and perp markets ( #353 )
...
* reduce only order type and mode for tokens and perp markets
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* tests
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* remove token
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* fixes
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-01-04 09:24:40 +01:00
microwavedcola1
b174ee13cc
update script for alts and new admin change
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-01-04 07:42:19 +01:00
tjs
ae615b7473
Merge branch 'main' into dev
2023-01-03 19:56:45 -05:00
tjs
57040b160a
use passed in prioritization fee
2023-01-03 19:56:33 -05:00
tjs
92f92cb967
Merge branch 'main' into dev
2023-01-02 15:36:08 -05:00
tjs
80f94166bd
add prioritization fee instruction
2023-01-02 15:35:39 -05:00
riordanp
89c024e9df
Setup MM for Heroku deployments ( #358 )
...
* Setup mm for heroku
* Update params
* Update Procfile
* Fix runtime dependencies
* Run linter
2023-01-02 19:21:08 +00:00
tjs
b0164113f0
support healthtype of undefined to calculate with a weight of 1
2022-12-30 15:26:53 -05:00
tjs
d2ed61328a
settle serum after placing order
2022-12-27 18:50:29 -05:00
microwavedcola1
f72c3cd0ae
Fix typings
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-27 08:26:19 +01:00
microwavedcola1
44fb1037cf
Mc/serum fees ( #350 )
...
* maker rebate shouldnt be applied to maxQuoteQuantity
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* update
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* update
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* fix
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-21 10:21:24 +01:00
microwavedcola1
5def04f6ee
add price band helper ( #349 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-20 19:19:18 +01:00
microwavedcola1
ebeb2328b9
force close mango account script
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-20 10:32:33 +01:00
tjs
48b5b81a09
script to add spot market
2022-12-19 20:30:47 -05:00
microwavedcola1
0ba51e6324
move to new authority and admin
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-19 19:50:09 +01:00
microwavedcola1
f3dac89d3e
Fix bug in getMaxBaseForSerum3AskUi where base returned was wrong
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-19 18:30:26 +01:00
microwavedcola1
31f56d0e41
Fix BN creation ( #342 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-19 15:40:14 +01:00
microwavedcola1
6e8f6596e7
rename
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-19 14:46:39 +01:00
Christian Kamm
7231ceea53
ts client: Fix avg entry price and break even price
2022-12-19 13:34:20 +01:00
microwavedcola1
f68a11145f
Filter by account
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-19 09:42:05 +01:00
tjs
13f32c8bae
assume taker fees
2022-12-17 14:08:48 -05:00
tjs
08cc99790c
needs parenthesis in maxQuoteQuantity
2022-12-17 13:06:48 -05:00
tjs
9b0db13c10
fix maxQuoteQuantity in placeSpotOrder
2022-12-17 13:01:57 -05:00
Christian Kamm
071dc34ccc
Client: Rework max_swap function ( #340 )
...
* Client: Rework max_swap function
Determining the amounts at which the health function changes slope
becomes too difficult when serum3 open orders come in.
Instead, generally find the function's maximum and then work with that.
* max_swap: Add test for swapping into a trustless token
* ts port
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-16 16:33:37 +01:00
Christian Kamm
5a38506f04
Liquidator, liqtest and rust client fixes ( #336 )
...
Liquidator, liqtest and rust client fixes
- Make rust MangoClient fully async
- Update and improve liquidation test setup scripts
- Update liquidator to use versioned transactions
- Update liquidator to use mango and jupiter account lookup tables
- Use jupiter v4 api to get versioned transactions
Perp liquidation is still not fully good. See discussion aboult perp_liq_pnl_with_token.
2022-12-16 13:10:46 +01:00
tjs
5df60b48d9
support passing ALT in marginTrade client fn
2022-12-15 17:22:10 -05:00
tjs
95e8bf2d2c
Merge branch 'main' into dev
2022-12-15 15:30:18 -05:00
microwavedcola1
df4a48a558
dont do checks force close flag is used explicitly ( #341 )
...
* dont do checks force close flag is used explicitly
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* comment
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* comment
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix ts
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-15 21:10:56 +01:00
Adrian Brzeziński
5c329f8800
settle funds in serum3 cancel/modify
2022-12-15 20:06:10 +01:00
Adrian Brzeziński
1125002ba3
make settle funds serum3 ix
2022-12-15 13:41:45 +01:00
Adrian Brzeziński
f31ef4642d
Merge branch 'feature/modify-order'
2022-12-15 11:30:20 +01:00
Adrian Brzeziński
89c7ab7498
modify serum3 order
2022-12-15 10:40:45 +01:00
microwavedcola1
309f218c6e
more debugging
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-15 09:41:03 +01:00
microwavedcola1
2b2d777130
debug user small changes
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-14 21:05:05 +01:00
Adrian Brzeziński
8785d007bd
Merge branch 'main' into feature/modify-order
2022-12-14 16:58:55 +01:00
microwavedcola1
5c1304466b
add account number to toString for debugging
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-14 15:50:10 +01:00
microwavedcola1
f781241f90
Fix bug in porting from rust to ts
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-14 15:43:06 +01:00
Adrian Brzeziński
7949ce7d78
modify perp ix
2022-12-14 15:15:35 +01:00
microwavedcola1
2cd8c048f3
bump max iterations in max swap, for edge cases
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-14 14:55:37 +01:00
microwavedcola1
51cded4965
Mc/health max swap with serum effects ( #333 )
...
* rearrange, log before expect
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* rearrange, log before expect
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix test
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* health max swap with serum effects
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* max swap: Fix with serum reserved amounts
* port rust code to ts
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* port tests
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix method call
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>
2022-12-14 09:21:45 +01:00
microwavedcola1
f4942fd674
cap max borrow in withdraw to safety constraint ( #335 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-13 19:41:19 +01:00
microwavedcola1
c77c3585ad
remove outdated todos
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-13 10:29:55 +01:00
tjs
35752ab99b
move calls inside reloadBanks in the group reloadAll fn
2022-12-13 00:44:07 -05:00
microwavedcola1
aa53cb95de
Fix test
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-12 14:54:18 +01:00
microwavedcola1
f745898a40
rearrange, log before expect
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-12 13:10:57 +01:00
microwavedcola1
9c65ea9456
rearrange, log before expect
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-12 13:03:57 +01:00
Christian Kamm
b5691e2381
ts: Fix toUiPrice() ( #332 )
...
For example, the SOL native price of 0.0136 should become the ui price
of 13.6 because SOL decimals are 9.
2022-12-11 17:22:43 +01:00
microwavedcola1
d0c85f14e6
make mm work with mango-perp, deposit some funds into shared wallet mango account, fixed some ts perp issues
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-09 20:23:30 +01:00
Christian Kamm
13f6fe2343
ts: Fix serum3PlaceOrder by passing payerOracle
2022-12-09 14:55:33 +01:00
Christian Kamm
29055199ae
ts: Make oracle arg optional in edit calls
2022-12-09 14:55:33 +01:00
Christian Kamm
a91ff847f2
ts: Fix tokenDeregister() when ATA is missing
2022-12-09 14:55:33 +01:00
Christian Kamm
37060d4192
ts: Fix sendTransaction to work with NodeWallet
2022-12-09 14:55:33 +01:00
microwavedcola1
c773262781
add perp markets
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-09 11:39:00 +01:00
microwavedcola1
9b173e95b5
perp market parameters for vanity address ( #327 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-09 11:16:47 +01:00
microwavedcola1
794f298ded
fix scaling of weights
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-09 06:08:23 +01:00
tjs
82a120df0d
Merge branch 'main' into dev
2022-12-08 17:23:17 -05:00
tjs
1c69d4edbb
default idsSource is get-program-accounts
2022-12-08 17:23:07 -05:00
tjs
af6e10a1cd
fix perp open order deserializing
2022-12-08 15:55:32 -05:00
tjs
b6605bd120
fix perp open order deserializing
2022-12-08 15:53:14 -05:00
Christian Kamm
57e4510b08
Remove mango-macro
2022-12-08 20:48:44 +01:00
Christian Kamm
a29a736ba2
Move src/state/health/ -> src/health/
2022-12-08 20:48:44 +01:00
tjs
227eea81c3
Merge branch 'main' into dev
2022-12-08 14:13:07 -05:00
tjs
fb8eb59355
add back getEquityUi for perp
2022-12-08 14:12:57 -05:00
tjs
cfc121cf1c
Merge branch 'main' into dev
2022-12-08 14:00:28 -05:00
tjs
4fc2b42f99
add back function to parse perp fill events
2022-12-08 14:00:12 -05:00
Christian Kamm
450007d34b
Perp: Drop client order id from LeafNodes ( #323 )
...
This saves 8 bytes and only the FillEvents, FillLogs were populated from
the data.
2022-12-08 19:55:32 +01:00
microwavedcola1
3e7f5487b7
add more info to debug bank scripts
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-08 16:50:11 +01:00
microwavedcola1
c2a0c8c920
fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-08 16:26:12 +01:00
microwavedcola1
d8d0d8e07c
Merge branch 'dev'
2022-12-08 16:05:51 +01:00
microwavedcola1
5cc88b0d97
mainnet setup script for vanity address ( #324 )
...
* mainnet setup script for vanity address
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* rename
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* update
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* update
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* update
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-08 16:04:58 +01:00
Christian Kamm
b66dc7ae80
IDL: Fix missing OrderTreeRoot
2022-12-08 11:22:37 +01:00
microwavedcola1
326515a07f
rename
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-08 10:49:00 +01:00
microwavedcola1
fa815f1c75
switch to new vanity address
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-08 10:23:12 +01:00
microwavedcola1
7d9c3616af
ts client changes ( #320 )
...
* cleanup + small sync with program
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Update lock file
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix tsc errors
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-08 10:16:06 +01:00
tjs
e9bcd0209a
fix settlerOwner in perpSettlePnl
2022-12-07 23:50:37 -05:00
Christian Kamm
947d9b2b60
Split into perp bids and perp asks ( #322 )
...
Separate, smaller accounts that are easy to extend if needed.
2022-12-07 21:03:28 +01:00
microwavedcola1
6aea3f97db
Merge branch 'main' into dev
2022-12-07 11:01:36 +01:00
tjs
660a733a95
divide by quote decimals to get funding rate
2022-12-06 16:41:42 -05:00
tjs
bc4d97d4d1
add confFilter and edit perp script
2022-12-06 10:58:47 -05:00
microwavedcola1
52d7509481
Fix tests
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-06 14:14:58 +01:00
microwavedcola1
dde9ca69e8
sync fields
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-06 14:05:12 +01:00
Christian Kamm
777c1a7804
Rename bank fields, make weight scale limits editable ( #319 )
2022-12-06 09:34:02 +01:00
tjs
20adf76aac
add dotenv for client config vars
2022-12-05 14:48:06 -05:00
tjs
0609adbe70
use quote decimal constant
2022-12-03 14:54:36 -05:00
tjs
55db713862
add getEquityUi
2022-12-03 14:47:01 -05:00
microwavedcola1
fa09c557a1
ts client sync with program ( #311 )
...
mostly health related code
2022-12-02 15:48:43 +01:00
Christian Kamm
c8f1f3c821
Net borrow limits: Limit in quote, not native ( #312 )
...
* Net borrow limits: Limit in quote, not native
* make perp settle limit disableable
2022-12-02 12:24:11 +01:00
Christian Kamm
512eef96ea
Perp pegged orders: Add stub max oracle staleness arg
2022-12-02 08:19:51 +01:00
microwavedcola1
d64d9285f4
limit settleable pnl ( #295 )
...
Co-authored-by: Christian Kamm <mail@ckamm.de>
2022-11-30 13:20:19 +01:00
microwavedcola1
95b03aa5ac
remove filter
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-11-29 10:40:18 +01:00
microwavedcola1
1732a5aff4
net borrow limits ( #301 )
...
* net borrow limits
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* fix client
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix tests
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>
2022-11-25 13:45:17 +01:00
tjs
0192b16d90
slightly better errors
2022-11-21 17:03:11 -05:00
tjs
717d3f7711
use provider connection to fetch switchboard idl
2022-11-21 16:48:35 -05:00
tjs
20ff7c99c6
use sendRawTx in rpc.ts
2022-11-21 14:50:24 -05:00
microwavedcola1
44d0170ea9
mc/settle pnl ts client ( #292 )
...
* oracle peg client support
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>
* perp pnl settle, candidate finder, and example
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-11-21 20:36:13 +01:00
Nicholas Clarke
ff18ad6ba7
Add client function getCumulativeInterest ( #280 )
...
* Add client function getCumulativeInterest
2022-11-21 10:59:26 -08:00
microwavedcola1
d3661bac7b
mc/oracle peg ts client ( #290 )
...
* oracle peg client support
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>
* Fix from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-11-21 19:34:41 +01:00
tjs
ae7acbbc6b
Revert "fix get unsettled funding function"
...
This reverts commit 708ef68b85
.
2022-11-21 12:54:14 -05:00
tjs
708ef68b85
fix get unsettled funding function
2022-11-21 10:47:30 -05:00
tjs
256b948207
parse fill events
2022-11-20 23:50:08 -05:00
tjs
80809c6404
default seq num for load fills
2022-11-20 22:27:29 -05:00
tjs
57b05259f9
copy perp position functions from dev branch
2022-11-20 22:07:15 -05:00
tjs
26d65e9db9
fix mango account client layout
2022-11-20 22:05:09 -05:00
microwavedcola1
d82608ebee
Revert "add support for msrm vault for serum3 discounts ( #285 )"
...
This reverts commit 0a4f7150d6
.
2022-11-20 15:31:16 +01:00
tjs
14e20f9668
fix type error with version txs
2022-11-18 14:22:12 -05:00
conj0iner
39ed94aa87
client additions + extra tests + safety ( #281 )
...
Co-authored-by: Conj0iner <conj0iner@users.noreply.github.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>
2022-11-18 08:58:56 +01:00
tjs
98f0632ef9
prettier format
2022-11-17 22:04:03 -05:00
tjs
679bc05fa8
use switchboard v2 lite client
2022-11-17 13:22:30 -05:00
tjs
c4582b0b76
use spl-token v 0.2.0
2022-11-17 12:51:12 -05:00
tjs
0d2ae7bf7b
remove tx variable in favor of vtx
2022-11-16 09:11:39 -05:00
tjs
96104fc1cd
support versioned txs
2022-11-15 23:10:03 -05:00
tjs
a4c9b953df
sign version tx in wallets
2022-11-15 15:45:48 -05:00
Christian Kamm
58f7ff2e0e
Add staleness param to OracleConfig
...
Since Bank can't expand the existing OracleConfig, add a new one to Bank
and (temporarily!) copy over the old value to the new one in
TokenUpdateIndexAndRate.
Add some reserved space to OracleConfig to make this easier in the
future.
Breaks the PerpMarket and PerpPosition layouts
2022-11-12 12:11:09 +01:00
microwavedcola1
0a4f7150d6
add support for msrm vault for serum3 discounts ( #285 )
...
* add support for msrm vault for serum3 discounts
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix client
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* client support
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* More client code and todos
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* prettoer
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* remove mint, not needed
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-11-09 09:59:42 +01:00
microwavedcola1
e47e17d79f
reduce only flag for perp place order ( #286 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-11-09 09:59:34 +01:00
microwavedcola1
e8ba511c45
mc/flash loan for delegate ( #271 )
...
* flash loan for delegates
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix rust client
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* prettier
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-11-09 09:35:13 +01:00
Christian Kamm
5731ce8faa
Perp oracle peg feature ( #264 )
...
This introduces the ability to use oracle peg orders on perp markets.
This PR has significant non-backwards compatible changes, for example all
order trees are now in a single account instead of separate.
2022-11-08 15:27:56 +01:00
microwavedcola1
446b2e8d66
serum util functions
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-11-04 15:07:26 +00:00
microwavedcola1
85206c46a3
Merge branch 'main' into dev
2022-11-04 14:49:24 +00:00
microwavedcola1
4e12d85d3d
alt for mainnet group 2 ( #282 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-11-04 14:48:26 +00:00
Maximilian Schneider
4d134f266b
reloadAll is now idsSource aware ( #275 )
...
add markets to test SOL quote serum trading
tweak dust leverage so we can test isolated markets and liquidation
add unregister token & market
2022-11-04 14:35:40 +00:00
microwavedcola1
ccc1d43a55
Port new fields on accounts from program to ts client
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-11-02 12:13:29 +00:00
microwavedcola1
cae10bcdae
Merge branch 'dev'
2022-11-02 11:52:43 +00:00
tjs
62b1944b2f
use BN in perp cancel order
2022-11-01 17:37:21 +00:00
tjs
4368b79c03
cancel perp order client fn
2022-11-01 17:19:41 +00:00
Riordan Panayides
c22deb9c25
Run prettier
2022-11-01 11:48:47 +00:00
tjs
032c9d43b0
get serum open orders only for active mkts
2022-10-31 19:08:26 +00:00
tjs
4b6a2973ab
add perp market index to perp order
2022-10-31 17:39:03 +00:00
tjs
2efbc41755
getters for perp order
2022-10-31 17:07:58 +00:00
microwavedcola1
73792dd6ea
fix too aggressively flooring BN math ( #277 )
...
* fix too aggressively flooring BN math
* use i80f48 for division
Co-authored-by: Maximilian Schneider <mail@maximilianschneider.net>
2022-10-28 13:43:24 +02:00
microwavedcola1
cc220f56e3
Revert "fix too aggressively flooring BN math ( #276 )"
...
This reverts commit 28c542be3f
.
2022-10-27 20:53:47 +02:00
Maximilian Schneider
28c542be3f
fix too aggressively flooring BN math ( #276 )
2022-10-27 20:49:19 +02:00
silas
67d25afd02
make prettier happier
2022-10-20 20:01:18 +01:00
silas
9f71cfce4a
eslint
2022-10-18 20:10:20 +01:00
silas
bc3b4adc81
prettier
2022-10-18 20:07:01 +01:00
silas
2e23ccaaec
prettier
2022-10-18 20:05:41 +01:00
silas
fe1b7ab8e8
prettier changes
2022-10-18 19:48:43 +01:00
microwavedcola1
3efebb3ea6
ts: market maker improvements ( #270 )
...
* ts: fix typechecking on scripts
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: market maker round of improvements
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-10-11 09:39:57 +02:00
microwavedcola1
cd8c500be5
ts: fix typechecking on scripts ( #269 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-10-11 09:38:52 +02:00
microwavedcola1
a66177a77e
ts: match client class definitions 1-1 to program state struct definitions ( #268 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-10-11 09:34:02 +02:00
tjs
286563b0ef
add minordersize and ticksize to perpmarket
2022-10-10 18:59:44 -04:00
microwavedcola1
7466123934
ts: fix script
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-10-10 08:07:27 +02:00
conj0iner
1f36054bad
Merge pull request #253 from blockworks-foundation/cj/ts_tests
...
Refactor & improve anchor tests
2022-10-09 00:20:08 +07:00
microwavedcola1
3939d48dc6
ts: fix script
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-10-08 14:32:50 +02:00
Conj0iner
f0ae79b0f7
Refactor TS client anchor tests
2022-10-08 17:48:13 +07:00
tjs
f7787ea828
remove duplicate function
2022-10-07 13:48:12 -04:00
tjs
cfd6fd2ca8
remove unnecessary undefined type returns
2022-10-07 13:48:05 -04:00
tjs
73039e1b39
Merge remote-tracking branch 'origin/dev' into main
2022-10-07 13:21:47 -04:00
tjs
69a0ac32b7
add perp market script
2022-10-07 13:21:25 -04:00
microwavedcola1
8f6fa5134d
ts: comment out, tsc complains
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-10-07 14:05:49 +02:00
microwavedcola1
8e919bb741
ts: perp improvements ( #263 )
...
* ts: perp improvements
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-10-07 13:52:04 +02:00
microwavedcola1
6808171ee3
ts: disable versioned txs for now because wallets dont support them
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-10-07 08:28:05 +02:00
Christian Kamm
f2cc869795
Perps: Prepare for settlement token != oracle token
...
Make sure the setting is available and that the needed accounts are
passed to the perp instructions.
2022-10-06 08:32:58 +02:00
tjs
dd4175b401
add back get serum3marketbypk
2022-10-04 16:35:38 -04:00
tjs
8cdd0233d4
fix merge issues
2022-10-04 15:13:24 -04:00
tjs
56313b6eac
Merge branch 'dev' into main
2022-10-04 14:54:42 -04:00
Christian Kamm
b906e3dc78
Token deposit: Split into signed and permissionless ix
...
Token accounts are a limited resource, so allowing other users to make
use of them can cause problems.
2022-10-02 16:06:39 +02:00
microwavedcola1
bafaf73745
Mc/ts numbers - cleanup usage of all numbers ( #259 )
...
* ts: a higher error tolerance is sufficient
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: move stuff around
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: string representation while printing
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: number cleanup
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: fix tsc errors
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: cleanup creation of I80F48 from BN
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: fixed from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* revert
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: fix from call
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-30 15:07:43 +02:00
microwavedcola1
d1079bb1b9
Mc/ts increase error tolerance for binary search ( #258 )
...
* ts: a higher error tolerance is sufficient
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* program: fix error size
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-30 14:59:12 +02:00
microwavedcola1
a2f4cef940
mc/ts derive and not hardcode size ( #257 )
...
* ts: simplify getOrCreateMangoAccount
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: derive and not hardcode sizes for perp accounts when creating
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: fix script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: remove todo, not relevant anymore
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-30 13:33:21 +02:00
microwavedcola1
4b52d9a072
ts: simplify getOrCreateMangoAccount ( #256 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-30 12:16:24 +02:00
microwavedcola1
c22302a1da
ts client improvement ( #254 )
...
* Perps: Support trusted markets
* ts: health on client side
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: change perp lookup
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: reword error messages, refactor common uses of lookups
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: reformat
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: improve typing
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: fix some todos
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: fix some todos
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: type aliasing
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: remove '| undefined' where not required as return type
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: use trusted market flag for perp health
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>
2022-09-29 15:51:09 +02:00
Christian Kamm
7e180c7b3a
Perps: Support trusted markets
2022-09-29 15:40:31 +02:00
Christian Kamm
8ba52f46c2
Perp settle pnl: incentive for settler ( #252 )
...
This adds three new options to perp markets:
- a flat fee, that is paid for all perp settlements
- given that they exceed the configured min settle amount threshold to
be eligible for fees
- and a fractional fee, that only applies when the benefiting account
has low health and gradually becomes bigger as the account slides
towards liquidation
2022-09-29 12:59:55 +02:00
Nicholas Clarke
01a958cd22
Clarkeni/onchain interest ( #244 )
...
* Onchain interest calculation
* Fix to TokenBalanceLog for token_liq_bankruptcy (was previously using liqee liab position for liqor liab position).
* Log cumulative interest when token position is deactivated.
2022-09-28 23:04:33 -07:00
Christian Kamm
12864e15a6
Merge pull request #245 from blockworks-foundation/ckamm/perp-settle
...
Liquidator: Settle pnl on perp accounts
2022-09-29 07:35:37 +02:00
microwavedcola1
dd83aeb156
ts: ALTs integration
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-28 17:09:59 +02:00
Christian Kamm
15d3a0cdfa
ts client: fix reading perp event queue
2022-09-28 10:48:41 +02:00
Christian Kamm
15d0a98c94
liquidator: settle pnl on liquidatable accounts
2022-09-28 10:48:41 +02:00
Christian Kamm
9cbc352197
liquidator: force-cancel perp orders, liq perp base positions
2022-09-28 10:47:05 +02:00
conj0iner
a97b40a521
Merge pull request #234 from blockworks-foundation/cj/ioc_fees
...
Extra fees for IOC orders
2022-09-28 00:05:25 +08:00
tjs
1380481781
script to view unowned mango account
2022-09-27 11:40:22 -04:00
microwavedcola1
8d86883190
ts: remove debug code
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-27 17:33:51 +02:00
microwavedcola1
b57e50c75b
ts: fix tsc issues
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-27 13:59:00 +02:00
tjs
0def209608
allow fetching mango account by publickey
2022-09-26 17:12:58 -04:00
tjs
3b1ea91903
consistent naming to get serum markets
2022-09-25 21:11:38 -04:00
tjs
92a33a0bf5
return the correct type
2022-09-25 20:27:44 -04:00
tjs
b6bcc55fcb
add type guard
2022-09-25 20:26:02 -04:00
tjs
f486a6c381
helper fn to get serum3 external market
2022-09-25 16:23:43 -04:00
microwavedcola1
b7aa6dbd5d
ts: tiny liabs pushes health ratio beyond what I80F48 can support ( #243 )
...
* ts: tiny liabs pushes health ratio beyond what I80F48 can support
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* add alias
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-24 07:11:57 +02:00
tjs
fa1a483493
func to load serum open orders accts for get balances
2022-09-23 23:14:12 -04:00
Nicholas Clarke
e509a3ae9c
Clarkeni/overall pnl ( #232 )
...
* Add getPNL client function
2022-09-23 11:39:51 -07:00
Nicholas Clarke
1320451e1a
Add serum open orders balance logging. Remove price from token and perp balances. ( #236 )
2022-09-23 10:42:43 -07:00
microwavedcola1
bb6790e678
ts: use price factor in maxSourceForSwap + max perp bid and ask + tests ( #237 )
...
* ts: use price factor in maxSourceForSwap
ts: max perp bid and ask
ts: mocha test for max swap
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: comemnt
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-23 11:43:26 +02:00
Christian Kamm
39bdf20813
ts: Add group.findPerpMarket()
2022-09-23 09:48:35 +02:00
microwavedcola1
4090cf407e
ts: fix max serum bid and ask that can be placed by a mango account ( #241 )
...
* ts: fix getMaxQuoteForSerum3BidUi and getMaxBaseForSerum3AskUi where the zero amount was not tight enough for binary search
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-23 09:34:28 +02:00
microwavedcola1
59bb60c405
ts: fix max serum bid and ask that can be placed by a mango account ( #241 )
...
* ts: fix getMaxQuoteForSerum3BidUi and getMaxBaseForSerum3AskUi where the zero amount was not tight enough for binary search
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-23 09:34:08 +02:00
Christian Kamm
ecbd4028f7
ts client: Fix remaining accounts when opening a perp position
2022-09-23 08:42:01 +02:00
Conj0iner
a8ae59f0fe
IDL and client changes
2022-09-23 01:03:45 +08:00
Christian Kamm
96218fb7ba
Update IDL and merge issue fixups
2022-09-21 10:19:23 +02:00
Christian Kamm
52f8b61240
Merge remote-tracking branch 'origin/dev'
2022-09-21 10:14:34 +02:00
Christian Kamm
a41a245e24
PerpLiqBankruptcy instruction
2022-09-21 09:46:54 +02:00
conj0iner
1c67b8ed5f
remove base_token_index from perps and include oracles ( #224 )
...
Co-authored-by: Conj0iner <conj0iner@users.noreply.github.com>
2022-09-21 09:42:45 +02:00
microwavedcola1
f96b9ded0d
ts: fix event queue rawevents
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-20 19:50:21 +02:00
Christian Kamm
8c91541d12
ts client: Fix serum3DeregisterMarket
...
The indexReservation arg wasn't passed.
2022-09-20 16:58:07 +02:00
Christian Kamm
6399e6cb6c
Fix PerpMarket data layout breakage
...
The new fees_settled must be added at the end and the reserved amount
needs to be reduced.
2022-09-20 16:58:07 +02:00
Christian Kamm
347b225480
TokenEdit: remove bank_num arg
2022-09-20 14:22:25 +02:00
microwavedcola1
b7e79a4663
WIP: ts/perps ( #220 )
...
* ts: further fleshing out of perps code
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* cleanup scripts
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fixes from reviews
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-20 12:57:01 +02:00
Christian Kamm
1b3a2b07db
Update idl
2022-09-15 09:24:35 +02:00
Christian Kamm
899b51e91c
ts: fix getMaxWithdrawWithBorrowForToken
2022-09-14 10:23:06 -04:00
Christian Kamm
3e94ff4605
ts: fix getMaxWithdrawWithBorrowForToken
2022-09-14 09:03:29 +02:00
tjs
2b96965cc5
use send transaction in client
2022-09-14 01:44:00 -04:00
tjs
fc63328af1
set lastValidBlockHeight for tx confirmation
2022-09-05 17:36:42 -04:00
tjs
27c42e70e9
reload mango account with slot
2022-09-05 12:31:57 -04: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
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
22dc07df1d
Liquidation test: Fix scripts
2022-09-02 10:22:35 +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
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
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
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
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
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
microwavedcola1
4a1865be6c
Merge branch 'main' into dev
2022-08-31 11:35:19 +02:00
microwavedcola1
2fb569cc75
make script net agnostic
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-30 17:01:17 +02:00
Christian Kamm
e0437305ee
SerumPlaceOrder: Only pass the payer bank/vault
2022-08-30 12:05:07 +02:00
Christian Kamm
36723792a1
SerumRegister: Block using the same market index twice
2022-08-30 12:05:07 +02:00