Commit Graph

5 Commits

Author SHA1 Message Date
dafyddd 19783284eb
Dd/max markets (#26)
* maker and taker both executing async on event queue now

* Updated liquidate function to properly update open interest

* implemented socialize loss for perp market bankruptcy

* implemented socialize loss for perp market bankruptcy

* implemented settle_fees; upgraded to 1.7.3

* resolve_token_bankruptcy done

* moved interest rate function params into RootBank and added set_rate_params

* Added dao vault to init_mango_group

* added force_cancel_spot_orders

* Wire up liquidate instructions, fix compiler warning

* Added force cancenl perp orders; fixed stack error with inline(never)

* fixed withdraw function

* fixed set_rate_params

* Took out the '***' markers. Incomplete list of changes:
settle borrow is gone
borrow is gone
interest rate params are now stored on root bank
add spot market params changed
add perp market params changed
fees added to PerpMarketInfo
perp cancel order accounts changed
perp cancel order by client id accounts changed
InitMangoGroup accounts + params changed

* Helper functions

* Add new liquidation instructions to the list

* Remove todos

* Added in liquidity incentive fields into PerpMarket, FillEvent and PerpOpenOrders; plumbing unfinished

* Working but apply_incentives still not working

* Implemented apply incentives for cancel perp order functions; Still no tests

* Added liquidity incentive params to add_perp_market instruction

* init_perp_market, deposit, place_and_cancel

* Deposit implemented

* Test deposits re-implemented

* remove logs

* Testing place perp order

* merged in ralfs

* fixed consume events

* Fix tests to work with changes, create mngo and msrm mints in localnet

* Scenarios for place and cancel orders

* Add all spot markets to mango group

* added test_compute

* removed print statements to improve compute

Co-authored-by: dd <dafydd.durairaj@gmail.com>
Co-authored-by: Riordan Panayides <riordan@panayid.es>
Co-authored-by: Ralfs <lagzda7@inbox.lv>
2021-07-18 18:48:03 -04:00
dafyddd 5f928d15ed
Renamed to mango (#19)
Co-authored-by: dd <dafydd.durairaj@gmail.com>
2021-06-23 13:09:49 -04:00
Tyler Shipe bcf970c9cb remove num_markets from MerpsGroup; use num_oracles instead 2021-06-01 12:25:59 -04:00
Tyler Shipe 77fd0d6115 update tests 2021-05-27 00:10:06 -04:00
Tyler Shipe 3b162fc086 tests for deposit and initializing merpsgroups and merpsaccounts 2021-05-19 15:03:29 -04:00