Commit Graph

1239 Commits

Author SHA1 Message Date
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 8dcedfb501 bump pkg v 2022-11-17 22:04:53 -05:00
tjs 98f0632ef9 prettier format 2022-11-17 22:04:03 -05:00
tjs 1c70988068 remove reference to yarn 2022-11-17 15:23:53 -05:00
tjs 4a62912284 hardcode spl-token version 2022-11-17 14:38:30 -05:00
tjs 8b128c9cfd use latest spl-token pkg 2022-11-17 13:24:11 -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 4649774347 add back web3.js pkg resolution 2022-11-17 10:51:20 -05:00
Christian Kamm 19e2b86394
Merge pull request #296 from blockworks-foundation/ckamm/perp-ordertree-price
Perp: Remove misleading LeafNode::price()
2022-11-17 10:36:10 +01:00
tjs 96f707e96d fix pkg json 2022-11-16 23:51:44 -05:00
Christian Kamm 3ccfa3241f Perp: Remove misleading LeafNode::price() 2022-11-16 15:53:07 +01:00
tjs 0d2ae7bf7b remove tx variable in favor of vtx 2022-11-16 09:11:39 -05:00
riordanp 5d780a86dc
Upgrade to Solana 1.10.35 (#291)
* 1.10.35 upgrade & compatibility

* Patch Anchor

* Fix test compile

* Serum program update

Co-authored-by: Christian Kamm <mail@ckamm.de>
2022-11-16 10:50:40 +00:00
Christian Kamm 1026b2bb85 benchmark improvements 2022-11-16 11:14:46 +01:00
tjs 60419411dc Merge branch 'ts/tx-v2' into main 2022-11-15 23:10:20 -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 e5558f8baa
Merge pull request #288 from blockworks-foundation/ckamm/oracle-staleness
Add staleness param to OracleConfig
2022-11-12 12:15:23 +01:00
Christian Kamm 2ee152f7ea Oracle staleness: Check when accessing oracle price 2022-11-12 12:12:45 +01: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
Christian Kamm f5e47c47bd Clarification of price_data for pegged orders 2022-11-11 08:18:53 +01:00
Christian Kamm b6361bad37
PerpUpdateFunding: update automatically on PerpPlaceOrder (#287) 2022-11-10 14:41:20 +01:00
Christian Kamm efec1eb906 Test fixes 2022-11-09 10:51:03 +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 7da421ea1c Fix client and keeper for new perp orderbooks 2022-11-09 09:32:32 +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
Riordan Panayides 2b8e976956 Allow manual docker builds 2022-11-05 13:10:34 +00:00
Riordan Panayides fcfb1e8823 Force build 2022-11-05 13:08:03 +00:00
Riordan Panayides 813fc0996a Run docker build on program changes 2022-11-05 13:05:30 +00:00
Riordan Panayides a0cb6be83f Run action on updates 2022-11-04 17:32:06 +00:00
Riordan Panayides 2b694e553f Merge branch 'dev' of github.com:blockworks-foundation/mango-v4 into dev 2022-11-04 17:21:44 +00:00
Riordan Panayides 014953f30a Restrict docker build paths, run build on main 2022-11-04 17:21:38 +00:00
riordanp e6c6820f1f
Merge pull request #284 from blockworks-foundation/pan/liquidator-improvements
Liquidator bug fixes
2022-11-04 17:12:29 +00:00
Riordan Panayides 4fb715bab6 Update vulnerable package lz4-sys 2022-11-04 17:09:35 +00:00
Riordan Panayides 16c38975d5 Fix typo 2022-11-04 17:03:59 +00: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 2b5527e0b0 Merge branch 'main' into dev 2022-11-04 14:31:34 +00:00
riordanp df1c2782f1
Use cargo-chef for dependency caching in docker build (#278)
* Try cargo chef for caching build deps in docker

* Run docker build on pan/cargo-chef

* Replace before cheffing

* Fix serum_dex conflict

* Only build what's needed and only once

* Fix typo

* Force liquidator rebuild

* Upgrade vulnerable package lz4-sys

* Revert "Force liquidator rebuild"

This reverts commit c169779542.

* Revert "Temporarily run docker build on branch"

This reverts commit 63ee27eb1e.
2022-11-04 14:30:31 +00:00
Riordan Panayides 21e4b080e3 Fix incorrect open orders start index 2022-11-02 17:13:25 +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