4.1 KiB
Mango v4 Program Change Log
Update this for each mainnet deployment.
not on mainnet
- liq_token_bankruptcy: removed liab_token_index argument
- flash_loan: both begin and end instructions now require the group to be passed as the final trailing remaining account
- flash_loan: the end instruction now requires passing a FlashLoanType, so logging can distinguish swaps from other uses
mainnet
Aug 8, 2022 at 18:56:04 Central European Summer Time https://explorer.solana.com/tx/yjZggRTrcDNquMkftNvBKLv77Dk4xp5yQPYXgN3qvBHTBWWJVhLPGHxqpGwosmEq3j8byHZMa13oxLLerBWUdgW
- improved logging for off chain services
AccountCreate
ix takes explicit input for sizes of various features
Aug 4, 2022 at 09:30:00 Central European Summer Time
ts/client changes
- Renamed
getGroupForAdmin
togetGroupForCreator
. - Renamd
getInNativeUsdcUnits
togetEquivalentNativeUsdcPosition
. - Renamd
getMangoAccountForOwner
togetMangoAccountsForOwner
. getOrCreateMangoAccount
and createMangoAccount
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 newfast_listing_admin
field for governance, and also has aGroupEdit
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
, andPerpMarket
have a field calledregistration_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
andTokenRegisterTrustless
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.
Jul 14, 2022 at 09:33:52 Central European Summer Time https://explorer.solana.com/tx/vZ5hP1vGp37fgzBfG9nb4nfA5ZdmYgk8meq53YPR4ReFxrcTwBUxTYBQUgnfAnq9u5fH36S3QTfb9mVkBXt5A6C
-
Account data was rearranged to put fields that are often used with gPA first
-
The
CreateGroup
instruction now requires aninsurance_mint
account, which is used as the mint for theinsurance_vault
token account it creates. Pass the USDC mint address. -
The token with
token_index
zero is now required to be theinsurance_mint
. Trying to register a different token for index zero will now fail. -
New instruction:
LiqTokenBankruptcy
to resolve insurance fund payouts and socialized loss for bankrupt accounts. -
The
PerpCreateMarket
instruction no longer requires aquote_token_index
argument. The USDC/insurance mint is always used as quote currency for perps. -
The
UpdateIndex
instruction now requires theoracle
account to be passed for logging purposes. -
New instructions:
AccountEdit
,TokenEdit
,PerpEditMarket
for reconfiguring. -
The
delegate
field onMangoAccount
is now used and many instructions can be called by the account delegate. -
TokenUpdateIndexAndRate
now maintains dynamic optimal and max rates for token interest rates. -
Renamed instructions:
- create/close_group -> group_create/close
- create/edit/close_account -> account_create/edit/close
- update_index -> token_update_index
- create/set_stub_oracle -> stub_oracle_create/set