Deploy Mango 3S

TL;DR This proposal aims to relaunch Mango v3 with minimal changes to have a product on mainnet that is resilient enough to withstand actions that let to the shutdown of v3 on October 22nd as well as other issues that should not be ignored going forward.

The main issues are:

  1. Including perpetual futures with very illiquid underlyings in the cross margin basket
  2. Opening high leverage positions of massive size disregarding the market environment (talking about you mr. solend whale)

Given the architecture of v3, these issues can be addressed in a straight-forward way:

  1. Restrict listing to very liquid pairs, looking at the volume statistics in October it makes sense to only list BTC, ETH, SOL, USDC & USDT as collateral. Other assets can be enabled for trading.
  2. Reduce initial margin to prevent the total debt of the system to exceed what would be reasonable for a single FTX account

The 2nd point is probably less clear, let’s look at an example:

A user creates 100 mango accounts, each mango account funded with 10,000 SOL and opening a leveraged long at 5x. This would result in an aggregate position of 5M SOL, or around 1.7% of the total supply. The current liquidation fee for SOL of 5% might not be adequate for this case.

Let’s compare FTX risk parameters:

Opening a 5M SOL long at $20 ($100M notional) will need at least $67M in collateral so around 3.94M SOL.
Assumption: Initial collateral weight of 0.85 and Position initial margin fraction = 0.0003 * sqrt(5,000,000) = 0.67

Given that mango has no control about users creating multiple accounts, the only reasonable way to deal with this, is to limit the aggregate position of all users to the same standard. For perpetual futures this can be realized by using the open interest of the market to scale asset & liability weight. For spot markets it is not trivial, a lot of users might borrow SOL to buy mSOL, others might just borrow USDC to buy SOL. One way it could work is to use the total deposits to reduce asset weight and total borrows to increase liability weight.

I made a spreadsheet to illustrate these changes, based on the last state of mango v3.

As this deployment would only be a temporary stop-gap until v4 is released, the insurance fund could be limited to 100,000 USDC and 0 liquidity incentives should be necessary.


I think getting some rebooted v3 going (if relatively low lift) could make sense as v4 is still months (?) away . Not having an actively used version of system in prod is a strange state to be in where we can risk losing more dao / community members who become increasingly disconnected from the project bc they are not using a version of the product actively

But at this point probably we should just keep it simple by restricting to very liquid pairs. I have serious doubts about how many people will even be coming back to Mango after they have been burned by the incident. Supporting it with only $100K in insurance fund just makes it even more likely to be passed on by users.

Given that mango has no control about users creating multiple accounts, the only reasonable way to deal with this, is to limit the aggregate position of all users to the same standard. For perpetual futures this can be realized by using the open interest of the market to scale asset & liability weight.

so the change to allow controlling of open interest is doable in the reboot of v3? and is the proposal to automate the adjustments somehow or to simply have a Risk Committee of sorts that periodically runs some analysis to determine correct parameters and then some dao vote is done to solidify it?


There is still strong demand for mango market and I think this proposal makes a lot of sense.
Though I would suggest that the current collateral asset list is a little bit too conservative. Maybe we can add FTT and RAY, and limit the risk for these assets by giving them smaller LVT such as 65% or 75%. (This is the approach of Solend.)

Increasing the insurance fund is as simple as launching a DAO proposal to transfer USDC. You could vote to increase it, if you think it’s too low.

Controlled via executable DAO votes. Anyone can change parameters if they think it’s needed.

Overall makes sense to me, keep it conservative.

Also, at a high level there is def ‘demand’ for mango. Let’s be realistic here, there was prob only a few hundred DAU anyways? So DAU goes from 500 users to 200…whatever. Mango is so early, let alone solana defi. Keep chugging along team.

I am aware, I am just using this forum to discuss the concern first – I dont know if it’s actually worth it to substantially increase it just for v3 – so my ultimate point is maybe its not worth it at all.

Again, I’m aware DAO can propose different things – but I’m not sure if this answers the questions in my comment about the specific proposal in OP – around whether the v3 architecture even allows to do the OI cap and if the parameters would dynamically update or be statically configured like the other margin parameters – but looking at the spreadsheet it seems the proposal is just to use the existing configurations? i dont fully understand otherwise how “limit the aggregate position of all users” described in OP achieves this

For assets not on the new margin list, this would disallow long leverage correct?

Insurance fund is a valid concern, low confidence is a bad signal, agreed. We shouldn’t launch with low insurance = low confidence.

OI cap is technically not ideal. The proposal i wrote reduces initial margin proportional to IMF * sqrt(OI). A larger OI will result in higher collateral requirements for every user. This is technically a soft cap on OI, due to excessive collateral requirements.

IMF would be another parameter that needs to be configured by governance. It’s dynamic but not fully algorithmic.

i think this is where my confusion is, becuase in OP you mention limiting aggregate, but the proposal isnt really limiting it its just making it annoying to create a lot of accounts to get the max leverage of biggest size

More accounts won’t help it is still an aggregate but not a hard cap but a soft cap. If you want a massive position it’s possible but you would need to collateralize with a lot of assets and low leverage

(re GM) Posting on my behalf, not @waterquarks- I’m opposed to launching another instance of V3 if we have V4 in the next 6-12 weeks. So it ultimately depends on the timeline for V4. This would take efforts away from V4 and may result in certain team members having to juggle both given there are large changes and a lot of maintenance that will need to be done. (quite a few requirements on the UI side, fills api & then changes to all composers)

We’d have to then close out V3S and shift the liquidity over again and from discussions the liquidity is expected to be lower unless the DAO provides lines of credit to top market makers (which is possible through the liquidity counsel, but would rather use that for V4 than tie up funds in V3S)

TLDR - depending on time to V4, not pro V3S (If V4 is 6 months out, maybe makes sense but the core devs working on V4 may be able to provide an update after Breakpoint conf)