microwavedcola1
f68a11145f
Filter by account
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-19 09:42:05 +01:00
tjs
2a906af95c
Merge branch 'main' into dev
2022-12-17 14:32:11 -05: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
microwavedcola1
ff37b21777
Changelog
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-16 16:41:55 +01:00
microwavedcola1
246b3a351d
Merge branch 'dev'
2022-12-16 16:38:33 +01: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
Christian Kamm
1c36b1b493
Fix rust test compilation
2022-12-16 13:07:19 +01:00
tjs
237ecd3847
support passing ALT in marginTrade client fn
2022-12-15 17:26:08 -05: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
microwavedcola1
4169ccb960
enforce min vault to deposits ratio in flash loan and serum3 place order, in addition to token_withdraw ( #338 )
...
* refactor
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Enforce min vault to deposits ratio in flash loan and serum3 place order
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* refactor
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* refactor
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 18:27:22 +01:00
microwavedcola1
c396e1219a
Mc/crank update ( #339 )
...
* keeper: only add mango acocunts once
* format
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* format
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>
* format
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-15 16:42:00 +01:00
Adrian Brzeziński
1125002ba3
make settle funds serum3 ix
2022-12-15 13:41:45 +01:00
microwavedcola1
74ce413482
set
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-15 11:44:19 +01:00
Adrian Brzeziński
f31ef4642d
Merge branch 'feature/modify-order'
2022-12-15 11:30:20 +01:00
microwavedcola1
20d63d4d4f
remove accidental disabling
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-15 11:27:40 +01:00
microwavedcola1
a8f3179323
keeper: only add mango acocunt once if self trade
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-15 11:24:55 +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
37479a159d
idl deploy workaround, reduce size by cutting largest fields i.e. docs ( #334 )
...
* idl deploy workaround, reduce size by cutting largest fields i.e. docs
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>
2022-12-14 09:55:25 +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
Christian Kamm
0ed7175341
Upgrade to solana ~1.14.9
...
- Update anchor submodule
- Fork and submodule switchboard-v2 package to update dep
2022-12-13 17:00:57 +01:00
microwavedcola1
c77c3585ad
remove outdated todos
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-12-13 10:29:55 +01:00
tjs
ed86f3b224
Merge branch 'main' into dev
2022-12-13 00:44:27 -05: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
Christian Kamm
e0f50bf0d4
pnl limit: Clean up by adding functions, using it in get-settleable ( #329 )
2022-12-10 17:56:56 +01:00
Christian Kamm
d3db44e7ba
Client: Fix liq health accounts: no duplicate perp markets
2022-12-09 20:43:48 +01:00
Christian Kamm
fe9c92e7ef
Client: Fix ata idempotent creation
2022-12-09 20:43:48 +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