Around February last year I started working on the mango-v4 program. Now that we are close to shipping the first version with all core features we planned for, I would like to document my open source contributions here. Most of the work has been done in close collaboration with ckamm who will also share some notes in the post soon I hope. My primary contributions on v4 have been
Solana program design and rust code
Some key improvements/additions over v3 have been
Expandable mango accounts, including easy support for entirely new future features
Margin trading using flash loans
Oracle peg style perp orders
Smoothed stable price for oracles
In general, a lot of compute usage optimisation
Note: a significant chunk of recent program improvements have been primarily ckamm’s work, while my focus has moved a bit more to the client side contributions
Typescript client used by the UI and various admin scripts
Rust based keeper
Initial work on a rust based liquidator, which has since been taken over by ckamm
Sample market maker, mostly adapted from the v3 one
Initial work on a python client, which is unfinished for now
Governance integration with Adrian
Apart from mango v4, I also authored the mango-v3-reimbursement program and typescript client, which took a large chunk of October.
Before mango-v4 I had various small-medium contributions on mostly off chain services and some program changes relating to mango-v3.
Future contributions will mostly surround continued maintenance of the program and typescript client, and fleshing out newer advanced features on the Solana program.
Though it has been a hard year for many reasons, I would like to say that working on the program has been extremely rewarding, specially with engaging discussions with the core contributors, and I hope this continues. I also hope that we see many new contributors join and help build a better and bigger mango together.
Purpose of this post is to request a grant for the work on mango-v4. I would appreciate it if the DAO could approve it.
As microwavedcola outlined above, a lot has happened in the last year and we have contributed to Mango in various ways. I’ll give an overview of my own contributions over the last year and propose the DAO to consider a new grant for them.
My main focus over the last year has been mango-v4. Microwavedcola and I are the primary authors of the new program, which is open-source and available on github, including the full development history.
I’ve had a hand in all parts of the program, for example the
account design, which allows for extensible user accounts and a very large number of registered tokens and markets.
health computation, which quantifies risk from user positions.
safety features that prevent or limit attacks without inconveniencing users too much.
flash loan/margin trade composability, which allows using any swap-like on-chain API though Mango.
internal audit and reviews. So many reviews.
I am excited for the DAO to launch the program and intend to be around to maintain and expand it. There’s a lot left to do, like better documentation, better usability for integrators, a smarter liquidator and many potential new features.
Before focusing nearly exclusively on v4, I had also been involved in
several Solana performance improvements, one of them huge
Solana infrastructure work for account streaming using geyser
designing and implementing the reimbursement strategy after v3 shut down
some Mango v3 features and maintenance, most notably time-in-force
It has been a pleasure to work with all the other contributors and I am looking forward to continuing to do just that.
In my opinion my work has been key for making mango-v4 a reality. I hope that the members of the DAO agree and decide to approve a new grant for it.
Daffy’s probably going to make a similar suggestion but I agree that given their previous grants of only 10m locked MNGO each, their respective locked tokens should be brought up more in line with some of the other founders or large contributors. So going from 10m → 30m or 40m each and then that should probably sort out grants for a while?
On the cash side it was $300k last year, so not sure if that should go up or down or if it should change relative to the size of the locked token grants. I.e. I don’t think either daffy or Max draw a salary from mango but GM, an equivalent large contributing group that got granted 40m locked tokens, did get a large budget for salaries. Though didn’t really get a proper breakdown of who was taking what salary from mango labs either.
If the locked tokens go up then the logic is salary should maybe go down but in the grand scheme of things it’s not worth nickel and diming over. It would perhaps have been helpful if in the request for grants they had given some expectations for their grants. But I suppose this is all part of the DAO politics / theatre.
Hey thanks for the details and effort dedicated thus far to v4!
Are the DAO token stats accurate? Realms. If so looks like together the proposed MNGO vesting will increase the current monthly MNGO unlock by ~2.5x? 521K +1416K
There really is very little market to absorb any resulting selling - not saying any of this is going to be dumped worth bearing in mind - supply optics matter.
A better structure would involve option grants, of course talking my own book here, but would have real benefits. Could be a significantly larger amount to align incentives, avoids any nasty tax liabilities and provides potential ongoing funding of the DAO. My suggestion would be 50% of the proposed MNGO vesting as spot & 150% of the proposed MNGO vesting as a $0.05 5yr call option. On a present value basis this is equal to the current package, but with greater upside for contributors to gain from Mango’s success and be motivated to work towards that end.
There is a realms integration to support this already
Extremely good SWEs in DeFi are extremely hard to find, and we can all agree that these two are top-tier in that regard, and keeping them around and motivated is in line with MNGO holders.
Hope to hear more from the two contributors on their expectations and what they think they deserve, and support from Mango DAO in approving it instead of contesting it over saving a few bucks.
I think a good way forward is to hear from the contributors on their past comp and expected comp - making this decision easier. I think ill vote yes without much changes but easier to voice out then.
Edit: Check the governance channel in Discord - didn’t realize the numbers were there.
Thanks for the suggestion! While I’m not opposed to receiving call options in principle, in practice I’d worry about:
The legal setup: Last year, before the first set of grants, we spent several months making reasonably sure there wouldn’t be surprises. With options this would need to be revisited.
Governance integration: The currently proposed grants immediately give voting power to the recipients. Options wouldn’t.
Clawback: This is more of a question because I haven’t read Dual’s program in detail yet, but I don’t think it supports clawback? If it doesn’t, then using options would be a much stronger commitment by the DAO.
Fees: As far as I’m aware - and I might very well be wrong - option execution through your offering would cost 3.5% in fees?
Security: I’m a bit unusual - would then want to audit your program first. And recommend increasing the multisig needed for program upgrades beyond 3 of 5.
Due to all of that, I’d prefer the direct grants.
Fwiw, at current prices the USDC grant covers the tax liabilities comfortably. So there’s no pressure to sell.
Glad to hear you’d be open to it. Definitely represents a more complete incentive plan than just MNGO vesting + cash.
Legal setup: You mean on behalf of the DAO or personally?
Governance integration: Feel this is somewhat desirable in the current state of the DAO, its really just contributors who move the needle. The portion of spot vesting remaining would allow ongoing increasing free voting power. After exercising options you’d obviously have increased voting power too.
Clawback: The options are just a token so would be minted and then plug into the vesting program the same as any other token.
Fees: Yes we need to figure out a solution here. Currently, we whitelist a set of addresses that do not incur any fee, ie. Dual DAO exercising MNGO Buyback. Either grow that set of fee exempt accounts or deploy a cap to the fee, something de minimis.
Likely not going to change anything in the 11th hour here, but certainly worth thinking of better alignment structures for the DAO going forward. Maybe separately worth structuring a small option bonus pool for all current contributors so it’s not foreign to future batches of grants.
On clawback: Right, it being tokenized simplifies things. Plugging it into the existing grant/vesting program isn’t straightforward though, as that one can only support up to four distinct mints, two are already in use and each option type would have its own mint.
However, since the option grant would not give voting rights anyway, vesting could use a separate, much simpler program. That would need to be built.
Another topic that came up was pricing: Grantees would want to know the value of the option tokens they receive each vesting period for reporting purposes.