Roman Croessmann
May 29 · 10 min read

This article adds to the previous blog post about the Celo Price Stability Protocol and the Celo Stability Analysis by zooming in on the mechanism used to achieve expansions and contractions of monetary supply in the Celo protocol. The properties of this mechanism are explained by describing the journey that led to the current design.

Motivation

Most stablecoins, such as Tether or TrueUSD, are centralized. This makes them easier to control and manage. Celo, however, will be decentralized. This makes it unique in proposition and value, and uniquely challenging: security of the stablecoin peg (the value) must be maintained and protected against numerous scenarios and attack vectors.

In theory, a stablecoin will keep its peg as long as demand and supply meet at the target price. A stablecoin with an excess of supply will lead to it being devalued; a stablecoin with a deficit of supply will lead to exceeding the value of its peg. To address this, stablecoins employ mechanisms to adjust monetary supply. For fiat stablecoins, these mechanisms are relatively straightforward: by allowing one-to-one issuances and redemptions against fiat currency via a centralized party, momentary incentives are created to redeem coins whenever the market price drops below the peg. For decentralized stablecoins such as the Celo Dollar, a more expansive mechanism for adjusting monetary supply is required. There are several subtleties in particular that need to be accounted for, which we address in this article.

This article examines the mechanism used to adjust monetary supply in the Celo protocol. To learn more about the price stability related features of Celo, please see Diving into the Celo Price Stability Protocol.

Subtleties of Adjusting Monetary Supply

The price of an asset theoretically results from the intersection of its demand and supply curves. The figure below visualizes this concept using the Celo Dollar with a target price of 1 US Dollar, as an example.

Exemplary supply and demand curves for the Celo Dollar

Within this simple concept, there are several subtleties. First, the demand quantity at the target price is not, in reality, observable unless the stablecoin is precisely pegged. Every mechanism that proactively decides the contraction and expansion quantities, therefore, has to first estimate the demand at the target price.

One way to approach this is to use an oracle value of the market price of the stablecoin and to make an assumption about the exact shape of the demand curve. This, in combination, would be sufficient to determine the demand quantity and thereby the optimal expansion and contraction amount. The shape of the demand curve, however, is in reality unknown and time-varying. Mechanisms that proactively determine optimal expansion and contraction quantities are therefore prone to overshooting and undershooting during adjustments of monetary supply.

Additionally, to be able to contract monetary supply by a certain amount, collateral assets have to be offered in exchange for the stablecoin. This is more complicated when the pegged asset is not fiat but, in fact, any tradable asset with a variable value. Offering assets with too much value in exchange will lead to a depletion of the reserve, and jeopardize the long-term stability of the protocol, while offering assets of insufficient value will leave the contraction attempt unsuccessful as protocol participants will not have strong enough incentive to sell their stablecoins to the reserve.

Any expansion and contraction mechanism must therefore solve the trade-off between offering too little and too much value in collateral assets during times of contraction. The protocol must solve a similar trade-off during expansions; namely, ensuring that the price at which newly minted Celo Dollars are purchasable is low enough to attract buyers, but high enough to achieve close-to-optimal reserve gains.

An initial analysis of the Celo protocol made the simplifying assumption that the desired expansion/contraction amounts were known at every time step. Additionally, expansions and contractions were modeled to always take place at the market price unless there was insufficient value in the reserve during times of contraction and/or unless a certain liquidity constraint was violated. This is a valid approach to get a first idea about the stability properties of the protocol. It however abstracts away the actual mechanism by which such adjustments of monetary supply are supposed to be achieved and thus leaves out potentially relevant details. As the initial mechanism, a capped multi-unit first-price sealed-bid auction, was implemented on the blockchain and field tested, it showed that there are several disadvantages to such a design. This led to a re-evaluation of the decision to use an auction-based mechanism and kicked off a journey towards the current design.

Road to the Celo Expansion and Contraction Mechanism

Several expansion and contraction mechanisms were implemented and investigated as competing alternatives for the Celo protocol.

Capped Multi-Unit First-Price Sealed-Bid Auction

The initially implemented mechanism was a capped multi-unit first-price sealed-bid auction, which seems to be the preferable type of auction for the given purpose. In a capped multi-unit first-price sealed-bid auction, the protocol estimates the optimal expansion/contraction amounts as a function of the Celo Dollar price by assuming a certain shape of the Celo Dollar demand curve. The maximum Celo Dollar quantities sold/bought by the protocol are then capped at those estimated amounts and participants can submit sealed bids by stating the quantities of Celo Gold and Celo Dollar coins they are willing to exchange for each other — implicitly stating their required exchange rate by doing so. Auction participants are able to submit bids with respect to any fraction of the capped quantities which makes this a multi-unit auction. Since the required exchange rate that participants bid at would also be the resulting transaction price in case their bid is filled, this design is a first-price auction.

This initial design was tested during a workshop at MIT in which students were competing for prizes by participating in on-chain auctions during a test-run of the protocol. The winner of this contest wrote a detailed blog post about her experience. The MIT workshop, further research, and discussions with experts in the field showed that the auction-based mechanism has several drawbacks. The most pronounced being that:

  • The auction design creates a lot of uncertainty for participants as it is unclear at which rate Celo Dollars can be successfully bought or sold in exchange for Celo Gold during the next auction. As a result, expansion and contraction cycles during de-pegging periods are not tight. This can lead to, for example, weak incentives to buy undervalued Celo Dollars off the market to subsequently sell them in an auction.
  • The protocol needs to actively decide the desired expansion and contraction quantities and therefore has to estimate the demand quantity at the target price. This inevitably leads to overshooting or undershooting during adjustments of monetary supply as explained in the previous section of this blog post.
  • The technical implementation of the capped multi-unit first-price sealed-bid auction is complex and requires a large set of parameters to be set, such as the auction frequency, the duration of the different auction stages, and so forth. The complex setup makes it hard to uncover and mitigate possible attack vectors and the implementation is computationally expensive.

Based on the above drawbacks, the decision to use an auction-based expansion and contraction mechanism was re-evaluated and potential alternatives were discussed. This led us to the following design.

Decentralized One-to-One Mechanism (DOTO)

This mechanism allows users to create new Celo Dollars by sending 1 US Dollar worth of Celo Gold to the reserve, or to burn Celo Dollars by redeeming them for 1 US Dollar worth of Gold. This creates incentives such that when demand for the Celo Dollar rises and the market price is above the peg, a profit can be achieved by buying 1 US Dollar worth of Celo Gold on the market, exchanging it with the protocol for one Celo Dollar, and selling that Celo Dollar for the market price. Similarly, when demand for the Celo Dollar falls and the market price is below the peg, a profit can be achieved by purchasing Celo Dollars at the market price, exchanging it with the protocol for 1 US Dollar worth of Celo Gold, and selling the Celo Gold to the market.

A numerical example for each of the cycles explained above is displayed in the figure below. For illustrative purposes, the examples assume that the cGLD/USD exchange rate is 5.0 and that the oracle correctly reports this value. The contraction cycle example additionally assumes that a Celo Dollar can be bought for 0.95 US Dollar on the market and explains how this creates an incentive for users to sell this coin to the reserve. The expansion cycle example illustrates a situation in which the Celo Dollar trades above the peg, for 1.05 US Dollar, and shows why this creates an incentive for users to create new coins.

Numerical examples for contraction and expansion cycles

Expansion and contraction cycles drive the market price of the Celo Dollar back towards 1 US Dollar without the need for the protocol to estimate the optimal expansion or contraction amounts, which avoids overshooting or undershooting during monetary supply adjustments. The DOTO mechanism reduces uncertainty for participants as the value for which coins can be redeemed and issued on-chain is fixed, allowing for tighter contraction and expansion cycles. Also, the setup is simple and less complex to implement, which makes it easier to uncover and mitigate possible attack vectors.

The DOTO mechanism can be seen as the decentralized version of the one-to-one issuance and redemption mechanism of most fiat-backed stablecoins. There is, however, one major drawback to a direct implementation: a precise oracle value of the Celo Gold to US Dollar market rate is required at every point in time. In cases in which the Celo Gold to US Dollar oracle value is imprecise, profit opportunities exist even if the Celo Dollar is perfectly pegged and such unintended profit opportunities can lead to a depletion of the reserve.

Constant-Product Decentralized One-To-One Mechanism (CP-DOTO)

This mechanism is the currently implemented expansion and contraction mechanism of the Celo protocol. It uses a constant-product-market-maker model, inspired by the Uniswap system, to mitigate the depletion potential of the DOTO Mechanism; the resulting mechanism will be denoted by CP-DOTO in the rest of this article. CP-DOTO works as follows.

Two wallets controlled by the protocol, one containing Celo Dollars and one containing Celo Gold, are initialized whenever the Celo Gold to US Dollar oracle value is updated. The central equation for the constant-product-market-maker model fixes the product of the wallet quantities to some constant. Given this rule, it can be shown that the price of a small amount of Celo Gold, to be paid in Celo Dollar units, is simply the ratio of the Celo Dollar wallet units over the Celo Gold wallet units.

Whenever the Celo Gold to US Dollar oracle rate is updated, the protocol initializes the wallet quantities that lead to an on-chain Celo Gold to Celo Dollar exchange rate which equals the current oracle rate. If the oracle precisely mirrors the market rate, the on-chain Celo Gold to Celo Dollar rate will equal the Celo Gold to US Dollar market rate and no profit opportunity will exist as long as the Celo Dollar is pegged. If the oracle price is imprecise, the two rates will differ, and a profit opportunity will be present even if the Celo Dollar is pegged. However, as traders exploit this opportunity, the on-chain price will dynamically adjust in response to changes in the wallet quantities until the opportunity ceases to exist. This limits the depletion potential in the CP-DOTO mechanism in the case of imprecise or manipulated oracle rates. As an additional safeguard, a spread around the oracle exchange rate could be implemented; the benefit of adding such a spread is currently being investigated.

The figure below describes the CP-DOTO setup using the numerical example for a contraction cycle given in the last section . To set the on-chain cGLD/cUSD price to the cGLD/USD oracle value of 5.0, the wallet quantities are initialized with a 5:1 ratio (left diagram). After one Celo Dollar coin was sold to the reserve, the cUSD wallet increases by 1 and the cGLD wallet decreases by approximately 0.2. This results in a new on-chain exchange rate of roughly 5.02 (right diagram).

Numerical example of on-chain price reaction to on-chain trading

Since the price in the constant-product-market-maker model depends only on the ratio of the wallet quantities, there is a Celo Gold wallet quantity for every positive Celo Dollar wallet quantity, which achieves the desired oracle rate during wallet initialization. In the example displayed in the figure above, initial wallet quantities of 1,000 cGLD and 5,000 cUSD could have alternatively been chosen to mirror the oracle rate of 5.0. By increasing (or decreasing) the absolute size of the wallets during wallet initialization while keeping the ratio constant, the speed by which the rate adjusts in response to on-chain transactions can be increased (or decreased). The tradeoff to be solved is between setting absolute wallet sizes large enough that large expansions and contractions can be achieved without moving too far away from the target price, and setting wallet sizes small enough to limit the depletion potential during times of imprecise oracle rates. Setting the right parameters for the CP-DOTO mechanism is important and parameters are initially chosen based on a simulation analysis of the Celo protocol.

Conclusion

The expansion and contraction mechanism used to adjust monetary supply is a central piece of every decentralized stablecoin project. This article describes how monetary supply adjustments are achieved in the Celo protocol.

We hope for an active discussion of the Celo expansion and contraction mechanism in the community and welcome ideas about potential improvements.

The Celo Blog

Celo is an open platform that makes financial tools accessible to anyone with a mobile phone. Visit celo.org for info on the community, team, and technology.

Roman Croessmann

Written by

The Celo Blog

Celo is an open platform that makes financial tools accessible to anyone with a mobile phone. Visit celo.org for info on the community, team, and technology.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade