The Celo Stability Machine

Cody Born
Tango Validator
Published in
5 min readAug 19, 2020

On June 28th UTC, the Celo community enacted governance proposal #7 to enable the Celo stability protocol. Until this point, the stability machine sat idling, waiting for the community to press the ON button; its reserve filled with millions of dollars in crypto stock and Oracles quietly reporting price feed data. With over 54M votes backing the decision, the stability machine booted up with a single transaction. Since the machine has been activated, 7.3M Celo Dollars (cUSD) have been introduced into circulation as stability seekers interact with the decentralized protocol.

Unlike traditional machines, the Celo Stability machine is generic and upgradable. Today it only supports cUSD, but with some additional deployments and governance proposals, it can provide a wide range of stable assets. National currencies like the Brazilian Real, commodities like gold, and even an index based on a basket of stable assets can be supported by this single machine. In fact, the Tango Validator Group is proposing cBRL as the next stablecoin. This article explores the process of upgrading the machine to produce other types of assets.

The Celo Stability Machine

Maintaining Stability

To understand how to add new assets, it’s important to first understand how the machine maintains the value for each of the outstanding assets. To keep each outstanding asset solvent, the machine maintains a reserve of Celo native asset (CELO) tokens, which it will use to buy back the stable asset at the market price. For example, a Celo user can mint a cUSD token by depositing one US dollar’s worth of the CELO. A holder of a cUSD token, can go back to the stability machine at any point in the future and deposit it to collect one US dollar’s worth of CELO at the current rate. This is the mechanism that keeps the cUSD worth one US dollar.

Since the machine is decentralized, no single entity can prevent people from using the machine. However, this decentralization poses additional challenges. For it to know the price of CELO measured in US dollars, the machine has to constantly be fed the current CELO price from other exchanges. This role is filled by the Oracles, which are semi-trusted computer programs that submit price data into the stability machine. Currently these Oracles are operated by cLabs, but for the system to be truly decentralized, other operators will need to participate in providing this critical data into the system. To allow others to operate Oracles, we will first need to build in Oracle incentivization into the protocol.

Oracle Incentivization

Malicious Oracles can do serious damage to the reserve. There are a number of mechanisms in place to prevent a single Oracle from manipulating the price and draining the reserve. However, it’s still possible for colluding Oracles left unchecked to drain a significant portion of the reserve. For example, if the Oracles are able to trick the stability machine into believing that the price of CELO is $200 instead of $2, then the machine will happily overpay users 200 cUSD for every CELO instead of correctly paying just 2 cUSD.

To prevent this type of manipulation, the Oracle’s incentives must be properly balanced. Since the Oracles can extract real value from the system, there needs to be a slashing mechanism to punish malicious Oracles. If an Oracle can extract $1K by cheating but will lose $10K, then a rational Oracle will remain honest. To build this, we need to be able to let the stability machine realize when an Oracle is misbehaving. Understandably, this is tricky, since the stability machine doesn’t naturally know what the price feeds should be (that’s what it uses the Oracles for).

One potential solution is to compare a single Oracle’s price report with the rest and penalize the Oracle based on its distance from the average value. A large variance will be penalized exponentially more than a smaller one. This creates a sort of Schelling point, where Oracles will naturally gravitate toward the actual price. Since this solution isn’t perfect, there can be additional penalties triggered via CELO token holder voting to handle disputes or repeat offenders.

Getting Reliable Ticker Data

Once the Oracles are properly incentivized, operation can be opened up to the community. The next challenge to adding assets is to pull in new, reliable price feeds for each of the asset types. Similar to how the existing Oracles query the USD/CELO ticker price for cUSD, to support a cBRL asset Oracles will need to find a reliable source for the BRL/CELO ticker price.

Example request

https://api.bittrex.com/api/v1.1/public/getticker?market=USD-CELO

Example Response

A challenge to querying the BRL/CELO pair is that many large volume exchanges don’t yet support Brazilian Real, which makes it difficult to get a reliable exchange rate between the two. To solve this, we’ll likely need to leverage implicit pairs. Since we have some markets trading CELO/USD and other markets trading BRL/USD, we can derive the pair CELO/BRL by using USD as the bridge. Each currency “hop” adds more uncertainty in the price, but in a healthy market with sufficient volume and active arbitrage, the implicit pair of CELO/BRL can work. Currently, cLabs is experimenting with implicit pairs for CELO/USD. From this research, we’ll have a better idea of the hurdles and mitigations to support implicit pairs generally.

Over the coming months, we’ll work toward both decentralizing the Oracles and providing reliable price feed data using implicit pairs. With these two milestones achieved, we’ll be able to put an entirely new class of assets in the hands of each Celo user. As a validator group on Celo, we believe that Oracle decentralization is important and we’re looking to do our part to help realize the potential of cBRL and other stablecoins.

Tango is a validator group on the Celo network working toward stronger representation of Latin America in the Celo ecosytem. Our first proposal is for a Brazilian Real Stable currency (cBRL) to provide a bridge with the existing Brazilian economy. You can read more about it here,

https://medium.com/celoorg/proposing-the-brazilian-real-on-celo-d42b8863b070

Disclaimer: The Tango Validator Group includes members of cLabs, an organization working on Celo.

--

--