Add UXD as collateral

Hi, this is Kento, founder of UXD Protocol, an algorithmic stablecoin backed 100% by a delta neutral position using derivatives. I would like to propose adding UXD as collateral for Mango Markets. Please give me your thoughts here.

Background

UXD is a Solana native algo stablecoin backed by a delta-neutral position using perpetual futures. The delta-neutral position is currently 100% on Mango Markets, and we account for 89% of OI for SOL/USD perps on Mango. Key points of UXD are:

Adoption:

We launched Mainnet Beta in mid January and there’s currently 27.2 Million UXD in circulation.
We are integrated with various defi protocols on Solana, such as Mango Markets, Saber, Sunny, Mercurial Finance, Jupiter and Solend.
There is 42 million in TVL for UXD/USDC pool on Saber, and 10 Million UXD supplied on Solend.
We are currently in communication with other defi protocols to increase adoption of UXD.

Security:

We take security seriously. We had 2 professional audits, one from Bramah Systems and one from Soteria. We will get a third audit from Soteria again in mid May. We also have one of the largest bug bounties in DeFi, with 2% of total supply of UXP tokens allocated for bug bounties. At current market prices this is more than 13 million usd.

Stats:

Check our dashboard https://dashboard.uxd.fi/

Price Feeds:

Price feeds from Switchboard are available now. Pyth will also support UXD once they support Saber pools.

Current benefits:

By using UXD as collateral to trade on Mango Markets, users won’t have to rely on centralized stablecoins such as USDC and will make Mango Markets a more decentralized platform.

Future benefits:

We plan on implementing a liquidity mining program where if you supply UXD as collateral on Mango Markets, you will receive UXP tokens as a reward to further adoption of UXD.

Risk:

UXD may depeg if the decentralized derivative dex behind UXD is hacked or if there’s a smart contract exploit.

5 Likes

Seeing the amount of dedication the team is showing and results of their work is there too,i support this proposal. Scaling has to happen rapidly and this is the right step

3 Likes

UXD natively brings volume.
Every UXD minted or redeemed though mango depositories is perp volume, and taker fees.
As of today, UXD generated ~16k $ fees from its minting and redeeming, it’s easy to imagine how this could scale with broader UXD adoption, bringing constant revenus to support the development of MangoMarkets.
UXD are minted/redeemed through an atomic instruction that emulates FoK with IoC 100% fill orders (taker), user has control over the slippage.

Furthermore, we released v3.0.2 last week with our new rebalancing instruction, this week end we rebalanced ~4M negative PNL (split between SOL/BTC/ETH, SOL mostly).
We still have 6M to go in the coming days at the time of writing this, and UXD will soon be rebalancing continously (w/ Cronos v2 in a month or two, with custom script in the meantime).
This will provide a constant stream of take orders against the current direction of the market.

Additionally, being 80% of the OI allow a lot of people to be long without suffering the FR hit. (I do that)

I believe MangoMarkets and UXDProtocol entertain a growing symbiotic relationship, from having UXD as a collateral, to ultimately some day having pairs quoted in UXD. (Although as Daffy said at Breakpoint, would be nice to get rid of USD some day).

As a bonus, UXD follows the governance path Mango has courageously set. Although still limited to the council on most operations, we are fully transparent in the management, and the entirety of our assets and programs are held securely.

Disclaimers: MangoMarkets is my bank and I wrote the UXD program. :mango:

3 Likes

Another point that I forgot to mention is the massive 18M USDC UXD as dormant on MangoMarkets as insurance, pulling USDC borrow rates lower.
This will be reduced in the near future now that we have a functional rebalancing mechanism, but a few millions will remain.

I think this is a great idea, main issue with adding uxd would be the previous oracle slot debate from a oracle limit perspective as well as more recent concerns with oracle security in defi.

Might make sense at this point to delist one of the less popular pairs, but there is no protocol in place to do so right now. Alternatively it comes down to a multiple choice vote for the last oracle slot near vs uxd vs ??

Can you give more details on the oracle you would like to use and which datasources it is combining?

2 Likes

This looks like a good idea and is an important step in eventually having /UXD pairs.

Besides oracles, another point of concern is a systemic risk for mango and uxd. In the (unlikely) case mango gets hacked you have the peg of UXD at risk + other funds on mango at risk due to borrowing against UXD

1 Like

We will be using switchboard for UXD/USDC pair.

The switchboard oracle is reporting a single saber pool. Could you clarify how much of the Saber pool LP is owned by the UXP DAO? Curve slippage looks pretty good, so oracle manipulation possibilities seem limited.

UXP DAO owns close to 50% of the pool.
We will continue to provide liquidity to the pool and will also increase the liquidity in the pool.

Ok here are some thoughts:

  • Recursion is always tricky and needs to careful thought. This would be a case of recursion.

  • liquidating stablecoins is hard because they’re often all or nothing. Mango v3 only supports serum order books. Liquidators typically liquidate on Serum. If price starts declining, the serum orderbooks have to continue to have a bid and I’m not sure they will. Liquidators can be smart and liquidate on Saber, but that’s one thing we should make sure they’re doing

  • The peg can be lost if there’s a large socialize loss event on the SOL-PERP. Suppose someone takes a large SOL-PERP long on 20x. Suppose it’s large enough that we’re unable to liquidate it in time and the account goes negative equity. The Mango insurance fund is 10m and beyond that losses will go to other SOL-PERP holders, UXD being the biggest holder. Once the peg is threatened in this way, UXD holders will try to redeem before others do and trigger a bank run. So again, UXD price spirals to 0. This is all assuming Mango insurance fund and UXD insurance fund are both blown out.

  • If there’s a bug in UXD that allows infinite minting or whatever, it would be possible to deposit large quantities and borrow everything else in the platform. There are no limits on usage of collateral in v3. I think this is somewhat unlikely, but still something to worry about.

Mango v4 will have net deposit limits, open interest limits and possibly even better segmenting of risk in perp contracts. And we’ll have space for hundreds of tokens. It makes a lot more sense to add UXD in mango v4 given the risks.

9 Likes

Thanks for the feedback Daffy!
I agree that there’s risk in adding UXD to the platform but the risks seems to be relatively small and other crypto assets also suffer from other types of risk.
I gave some of my thoughts here.

liquidating stablecoins is hard because they’re often all or nothing. Mango v3 only supports serum order books. Liquidators typically liquidate on Serum. If price starts declining, the serum orderbooks have to continue to have a bid and I’m not sure they will. Liquidators can be smart and liquidate on Saber, but that’s one thing we should make sure they’re doing

I dont think liquidating stablecoins are all or nothing. Dai and UST for example have depegged but they tend to trade at a discount, which enables liquidation at fair market prices. It’s true that there’s a risk that stables goes to zero but this argument applies to all crypto assets, not just stables.

The peg can be lost if there’s a large socialize loss event on the SOL-PERP. Suppose someone takes a large SOL-PERP long on 20x. Suppose it’s large enough that we’re unable to liquidate it in time and the account goes negative equity. The Mango insurance fund is 10m and beyond that losses will go to other SOL-PERP holders, UXD being the biggest holder. Once the peg is threatened in this way, UXD holders will try to redeem before others do and trigger a bank run. So again, UXD price spirals to 0. This is all assuming Mango insurance fund and UXD insurance fund are both blown out.

In this case UXD doesn’t go to zero but to some level in which it’s undercollateralized. So if UXD is undercollateralized by 10%, UXD will trade at $0.90. This is also a risk that centralized stablecoins such as USDC and USDT suffer from, if Tether for example loses access to it’s funds, USDT will trade at a huge discount.

If there’s a bug in UXD that allows infinite minting or whatever, it would be possible to deposit large quantities and borrow everything else in the platform. There are no limits on usage of collateral in v3. I think this is somewhat unlikely, but still something to worry about.

This is true but again, applies to all crypto assets.

1 Like
  • If there’s a bug in UXD that allows infinite minting or whatever, it would be possible to deposit large quantities and borrow everything else in the platform. There are no limits on usage of collateral in v3. I think this is somewhat unlikely, but still something to worry about.

Very good point. We strive for the best level of quality and have continuous audits planned with Soteria for additional feature, no un audited code will see mainnet (except a critical patch if the need arise). The risk is never null.

As additional insurance of good practices, a few developers from MangoMarkets have access to the codebase since the release, although again the responsibility is on us, but that’s probably interesting for external party to know that reliable people can pry into our work.

I agree that MangoV4, with us getting closer to open source and a more open DAO is a sensible approach.

1 Like

If there is a huge socialized loss event on the SOL-PERP I expect there would be a sale of MNGO from the treasury to make traders whole. The MNGO token is the ultimate backstop of risk in the Mango Markets Protocol. If the Mango Markets Protocol cannot make traders whole, then the losses would flow through to the UXD insurance fund. If the UXD insurance fund is also depleted, then there would be a sale of UXP to make UXD holders whole.

So there are 4 lines of protection before UXD’s peg is threatened in the case of a huge socialized loss event on the SOL-PERP:

  1. Mango Insurance Fund
  2. MNGO sale
  3. UXD Insurance Fund
  4. UXP sale
3 Likes

Thanks for the response. Would you guys be willing to make the UXD/USDC serum market good with liquidity? Perhaps you could get a market making firm to do this or you could get Atrix/Raydium to subsidize liquidity on the CLOB. IL is not much of an issue because UXD should have low volatility.

If the Serum market has good liquidity, we won’t have to build a whole different liquidation mechanism and/or possibly allowing trading of Saber via Mango v3. Trading on any dex is a feature that’s going into mango v4, but we want to focus on that instead of continuing development on v3.

What kind of leverage were you thinking the UXD spot market should be initialized with?

Also what do you think people will do with UXD deposits? Why should they deposit their UXD in Mango if they can just deposit in Saber and earn yield?

3 Likes

Yeah we can provide liquidity on Serum.

What kind of leverage were you thinking the UXD spot market should be initialized with?

I’m not sure what you mean by this. Do you mean how much leverage you can get by borrowing UXD?

Also what do you think people will do with UXD deposits? Why should they deposit their UXD in Mango if they can just deposit in Saber and earn yield?

They can use UXD, a decentralized stablecoin as collateral to trade on a decentralized platform, mango markets. We will incentivize UXD collateral with yield in UXP.
With Saber, you can only provide liquidity and earn yield.

1 Like

I’d recommend a .8 collateral factor for a start (effective 5x leverage against usdc, same as all wrapped assets like btc, sol, msol etc), we can later up to a higher collateral factor if we have additional risk limits in place. Specifically v4 will help with this. These risk limits need to be configured when adding the spot market:

Serum market should probably be configured similar to usdt/usdc, recommend to work with a DMM for that, Alameda and Jump are very well versed in this.

1 Like

I am in favor of integrating UXD but believe this should wait until Mango v4 when additional oracle spots are available plus other new features like pass-through LM rewards and non-Serum DEXs support.

Low Usage w/o Subsidies:
Even if UXD were added now, I suspect deposits would be quite small. UXD deposits are heavily subsidized on other venues via UXP emissions. This is primarily on Solend right now (6.25% yield from UXP alone) but also stable pools like Saber and Mercurial. Mango v3 does not have functionality to pass-through UXP rewards.

I think UXD holders would deposit their tokens in projects including the LM subsidy since that will be a superior return vs. putting in Mango. Therefore, Mango deposit amounts are likely to be small. (Note this calculus may not hold true for users who require collateral on Mango and their only available assets are UXD but I think this is a small minority of UXD holders.)

Non-core feature for Mango:
Mango’s primary feature and only source of revenue is perp trading. Given the near-term limitation on oracles, the last spot should go to a product that directly furthers this mission. Something like NEAR for the oracle spot improves the core perp trading experience.

Mango already supports many collateral formats including censorship-resistant tokens. UXD deposits are an incremental feature at best. Other lending projects also support UXD so Mango adding would just be entering a commoditized market.

Impossible to add in the next 1-2 months:
As discussed in Daffy’s comments above, for UXD to earn any material collateral value would require a robust Serum market. This does not exist and would need at least a month of demonstrated liquidity prior to Mango supporting. Other oracle uses can be done almost immediately.

Mango Priorities:
Oracle slots and dev time are scarce. The v4 release solves all of these concerns and should be available in 3-6 months. That is the priority. During that time, UXD can continue growing its network so Mango can give it higher collateral weight upon integration.

As a UXD and UXP holder, I would prefer Mango focus on immediate liquidity provision to improve funding rates. IMO low funding seems far more important right now for UXD’s future vs. a Mango UXD integration.

3 Likes