Diving into the Celo Price Stability Protocol
An friendly explanation of the Celo stability protocol
This article aims to provide an explanation of the Celo stability protocol as outlined in the Celo whitepaper, as well as provide details of the initial implementation. Subsequent posts will explore an analysis of this implementation and some of the lessons learned along the way. For a higher level overview of Celo, including the price stability protocol, please read A Look at the Celo Whitepaper.
Despite many potential advantages over regular (or “fiat”) currencies, people have been slow to adopt cryptocurrency as a medium of exchange. We believe that this is in large part due to the price volatility of today’s most popular cryptocurrencies. Users may hesitate to use a cryptocurrency for purchases or to pay back friends if the price fluctuates each day. In the same sense, merchants who might accept cryptocurrency would typically then convert payments immediately to fiat so that their cost base is predictable. For a currency to be a useful medium of exchange, it must be able to maintain a stable value. Enter: stablecoins.
Types of Stablecoins
In short, stablecoins are simply cryptocurrencies with stable value, sharing all the appealing characteristics of other cryptocurrencies but without the volatility. They are often, but not always, pegged to a fiat currency like the US dollar. Broadly speaking, stable value cryptocurrencies can be grouped into three categories: fiat-collateralized (FC), crypto-collateralized (CC), and seigniorage style (SS).
Fiat-collateralized (FC) Stablecoins
Fiat-collateralized stablecoins act as IOU tokens. These tokens are created when fiat currency is sent to a centralized party and destroyed when the centralized party returns that fiat to the token holder. Arbitrageurs play an important role in fiat-collateralized systems, purchasing and redeeming tokens when the market price is less than the value of the IOU, and creating and selling tokens when the market price is greater than the value of the IOU.
This mechanism has the advantage of being simple and easy to understand. Theoretically, fiat-collateralized tokens should remain perfectly stable, as they can be easily redeemed for fiat. In practice, however, the redemption process can be slow and expensive. Furthermore, these tokens rely on a trusted centralized third party to hold the collateral, and regulation and regular audits are necessary in order to build and maintain that trust.
Crypto-collateralized (CC) Stablecoins
Crypto-collateralized stablecoins, on the other hand, are backed by cryptocurrencies rather than fiat. This is often done using loan instruments, where users can borrow stablecoins by locking up other cryptocurrency holdings (e.g. ether) as collateral.
These systems are more decentralized than the fiat-collateralized model, as the collateral is held by a smart contract rather than an off-chain entity. The liquidation process occurs entirely on-chain, resulting in faster redemption of the stablecoin for the underlying collateral. Furthermore, crypto-collateralized stablecoins are fully transparent; any user can audit the code or query the amount of collateral being held. Unfortunately, this approach can come at the expense of complexity and requires over-collateralization to absorb price fluctuations in the collateral.
Seigniorage-style (SS) Stablecoins
Finally, seigniorage-style stablecoins algorithmically expand or contract the supply of the stable token in order to match demand. These systems typically introduce one or more non-stable, or seigniorage, assets that may fluctuate in value in response to changes in demand for the stablecoin. This should shift volatility risk from the coin holders to the complementary asset holders, depending on the activity of the market.
These types of systems are arguably the most decentralized, as they don’t rely on any other crypto or fiat currency in order to maintain their stability. However they can be complex to build and analyze, and may be particularly vulnerable to a decline in market confidence around the seigniorage token or the cryptocurrency space as a whole.
The Celo price stability protocol can be thought of as a hybrid crypto-collateralization/seigniorage-style model, designed in a way that we believe offers the best of all three approaches. The protocol supports an ecosystem of stable currencies, the first of which, the Celo Dollar, will be pegged to the US Dollar.
The native asset of the Celo platform is Celo Gold, which is used to expand and contract the supply of Celo Dollars in response to changes in demand, thus serving as the seigniorage-style token. The protocol holds Celo Gold in a reserve along with a diversified basket of crypto assets (e.g. Bitcoin and Ether) purchased through an initial sale of Celo Gold. The protocol maintains a target asset allocation for the reserve (e.g. 50% Celo Gold, 25% Bitcoin, 25% Ether), set via a governance mechanism, which we’ll discuss in a future post. In the initial implementation of the protocol, maintaining this asset allocation will be done in a transparent, systematic, but more manual fashion. We anticipate that as decentralized cross-chain exchanges and bridges mature and add liquidity, Celo will continue to automate this process.
The reserve ratio, also called the collateralization ratio, represents the size of the reserve with respect to the total value of all outstanding stablecoins. Maintaining a high reserve ratio is critical to the stability of the system. The protocol has two mechanisms to boost the reserve ratio in times of need. First, a variable transfer fee can be automatically placed on Celo Gold. This fee goes directly to the reserve, and encourages the long-term holding of Celo Gold. Second, a portion of the block rewards can be diverted to bolster the reserve.
Finally, the protocol levies a small stability fee on Celo Dollars. This encourages circulation, a desirable outcome for a medium-of-exchange currency, and contributes to the overall stability of the system.
Expansions and Contractions
The protocol uses the reserve to adjust the supply of Celo Dollars in response to changes in demand. It relies on a number of ‘oracles’ external to the blockchain to provide feeds of the Celo Gold price in US Dollars. To maintain the peg, the protocol allows users to create new Celo Dollars by sending $1 worth of Celo Gold to the reserve, or to destroy Celo Dollars by redeeming $1 worth of Celo Gold from the reserve. This is similar to how fiat-collateralized coins work, except that the trusted third party (e.g. Tether or Circle) is replaced by a decentralized protocol.
When demand for the Celo Dollar rises and the market price is above the $1 peg, arbitrageurs can profit by purchasing $1 worth of Celo Gold, exchanging it with the protocol for one Celo Dollar, and selling that Celo Dollar for the market price, pocketing the difference. Similarly, when demand for the Celo Dollar falls and the market price is below the peg, arbitrageurs can profit by purchasing a Celo Dollar for the market price, exchanging it with the protocol for $1 worth of Celo Gold, and selling the Celo Gold to the market. These actions drive the market price of the Celo Dollar back towards $1.
Additional mechanisms are needed to prevent the reserve from becoming overly depleted when the price of Celo Gold supplied by the oracles does not match the market price. This can happen during times of high volatility or when the oracle system is compromised. Without these mechanisms, the protocol may offer to sell Celo Gold at a large discount, or purchase it at a large premium, depleting the reserve and weakening the protocol’s ability to absorb future contractions in demand for Celo Dollars.
To mitigate this risk, the protocol uses a constant-product market-maker model*, inspired by Uniswap, to dynamically adjust the offered exchange rate in response to exchange activity. Whenever the oracle price of Celo Gold is updated, the protocol initializes a new constant-product market-maker that will trade Celo Gold and Celo Dollars with users at the exchange rate provided by the oracle.
If the oracle price is correct, the exchange rate quoted by the constant-product market-maker will be equal to that of the market, and no arbitrage opportunity will exist. If the oracle price is incorrect, the two rates will differ, and an arbitrage opportunity will exist. As arbitrageurs exploit this opportunity the constant-product market-maker model will dynamically adjust the quoted exchange rate until the arbitrage opportunity is erased.
*A more thorough description of this mechanism can be found here.
Designing a new stablecoin protocol has been a long journey, and with the contributions of a diverse group of academics, students, developers, cryptographers and many others, we’ve learned a lot along the way. At the core of this journey has been a simulation framework, which allowed us to explore a wide range of scenarios and analyze those which put the protocol at the greatest risk of depegging. This framework was a critical tool for informing design decisions and evaluating the protocol as it evolved. We’ve laid out the details of this framework in our stability analysis, and will explore this even further in our next blog post.
Of course, not everything can be simulated, and for that we turned to testing our protocol in the wild. In January, we hosted a workshop at MIT, where students participated in an auction-based implementation of our protocol, competing to earn prizes. You can read more about this workshop in this blog post by the winner, Alex Berke.
This workshop proved invaluable, and thanks to a variety of feedback it made sense to switch from a red-black-tree-based decentralized auction to our current, uniswap-based design, which is simpler and offers a tighter arbitrage cycle. These learnings matched feedback we received from market makers and other experts in the field, who impressed upon us the importance of simple, fast, and direct arbitrage cycles for maintaining price stability.
Blockchain technology offers the opportunity to connect people globally and bring financial stability to those who need it most. We believe that stable value cryptocurrencies will be the basis on which this opportunity is fulfilled.
Celo offers a new stable currency protocol that combines the advantages of the crypto-collateralized and seigniorage-style models. We see this protocol as the foundation for a monetary system that creates the conditions for prosperity for all.