- Breaking change: Orders on the perp orderbook can now expire. Either use the iterator that returns only valid orders or manually filter out invalid orders.
- New instruction: PlacePerpOrder2
- can set an expiry timestamp
- can have a quote quantity limit
- limits the depth of orderbook iteration
- Reduce heap memory use of event logging: ConsumeEvents limit raised back to 8
Deployed: Feb 11, 2022 at 17:36:15 UTC | Slot: 120,380,891
- reduce consume_events limit to 4 to prevent memory issues
- record maker fees on PerpMarket at time of trade to prevent it later going negative
- fix typo in emit_perp_balances to print correct short_funding
Deployed: Feb 11, 2022 at 01:55:57 UTC | Slot: 120,283,217
- Added three instructions (ChangeReferralFeeParams, SetReferrerMemory, RegisterReferrerId) to help with referral program
- Assess taker fees at the time of the taker trade
- Add back Pyth status checks
Deployed: Feb 4, 2022 at 01:47:33 UTC | Slot: 119,226,876
- Pyth status check temporarily removed to let people use accounts with COPE
Deployed: Jan 28, 2022 at 20:38:57 UTC | Slot: 118,276,295
- Fix the bug in cancel_all where some orders weren't canceled
- Add optional payer account to CreateMangoAccount and CreateSpotOpenOrders for better composability
- Clean up iteration code and add better documentation
Deployed: Jan 18, 2022 at 21:06:57 UTC | Slot: 116,847,318
- Check quote token vault inside resolve_token_bankruptcy
- Add checked to num for general safety
Deployed: Jan 17, 2022 at 00:45:05 UTC | Slot: 116,585,405
- CancelAllPerpOrdersSide - cancels all order on one side
- CloseMangoAccount - close account and retrieve lamports
- ResolveDust - settle anything below 1 native SPL against the dust account
- CreateDustAccount - create a PDA tied to the MangoGroup useful for settling dust against
- SetDelegate - delegate authority to operate MangoAccount to another account
- upgrade packages
- impose price limits for placing limit orders
- ChangeSpotMarketParams
- CreateSpotOpenOrders using PDA for better UX
Deployed: Jan 11, 2022 at 01:59:05 UTC | Slot: 115,691,635
- Checked math in all areas touched by place_perp_order
Deployed: Jan 10, 2022 at 22:00:54 UTC | Slot: 115,666,186
- Impose price limits on spot orders
Deployed: Jan 2, 2022 at 20:48:01 UTC | Slot: 114,518,931
- Check bids and asks when loading perp market book
Deployed: Dec 16, 2021 at 21:16:50 UTC | Slot: 111,865,268
- Fixed FillLog maker_fee and taker_fee
- Now logging order id in new_bid and new_ask
Deployed: Dec 16, 2021 at 16:15:19 UTC | Slot: 111,832,202
- Add CancelAllPerpOrdersLog to mango_logs and start logging cancel_all_with_size_incentives
- For reduce_only on perp orders, now checking base position that's sitting on EventQueue unprocessed
- Fix bug in check_exit_bankruptcy; now checking all borrows
Deployed: Dec 9, 2021 at 18:59:28 UTC | Slot: 110,796,491
- Fixed bug where perp limit orders past price limit would fail due to simulation
- Remove unnecessary Rent account in InitMangoAccount
Deployed: Dec 9, 2021 at 01:49:38 UTC | Slot: 110,691,491
- Limit placing bids to oracle + maint margin req and asks to oracle - maint margin req
- Add more checked math in FillEvent struct method and execute_maker()
Deployed: Dec 8, 2021 at 22:29:47 UTC | Slot: 110,669,751
- Add ChangeMaxMangoAccounts
- Add some checked math in MangoAccount and matching
Deployed: Dec 4, 2021 at 21:04:59 | Slot: 110,056,063
- Add check to Pyth CachePrice so conf intervals larger than 10% result in no change to cache price
Deployed: Nov 30, 2021 at 03:23:08 UTC | Slot: 109,359,973
- Update margin basket check in ForceCancelSpot
- Update margin baskets in PlaceSpotOrder and PlaceSpotOrder2; intended to free up unused margin basket elements
- Allow passing in base_decimals when CreatePerpMarket before AddSpotMarket
- Make bids and asks pub in Book
Deployed: Nov 20, 2021 at 20:53:42 UTC | Slot: 107,876,588
- Checking the owner of OpenOrders accounts now
Deployed: Nov 20, 2021 at 14:35:26 UTC | Slot: 107,833,583
- Fixed init_spot_open_orders bug not checking signer_key
- checking signer_key wherever it's passed it
Deployed: Nov 15, 2021 at 19:38:22 UTC | Slot: 107,052,828
- Updated the update_margin_basket function to include Serum dex OpenOrders accounts with any open orders.
- Add instruction UpdateMarginBasket to bring MangoAccount into compliance with new standard
Deployed: Deployed: Nov 15, 2021 at 15:25:19 UTC | Slot: 107,024,833
- Comment out in_margin_basket check in ForceCancelSpot due to to it being wrong for an account
Deployed: Deployed: Nov 7, 2021 at 14:20:04 UTC | Slot: 105,693,864
- Get rid of destructuring assignment feature
- Use impact bid/ask for calculating funding (100 contracts)
Deployed: Nov 1, 2021 at 18:09:05 UTC | Slot: 104,689,370
- If perp market is added before spot market, fix decimals to 6
- remove ChangePerpMarketParams
Deployed: Oct 28, 2021 at 23:53:49 UTC | Slot: 104,038,884
- Added Size LM functionality
- Added ChangePerpMarketParams2
- Added CreatePerpMarket which uses PDAs for MNGO vault and PerpMarket
- Updated to solana 1.8.1 and anchor 0.18.0
Deployed: Oct 26, 2021 at 17:04:50 UTC | Slot: 103,646,150
- fixed bug when book is full
- Adjusted max rate adj back to 4 for LM
Deployed:
- Change rate adjustment for liquidity mining to 10 so changes are fast
Deployed: Oct 18, 2021 at 22:12:08 UTC | Slot: 102,256,816
- Allow for 0 max depth bps
Deployed: Oct 15, 2021 at 17:45:59 UTC
- Fixed bug in liquidate_token_and_perp div by zero bug
Deployed: Oct 11, 2021 at 16:57:51 UTC
- Add reduce only to PlacePerpOrder
- Add Market OrderType to PlacePerpOrder
- Reduce MAX_IN_MARGIN_BASKET to 9 from 10 to reflect tx size limits
- Add PlaceSpotOrder2 which is optimized for smaller tx size
- Add new way to pass in open orders pubkeys to reduce tx size
- Add InitAdvancedOrders, AddPerpTriggerOrder, RemovePerpTriggerOrder, ExecutePerpTriggerOrder to allow stop loss, stop limit, take profit orders
- Remove ForceSettleQuotePositions because it mixes in the risk from all perp markets into USDC lending pool
- All cache valid checks are done independently of one another and have different valid_interval
- Remove CacheRootBank instruction
- Add new param for exponent in liquidity incentives
- FillEvent logging is now done via FillLog borsh serialized and base64 encoded to save compute
- Added mango-logs and replaced all logging with more efficient Anchor event
- Added logging of OpenOrders balance to keep full track of acocunt value
- Added PostOnlySlide for Perp orders (including trigger)
- Added OrderType into LeafNode for ability to modify order on TradingView
- Added MngoAccrualLog
- added DepositLog, WithdrawLog, RedeemMngoLog
- sending u64::MAX in withdraw function withdraws total amount in deposit
- UpdateFunding now takes in MangoCache as writable and caches the result and UpdateFundingLog is emitted
Deployed: October 5, 2:00 UTC
- Changed the being_liquidated threshold inside liquidate functions to -1 to account for dust issues.
- Upgrade anchor version for verifiable build
Deployed: September 26, 16:40 UTC
- Fixed bug in check_enter_bankruptcy
- updated anchor version and packages