RAI, The Free-Floating Stablecoin That Actually Works

An overview of the stablecoin that tries to become both decentralized and non-volatile, without keeping a fixed price peg

Juan Pellicer
IntoTheBlock
7 min readMar 9, 2023

--

The inherent volatility of most crypto assets has always been a major issue in DeFi. The best exemplifying story of this was the large dependency that MakerDAO initially had on ETH as collateral for the issuance of DAI. After the March 2020 wide market crash, Maker decided to introduce stablecoins as collateral types, mainly USDC. By DAI being largely backed by stablecoins as collateral, the protocol minimized the chance of a default risk due to large price moves on their collateral assets, which would put pressure on the reliability of loan repayments and the efficiency of its liquidation system. This was not welcomed by some critics, who considered the increased reliance on USDC a centralization risk. But not only CDP (collateralized debt positions) protocols are affected by asset volatility. For example, asset volatility on AMMs can cause large price slippages and impermanent losses for liquidity providers. This can be equally problematic for lending protocols, similar to CDPs, where volatile crypto assets can cause default risks for lenders if borrowers fail to repay their loans due to rapid asset price crashes.

Stablecoins are the best solution to this problem, and the crypto ecosystem is lucky to have some stablecoins for almost 10 years (USDT started in 2014). While using stablecoins can reduce the risks associated with volatility, there are concerns about counterparty risk. The price stability is maintained by their issuers, which means that they are subject to the same risks and vulnerabilities as traditional financial systems. Additionally, the mechanisms used to maintain stablecoin prices can be complex, opaque and may not always function as intended, which can create a new set of risks. So, would it be possible to have a stablecoin that is also decentralized?

Welcome RAI

The origins of RAI can be traced back to 2019, when Nikolai Mushegian (MakerDAO Co-founder) began working on the project with the vision of creating a stablecoin that was not tied to any external asset, but instead relied on an algorithmic approach to maintain its value. In February 2021, RAI was officially launched on the Ethereum blockchain with the mission to create a low-volatility and trustless store of value that could be used in DeFi.

The idea behind RAI is that it will maintain a stable value over time, regardless of market conditions. This makes it an attractive option for investors who are looking for a stable store of value that is not tied to any external asset. Remaining stable also has large benefits for using it as collateral for loans. Additionally, RAI can be used in a wide range of DeFi applications, such as other lending and borrowing protocols, decentralized exchanges where it’s trading, and more.

RAI asset reliance is solely on ETH, since RAI can be minted by users who deposit ETH in a Safe (called vaults in other protocols) and borrow a proportional amount of RAI. Similarly to Maker, this is what is known as a collateralized debt position. Borrowing RAI can have several use cases, the most common would be to leverage a long position on ETH by exchanging the borrowed RAI for ETH, and depositing again the ETH into the Safe. At a 135% minimum collateralization ratio per Safe that means a potential maximum leverage of 3.8 times the initial ETH. Other uses for RAI can be to provide it as liquidity in DEX pools on Uniswap, or lend it in protocols like Euler for yield.

RAI pricing mechanism

This is a complex technical topic, but putting it simply into a one-liner: RAI achieves price stability by dynamically adjusting its circulating supply based on supply and demand. This is achieved by comparing the RAI market price with the RAI target price (named redemption price, since in case of a protocols shutdown that is the price that the protocol would settle all debt). If the price of RAI is above its target price, the supply of RAI tends to increase. If the price of RAI is below its target price, the supply of RAI tends to decrease. This is done with a controller smart contract that economically incentivizes the users of the protocol, RAI borrowers and RAI Holders, to keep the market price close to the redemption price. Historically it can be seen in the image below that at least since the start of 2022 the redemption rate of RAI has been following a downward trend that after months has finally equilibrated. This resulted in RAI market price slightly dropping from $3.05 at the start of 2022 to $2.85 today. Can you spot when 3AC filed for bankruptcy and some whales ran to buy and hold RAI expecting volatility in BTC and ETH due to their liquidation process?

Source: IntoTheBlock Research, source: RAI Uniswap Analytics

The protocol measures the market price of RAI using an oracle that feeds data from multiple DEX pools. It compares the market price of RAI with its redemption price and calculates the difference between them. In order to adjust the redemption price, the protocol uses a feedback mechanism called Proportional-Integral-Derivative (PID) controller to reduce that difference.

PID controllers are widely used in industrial control systems and other applications that require continuous and precise control. One real life example of a PID controller is the cruise control on a car. The cruise control can maintain a constant speed by adjusting the engine power based on the feedback from a speed sensor and the desired speed set by the driver. The PID controller can compensate for changes in road conditions, such as hills or wind, that would otherwise affect the speed of the car. In the next image can be seen the simulation of a PID controller that is changing their parameters to keep the system response (blue), pegged to a desired value (green):

Credit to Bthsrobotics for the gif.

Same idea can be applied to RAI and its relation between market price (the sensor) and redemption price (the target). The PID controller has three parameters: proportional gain (Kp), integral gain (Ki), and derivative gain (Kd). These parameters determine how quickly and smoothly the redemption price responds to changes in market conditions. The PID controller periodically outputs a new redemption price. These are the two possible scenarios:

  • Market price > Redemption price — RAI price should decrease soon, this creates sell demand:

RAI borrowers: are incentivized to borrow more RAI, sell it, and buy back later RAI for repayment, since it will decrease in price it will be cheaper. This would increase the RAI supply and lower the RAI market price.

RAI holders: are incentivized to sell RAI, expecting a decreasing price of RAI. This would lower the market price.

  • Market price < Redemption price — RAI price should increase soon, this creates buying demand.

RAI borrowers: are incentivized to repay their Safe RAI debt, since it would be more expensive soon. This would reduce the RAI supply and increase the RAI market price.

RAI holders: are incentivized to hold or buy more RAI, expecting a decreasing price of RAI

The main advantages of this pricing mechanism are that it does not rely on any external collateral or pegs, making it more decentralized and resilient to market shocks. It does not require any governance intervention or human discretion, making it more transparent and predictable. It also allows for some degree of volatility while maintaining stability over time. Still it faces several challenges, since it requires accurate and reliable oracle data to measure the market price of RAI. It also depends on sufficient liquidity and arbitrage opportunities in the market to ensure convergence between market price and redemption price.

The “Money God”?

Analyzing the previous price chart of RAI prices it can be seen how its price since 2022 has dropped by almost 9%. Although not ideal for an stablecoin, it is a more manageable price drop than most crypto assets, which have averaged more than 70% drops during this bear market. A fairer comparison to be made would be to measure the devaluation of a set of forex currencies against the dollar, which is what can be seen in the next image:

Source: IntoTheBlock Research, Inspired by @gorondan

As can be seen RAI has remained less volatile than the other currencies, despite not being the currency that has devalued the least. For example, during most of this period, holding RAI instead of EUR would have resulted in less losses compared to the dollar.

RAI’s stability provides protection against inflation and currency devaluation without any central authority or intermediary. This stability without being pegged to any external asset or currency makes RAI an ideal asset for DeFi purposes such as debt collateralization. Moreover, the decentralization of RAI makes it less susceptible to censorship and manipulation than other cryptocurrencies. Overall, RAI’s stability and decentralization make it a reliable and trustworthy asset for a variety of key DeFi purposes.

--

--