When a perp markets is set to "force-close" by the DAO, anyone can close open
perp orders and positions on the market. This allows the DAO to wind down perp
markets if needed.
- Force-closing of OpenBook market use via Mango (#551)
When an OpenBook market's Mango integration is set to "force-close" by the DAO,
anyone can close open orders on that market that were placed via Mango.
This allows the DAO to wind down interactions with an OpenBook market.
- Fix exception for the Jupiter program in flash loan (#552)
Account delegates cannot execute generic flash loans, but were supposed to be
able to use whitelisted Jupiter programs during a flash loan. The bug that
prevented the exception from working was fixed.
- Allow the DAO to withdraw from the insurance fund token account (#561)
- Fix a bug with settle limit accounting when liqors take over positive pnl (#562)
- Improve logging on force-close instructions (#555)
- Fix perp order seqnum logging (#556)
- Fix build when using mango-v4 code with the "no-entrypoint" feature (#558)
## mainnet
### v0.13.0, 2023-4-18
Deployment: Apr 18, 2023 at 17:33:15 Central European Summer Time, https://explorer.solana.com/tx/4WWVHCAheTRBhzyXUjsV1Kqfn8LdnkupiVbK4qaPNqby8P5vv7hY6HS3rHHL9bMu1RGdCZvqsd2MHjdawLYQ6Pxi
Deployment: Apr 17, 2023 at 15:49:33 Central European Summer Time, https://explorer.solana.com/tx/2PbaCRMGgpGiysxk5y8x3TdFRZbGEAKZdyAzEQhAMXfCxS4bPN96YZ4Pp6hHfp17fd7RYUd13t4vtjpaFb4ccYRm
Required to have a full picture of total perp market fees.
- Net borrow limit: Separate out tracking from checking (#534)
That way it's easier to be specific about where the limit should be checked.
### v0.11.0, 2023-4-4
Deployment: Apr 4, 2023 at 21:43:18 Central European Summer Time, https://explorer.solana.com/tx/5Z36iV6VhAfmxwZubQduV1hNyUyyB9AyjovAwNrWLb5cdAqGm4F3NGmz6V8VpHT6yUwCEDxm2hWMrdJXNkZ8RSPR
Deployment: Apr 3, 2023 at 20:10:26 Central European Summer Time, https://explorer.solana.com/tx/3Rvv7hxqYQ7mPXE7jopzq1RAAoEwPi1pRPY7EubzEiZih8zMVhTMe1AsuYNJq3gwpM8BVVC3CXkAWcsFdd7SE6zC
The security council had disabled the HealthRegion instructions after the audit
found a vulnerability. The issue has been resolved by restricting which other
instructions may be called in a health region. That way it's still usable to
save compute units, but its attack surface is significantly reduced.
- Use insurance fund token oracle for bankruptcies (#503)
This is in preparation for using an oracle for the USDC price instead of fixing
its value to $1. The insurance fund is in USDC, so the oracle price needs to
be taken into account once a real oracle is provided.
- Fee buyback: Use the USDC oracle (#504)
- Perp settle fees: Return early instead of error on failure (#526)
- Net borrow limits: Fixed accounting of deposits (#513)
- Better logging in IxGateSet instruction
- Sanity check token_index in TokenRegister instruction
- Allow using all available bytes for bank and market names
### v0.9.0, 2023-3-16
Deployment: Mar 16, 2023 at 11:07:30 Central European Standard Time, https://explorer.solana.com/tx/2hVqFQhxC9BGzDvH7y9bWChrMRvzsBGMPcMepHLBamK4vKJMJG48Fv8ZB54b46qErH1aGRy9YVhFnVnpaKgnoP3c
- Downgrade the "fixed" dependency to v1.11.0 (#500)
The dependency had a regression. This downgrades to the previous version that
had been in use with Mango v3, while backporting the safety improvements done
for release v0.8.0.
- Improvements to perp position docstrings (#497)
### v0.8.0, 2023-3-11
Deployment: Mar 11, 2023 at 08:06:22 Central European Standard Time, https://explorer.solana.com/tx/61CbcyDaCV1DKHEGxkfNfx9nCUfsH3RgUU7mivTjtqbHJ3YVPX6vNAzn91CZYRsjohVc5LdcZCZtteDKrCiKjYEi
Deployment: Feb 22, 2023 at 14:45:12 Central European Standard Time, https://explorer.solana.com/tx/2KjMd2GLggSTJGSBQ3T96KK8Pj8XEXSDad65b8AN9gtCo6XdWmaFtewUJbPFvXK8WnKgdTxUNJjftpbtRJNEVhDg
Deployment: Feb 14, 2023 at 16:06:03 Central European Standard Time, https://explorer.solana.com/tx/4vpjuiESQZn5t6XErHeSX76dCng4P4KPrr5pMGuYv9LhA3EcLgTw1bYxg8aRmBt1rfJCTqqYLws1cr4EvnrrETue
Deployment: Feb 2, 2023 at 10:51:02 Central European Standard Time, https://explorer.solana.com/tx/eVGLcy3y8Vi9sMDKQbKdRKZa6dpjTjdP5HyDFXXQFqAaS1CXCg2QnFC1hgE8F8unWfgpmXC8PvmuRMhmQEE1YzK
Deployment: Jan 24, 2023 at 10:21:59 Central European Standard Time, https://explorer.solana.com/tx/3C5vSUrC2xJhAeaDjRMuhE1Gnbj72gDKPRibpFk2gP2afoaFquY8GgUeBwhNoP25QtPvTJG3NZmZBoHoSgvrEWGH
Deployment: Jan 17, 2023 at 14:57:12 Central European Standard Time, https://explorer.solana.com/tx/5uGKvLwcBjPkUAKtFGqKdwm6pHXFaMGkF44P8rhJrRbmTGwgKShkSoVvLvqDNvJYa4iMftiQgZW7gG9tQaXjmrEk
Deployment: Jan 13, 2023 at 11:31:05 Central European Standard Time, https://explorer.solana.com/tx/4yGRUk6QwntvC4umECDPDZJNcbevSJ1fdZi75Mz9rGa9SHKzUtjMF3V5FCTkzBZqAETQTccqv63BYw6yX8JNxiur
- Renamed `getGroupForAdmin` to `getGroupForCreator`.
- Renamd `getInNativeUsdcUnits` to `getEquivalentNativeUsdcPosition`.
- Renamd `getMangoAccountForOwner` to `getMangoAccountsForOwner`.
-`getOrCreateMangoAccount` and c`reateMangoAccount` take an explicit payer, previously it was just implicitly using the client provider's wallet
- Upgraded anchor npm package to latest.
- Anchor is now a git submodule.
New features
- Many rust liquidator improvements.
- MangoAccount is now dynamically sized and is expandable, there is a new `AccountExpand` ix, default size of account is 8 token positions, and 2 serum3 and 2 perp positions, expanded account has 16 token positions and 8 serum3 and 8 perps for now.
- Group account - has a `creator` field which is set on creation and should never change, is used for pda derivation, has a new `fast_listing_admin` field for governance, and also has a `GroupEdit` ix to change both the admin keys.
- Group account - has a `version` field, version 0 which is used in the setup scripts for now, means serum3 and perp market registration is forbidden, and multiple banks are prevented from been added.
- Each account now has a reserved space of around 256 bytes.
- flash_loan ix 1 and 2 are removed, flash loan 3 has been renamed to just `FlashLoan`.
-`MintInfo`, `Serum3Market`, and `PerpMarket` have a field called `registration_time` which is seconds from epoch, e.g. use case how freshly has the market been added, if it was recently added then liquidity might need some time to improve
- Removed fields and commented out code for address lookup tables.
- New `TokenRegisterTrustless` ix to register tokens trustlessly.
- Insurance fund is now disabled for trustless tokens.
-`TokenRegistration` and `TokenRegisterTrustless` ixs dont take a bank_num anymore, hardcoded to 0.
- Enforced a minimum maximum rate of 50% so that rates don't fall so low that they cannot recover.