Deep Dive: UXD Stablecoin
A deep dive into what may be the world's best attempt at creating the perfect stablecoin
This is a deep dive into the UXD Stablecoin on Solana. It is meant to be a one-stop resource for you to gain a deep understanding and appreciation for the UXD Stablecoin. Along the way, you will also learn about the role that stablecoins like itself play in the crypto economy in general.
It is primarily written for a beginner-intermediate audience and only minimal prior familiarity is expected. I will attempt to build all understanding from the ground up.
The description on the UXD website is quite concise and a great place to start —
UXD is an algorithmic stablecoin, backed 100% by a delta neutral position.
There are 3 key concepts in there which I’m going to unpack over the rest of this essay.
Delta Neutral Position
I’ll start with very simple explanations of each of these and go into much more detail further on in the essay.
I want you to notice how Solana doesn’t feature in the definition. That is because these concepts are blockchain agnostic. But in practice, they’re only possible to be executed on Solana due to a myriad of factors that includes speed, efficiency and low transaction fees. UXD Protocol is built on Solana for this reason.
A stablecoin is a cryptocurrency whose price does not fluctuate very much.
UXD is a stablecoin → UXD’s price does not fluctuate very much.
“Algorithmic” refers to the underlying mechanism of the stablecoin that allows it to maintain this constant price regardless of the number of tokens in circulation.
UXD is an algorithmic stablecoin → UXD belongs to a class of stablecoins that have algorithm-based designs underlying them.
Delta Neutral Position
Delta neutral is a trading strategy that lets traders trade without being exposed to volatility in the market
In the context of the UXD stablecoin, Delta neutral can be thought of as the strategy that allows the UXD Protocol to maintain the value of the collateral deposited with it even during periods of high volatility.
Summarizing what we have learned so far —
Let’s dive into each of these in detail now.
Understanding the Fundamentals of Stablecoins
You might be wondering, what is the purpose of a cryptocurrency whose price does not fluctuate very much?
Stablecoins serve two main purposes —
A frictionless bridge between economies
A way to hedge against inherent volatility in crypto markets
1. Stablecoins as a frictionless bridge between economies
Converting crypto to fiat has always been a troublesome process. It is time-consuming, risky, and uncertain. In the early 2010s, if you had BTC that you wished to convert to physical dollars or rupees, your options were quite limited. To name two —
P2P where you find someone willing to take the other side of this exchange
Transfer to a Centralized Exchange, sell your crypto, and withdraw fiat to a traditional bank account.
Note: Fiat here refers to government-issued currencies such as the U.S. Dollar or the Indian Rupee
Both these options were quite limiting and had lots of issues surrounding them —
High transaction costs
Difficulty finding counterparty during volatility
Long Transaction times
Needing to go through a centralized exchange
... and more
This high friction in moving money between the crypto economy and the fiat economy meant that few went through the hassle. And those that did, stayed on their side of the divide once they made the journey.
If you were on team crypto, this was a problem (and a big opportunity at the same time) because historically, the crypto market cap has been a small fraction of the total global economy. And in such a situation, there is a lot more upside for the smaller economy to create a smooth bridge because you want more money flowing into your system from the large incumbent.
Stablecoins solve this problem.
They act as a frictionless bridge between the two economies and solve almost all of the problems that previously plagued regular fiat to crypto transfers with their promises around stability and scalability.
2. Stablecoins as a way to hedge against volatility
Another key role that stablecoins play is as a hedge against the inherent volatility in cryptocurrency prices.
The best way to understand this is through an example —
It’s Nov 2021, every crypto token you hold is at an all-time high. Imagine you owned $10 Million in crypto tokens spread across the entire spectrum. A little birdie from the future lands on your shoulder and tells you that it is going to be downhill from here for at least a year.
Without withdrawing to fiat, what options do you have to preserve the value of your wealth?
Before stablecoins, there was very little you could do. Some simple strategies might have involved —
Transferring your tokens into (relatively) less volatile crypto assets
or perhaps you could get into corresponding short positions on derivative markets
These are far from perfect strategies. They require constant monitoring, skill to execute, not guaranteed, and are just generally complicated. The second option probably didn’t even make any sense to you, don’t worry you are not alone.
But in a world with stablecoins, no matter what kind, the answer is simple. You would just swap all your crypto assets into stablecoins and ride the downturn out.
The Three Types of Stablecoins
How do you design a stablecoin? The best minds of the world have come up with plenty of ideas in the last 5-10 years and every stablecoin design so far fits into one of these three categories —
Fiat-backed (USDC, USDT)
Algorithmic (UXD, UST, FRAX)
To begin to understand a stablecoin, you need to understand the answers to the following two questions —
How is the stablecoin minted?
Once minted, how does it retain its price through periods of volatility?
Note: Minting refers to the act of producing something for the first time. In this case, the process in which a stablecoin comes into circulation in the crypto economy.
Let us go through each of the categories of stablecoins above. Fiat-backed Stablecoins are the easiest to understand so let's start there —
1. Fiat-backed Stablecoins
USDC is an example of a Fiat backed stablecoin whose price always hovers around ~$1
How is USDC minted?
You deposit fiat (US Dollars) with Circle Bank and they issue you USDC in proportion to the amount that you’ve deposited. Circle guarantees you that they will safely keep your real-world deposit. Every USDC in circulation has this property, that is, it has a real physical dollar backing it.
How does USDC retain its price?
Along with providing a way to create USDC out of real-world money, the reverse route also exists and is called redeeming. If USDC begins trading too far away from $1, arbitrageurs would step in and mint/redeem USDC to bring the price back to $1.
What fiat-backed stablecoins lack is — Decentralization and Transparency
What happens if Circle secretly starts issuing 2 USDC for every real-world dollar deposited?
2. Crypto-backed Stablecoins
These work on a similar concept behind fiat-backed but instead of exchanging US Dollars for a stablecoin, you exchange a crypto token for it. Let’s consider DAI
The Minting Process
You deposit crypto collateral on the MakerDAO platform and you get DAI at a particular collateral ratio. Currently, the rate is 1$ of DAI for 1.7$ of ETH collateral.
How does DAI maintain its price?
Through a similar mint ←→ redeeming process and arbitrage process as fiat-backed stablecoins.
Where crypto-backed stablecoins lack — Efficiency
The over-collateralization of deposits is a key requirement for crypto-backed stablecoins but it also means that you’re leaving some money on the table. Surprisingly, decentralization is also where these types of stablecoins have begun to struggle. You can read more about it in the Messari research report on UXD that I link to at the end of this essay.
3. Algorithmic (Algo) stablecoins
Algo stablecoins are the third category of stablecoins. The mint process for these stablecoins is significantly different from the other two categories and also varies quite widely even from one Algo stablecoin to another. In general, any stablecoin whose design is based on game-theoretic and mechanistic principles to ensure its stability falls under this category.
Where Algo stablecoins lack — Stability
Algo stablecoins have historically performed worse on this axis.
UXD’s design promises to solve this stability problem once and for all.
Understanding UXD through the lens of an Algorithmic Stablecoin
The Minting Process
UXD can be minted by depositing SOL/BTC/ETH into the UXD dApp and getting the equivalent $ amount of UXD. Depositing $1 worth of SOL will give you 1 $UXD.
What happens behind the scenes when you deposit some SOL into UXD Protocol? How does it transfer UXD to you while also being immune to volatility in the prices of SOL?
I’ll give you the answer first and then explain it in detail —
SOL deposited into UXD is used to get into a delta-neutral position on the corresponding perpetual futures market on a Decentralized Exchange
New terms that you need to understand to make sense of that answer —
Perpetual Futures Market
1. Perpetual Futures Market
Perpetual Futures Markets (PERPS) allow traders to place bets on prices of underlying tokens without the tokens themselves exchanging hands. They’re increasingly becoming popular because they reduce friction in the trading process.
When you make a purchase (or a sale) on a PERP market, you are purchasing a contract that stipulates the amount of the token and the price at which you’ve made the purchase.
Let’s say the price of SOL is $120 today and you believe its price will go up.
You can BUY 1 PERP contract for $120 and tomorrow when its price is $125, you can sell it back to pocket the profit of $5.
Vice versa, if you believe the price will go down, you can sell a contract for $120 today and buy it at a lower price at a later date, pocketing the profit.
The UXD Docs have a much more detailed explanation of this which you can check out here.
2. Delta-neutral Position
PERP contracts enable the concept of a Delta Neutral Position. You are said to be in a delta-neutral position if you own PERP contracts such that you are immune to any price changes in the underlying asset’s price.
Understanding this is best accomplished through an example.
Let’s say you do the following —
Deposit 1 SOL that you bought at $120 into a DEX.
You sell 1 SOL-PERP contract at $120
and then, some time passes, and the market price for SOL is now $125
Your 1 SOL is worth 125, profit = $5
and loss from your short PERP position is 1*(120-125) = -$5
So you’ve gained $5 and you’ve lost $5. You’re delta-neutral.
Again, the UXD Docs are THE place to go if you want to get a much deeper understanding of this concept.
Okay, but why would anyone want to be in a Delta-neutral position?
It’s a way to hedge against volatility.
Imagine you’re a trader and you own 100,000 SOL, that’s slightly over ten million dollars at current prices. You want to take a well-earned vacation to the Bahamas but you’re worried about SOL’s price crashing while you’re away from your computer and you can’t stop worrying about the potential millions that you might lose with relatively small changes in SOL’s price.
If you enter into a delta-neutral position, you can enjoy your vacation without worrying about the price of SOL and once you’re back, you would unwind your perp positions and can resume actively trading again with the exact amount of money you started off with.
With that foundation in place, we now can understand what happens behind the scenes when you mint a UXD.
Behind the scenes of the minting mechanism
Remember the answer we started off with —
SOL deposited into UXD is used to get into a delta-neutral position on the corresponding perpetual futures market on a Decentralized Exchange
(Assume that current price of SOL is $120)
You have 1 SOL in your wallet
You go to UXD’s website and it tells you that it is willing to give you 120 $UXD for your 1 $SOL
You click ‘Deposit’
Behind the scenes, the UXD smart contract does the following
Takes ownership of your 1 SOL
Deposits it into a DEX (Mango Markets)
Creates a SHORT position of 1 SOL-PERP at $120
Transfers 120 $UXD to you
So after everything,
You own 120 $UXD
UXD Protocol owns 1 $SOL + SHORT position of 1 SOL at $120
And as we just saw in the previous section, UXD’s position is delta neutral so it is independent of the price of SOL. Your UXD will always be worth $120 and the UXD Protocol’s SOL and the perpetual contract together will also always be worth $120 regardless of SOL’s price.
If you want to redeem your UXD for SOL again, you would deposit it into the platform and the process would run in reverse.
Minting in Practice, Show don’t Tell
Now that you understand the theory, let me show you what the experience is like on the website as of today.
Connect your Wallet
Enter the amount of SOL you wish to exchange for the UXD stablecoin
Review the amounts
Confirm that you’ve received the corresponding UXD in your wallet
Connect your Wallet by clicking the yellow CONNECT button on the top right and select the wallet you have installed on your browser
Accept the prompt that your wallet displays and once it connects successfully, you should see the message on the right.
Enter the amount of SOL you wish to exchange for the UXD stablecoin and review the amounts
The prices should match what you would see on the corresponding exchange, in this case, the SOL-PERP Market on Mango Markets.
Click Mint — This step can take up to 5-10 seconds for the transaction to go through
If everything goes well, you should see a successful message and if you check your wallet, you should be able to see the UXD Stablecoin in it.
If the transaction fails, do not fret! Your funds are safu. And you can try again.
What makes UXD special?
UXD solves the stablecoin trilemma.
Decentralized — Everything runs trustlessly on the Solana blockchain. Unlike USDC or USDT, you don’t have to trust a centralized entity to maintain records and bookkeep correctly. With UXD, you can actually just go straight ahead and look at the accounts yourself. For example this is the link to one of UXD’s mango markets accounts.
Stability — No matter how volatile the price movements of the underlying crypto assets get, due to the nature of the delta neutral position, UXD’s assets should always be roughly equal to the UXD issued and arbitrageurs can maintain the peg by the mint/redeeming process.
Efficiency — You always get 1 UXD for $1 deposited onto the platform. This is as efficient as it can get while maintaining 1:1 collateral factor.
UXD is the best attempt at a perfect stablecoin that the world has at the moment.
What’s the catch?
The Delta Neutral Position isn’t truly neutral. There’s a factor called funding rates in perpetual future markets that is in place to ensure that these markets align with the index price of the underlying asset.
When you hold a perpetual futures contract, you pay (or receive) an additional amount called funding rate on an hourly basis depending on whether the market on that exchange is skewed long or short relative to the index price. This rate has historically been positive, that is the users who hold short positions get paid this funding rate but it can fluctuate temporarily.
This is the unknown in the whole equation which only time will reveal. But UXD has obviously considered this and released a paper analyzing historical funding rates which you can read about here.
The summary is that they do not consider this to be an existential risk to the protocol. The insurance fund they raised through a public IDO contains enough funds to not make this a big problem. And that even in the worst case scenario, people can see it coming from a mile away and have enough time to exit.
I’d be remiss if I didn’t mention the potential positives of the funding rate. Any money that is made off funding rates is planned to be paid to the token holders of the UXP governance token.
Other Risks include
Smart Contract Risk
Underlying Derivative Exchange Risk
Insufficient Liquidity to Exit UXD Positions:
The specifics of which you can read in the Risks section of the UXD docs here.
Topics that were too deep even for a deep dive
We’re ~2,800 words in, are you still with me anon? Here are some topics that I chose not to prioritize in the interest of brevity —
UXP and its Tokenomics — Read here
UXD plans to decentralize over time and has a governance token called UXP for this purpose.
Insurance Fund Management
UXD intends to use its insurance fund to generate yield. Details on this are sparse at the moment.
UXD’s competitive advantage in being a yield-generating Stablecoin
Being sustainably yield-generating over long periods of time would make the UXD stablecoin self-sufficient and help preserve its decentralization.
The team has a solid plan for 2022 and I’m excited to see how much of it they end up executing successfully!
Q1 → Liquidity Mining Programs on Saber to incentivize circulation of UXD
Q2 → Enable functionality of the UXP Governance token and begin the transition to DAO management
Q3 → Cross-chain development
Q4 → Mint other stablecoins for fiat (JPY/EUR)
You can read more through this medium article .
I remember seeing a lot people praise Satoshi’s genius after reading the Bitcoin whitepaper. They admired his ingenuity in connecting multiple disparate ideas together to create something beautiful.
I read the Bitcoin whitepaper multiple times but never really understood that sentiment. I was never able to truly appreciate the genius behind it. I now believe it was because I wasn’t already familiar with the concepts underlying that whitepaper so seeing Satoshi connect them together didn’t impress me any more than the standard amount.
However, with UXD, I finally felt it.
Before I started this deep dive, I already understood the underlying concepts of perpetual futures, funding rates and arbitrage and the need to hedge against volatility. Reading the UXD Protocol whitepaper written by Kento Inami and the corresponding docs which tie everything together beautifully to create the perfect stablecoin was just chefs kiss.
I hope I’ve been able to convey at least some of that beauty with this deep dive.
UXD Protocol is a great example of what makes crypto beautiful.
Somewhere in the world, one person has a brilliant idea. They connect multiple dots together to create a compelling case for something that they believe will solve a pressing problem. They share it with the world through an unassuming white paper. Others read it, get inspired, and then band together to start making it a reality.
The idea should work, it’s based on solid fundamentals.
But will it work?
That is where the fun lies. In knowing the story so far and not knowing how it will play out.
Here’s what I’m looking forward to —
Will funding rates end up bankrupting the UXD insurance fund?
Will UXD be able to offer smooth mint/redeem capability during instabilities of the Solana network?
Will UXD deliver on its promise of stability over long durations of time?
Will UXD suffer from being exposed to multiple avenues for a smart contract hack? If yes, will it be able to recover from such a hack?
My popcorn is ready, is yours too?
If you’ve made it this far, thank you! I wrote this deep dive for a bounty that the Superteam DAO put up. It started off as a shot at making 1000 $UXD but somewhere along the way, the money receded into the background. Towards the end, I just wanted to write to convey the beauty behind the protocol as best as I could.*
I’m now ~3000 words into explaining a 12 word definition. And there’s still so much that did not make the final cut. Crypto is as deep and as fun of a rabbit hole that you can fall into.
I took a lot of creative liberty in explaining the concepts. If you notice any inconsistencies or mistakes, please do hit me up on my Twitter @adarshrao_ . I generally yearn to see the world as clearly as I possibly can and I would love to improve my understanding.
*I’d still like to win first-place though :P
Narrator: And he did.
Where to go from here?
Test your understanding by taking this 11 Question Quiz — UXD Protocol Quizizz
My goal with this deep dive was to provide a solid foundation of the underlying concepts. Here are some other articles on the internet that you can now graduate to and fall into the rabbit hole yourself.
Messari Research Report
The Original Whitepaper by Kento Inami
The Official Docs
Investment thesis by Multicoin
The UXD Website
UXD Protocol — The perfect stablecoin?
An Overview of Stablecoins
Stablecoins: designing a price-stable cryptocurrency
But if you’re anything like me and prefer the mess-around first, figure out later approach —
Go mint your first $UXD from the UXD Website
Explore perpetual futures on Mango Markets, the DEX that UXD runs on
Get a say in governance proposals by swapping some of your crypto assets for the UXP token via Jupiter Swap
Have fun, anon.