What is RAI?
RAI is a debt-based algorithmic stablecoin that is not pegged to any FIAT currency. Instead, the price of RAI in USD fluctuates over time based on supply and demand. The effect of these forces is intended to be controlled by RAI’s PID (Proportional Integral Derivative) algorithm. RAI is issued by Reflexer Labs and was launched in February 2021.
Currently, it can only be minted on Ethereum, and only ETH can be used as collateral. There are plans to expand RAI minting to certain L2s, but as of today, the only way to utilise it on other chains, such as Polyon, Optimism, and Arbitrum, to name just a few, is to bridge it.
As of 16.09.2022, the supply is roughly 5m RAI, with a price hovering between $2.6 and $3, giving it a market cap of ~$14m. RAI is one of the smaller stablecoins in the market, #46 by market cap as of the date of this article. Reflexer Ungovernance Token, FLX, is the governance token for RAI, through which different parameters, such as the collateralization rate, can be adjusted.
For the time being, the main ways to earn yield for both RAI and FLX are through lending platforms such as Aave or by providing liquidity on DEXs such as Uniswap. FLX/wETH can also be staked directly on Reflexer. Reflexer also has in place Liquidity Mining Incentives, which can be found here.
How does it work?
RAI is conceptually similar to how SAI (Single Collateral DAI) worked. Users create a vault, called a Safe, and deposit ETH to borrow (mint) RAI. This increases the supply of RAI. Once users pay back their RAI, the RAI is burnt, thus reducing the supply, they can redeem their ETH.
The code used by RAI is forked from Multi-Collateral DAI with some innovative additions, such as the PID controller, liquidation protection, and different auction houses to name a few.
Figure 1. Comparison between early DAI (SAI) and RAI
Figure 2. Evolution From SAI to RAI 2017-2021
The minters of RAI pay a fixed stability fee of 2% per annum. The minimum amount of RAI that has to be minted to open a vault is, as of 16.09.2022, 2167 RAI. This is subject to governance, and in the past, it was 800 RAI. Source: Link.
There are three critical components to understanding how RAI works:
- Redemption Price: Also called the global settlement, is the internal price of RAI. A certain amount of RAI can be redeemed for a governance-controlled predetermined $ amount of ETH.
- Market Price: The current market price of RAI on the open market, such as on Curve or Uniswap.
- Money God: The PID controller (algorithm) attempts to keep the deviations between the redemption and market price as small as possible.
Currently, RAI depends on Chainlink to provide its smart contracts with market data.
RAI as a Store of Value (SoV)
The USD price of RAI fluctuated severely at launch and so did the number of RAI outstanding. After the price discovery phase was over, its price oscillated around $3. Its average price has been $3.024 with a standard deviation of just $0.061. The amount of RAI outstanding has fluctuated widely and since 16.06.2022 has sat at around 5.7m.
The most recent fluctuations in RAI, are due to general market movements and not to changes by the governance. On the one hand, the collapse of Terra/Luna forced people out of UST into other stablecoins, increasing the price of RAI. On the other hand, the collapse of Ethereum in June has also affected RAI. As the PID negatively increased the redemption rate, RAI’s price continued to fall.
Figure 3. Historical Evolution of RAI’s Market Price and Redemption Price
Figure 4. Historical Evolution of RAI’s Supply
Figure 5. Historical Evolution of RAI’s Safe Vault Creation
Reflexer attempts to control the supply and demand forces through its PID controller. The PID calculates an error value, the difference between the Market and Redemption Prices, and performs a correction to minimise it. The PID takes into account how long and how big the error was. Given its iterative and progressive logic, the PID can’t make abrupt changes to the parameters, plus doing so would be harmful to RAI’s stability. The PID changes the redemption rate, the rate at which RAI is being repriced internally by the system. As the redemption rate changes, so does the redemption price.
There are 2 main scenarios for the PID to act. In both cases, the protocol 1) relies on rational market participants and 2) depends on ETH’s price action.
Scenario 1. Market Price > Redemption Price
- Goal: Reduce the Market Price.
- The protocol makes RAI debt inexpensive (Decrease Rate of Redemption)
- Selling pressure from RAI Vaults and Speculators
- Users are incentivized to open a vault and immediately sell the minted RAI at market. Assuming an initial debt of $1000, at the final epoch, the debt would have sunk to $924.
Figure 5. Scenario 1 for the PID Controller where the Market Price > Redemption Price
- If the above scenario plays out, the following could be done to profit from it, and in turn cause the above to occur.
- Deposit ETH to mint RAI. The position incurs 2% p.a. costs.
- Sell RAI.
- When the Market < Redemption price, repurchase RAI.
- Pay off debt to recover ETH. The difference between RAI prices is profit minus the RAI minting costs.
Scenario 2. Market Price < Redemption Price
- Goal: Increase the Market Price.
- The protocol makes RAI debt expensive (Increase Rate of Redemption)
- Buying pressure from RAI Vaults and Speculators
- Assuming a user had debt worth $1000 of RAI, waiting to repay the debt would imply an increase in his debt. In the scenario below, the redemption price moves by 4% from 3.5 to 3.65, causing the debt to increase by the same percentage to $1043. This debt increase would take roughly 100 days.
Figure 6. Scenario 1 for the PID Controller where the Market Price > Redemption Price
- If someone wanted to bet that the above scenario will play out and do the following, which in turn also forces the above scenario to happen:
- Buy RAI
- When the Market > Redemption price, sell RAI.
- The difference between RAI prices is profit.
The deviation between the Market and the Redemption price has been fairly small over the past year. Only growing after the forced liquidations during June led Ethereum’s price to crash. The divergence in prices has since closed.
Figure 7. Historical Evolution of RAI’s Market to Redemption Price Deviation
Figure 8. Historical Evolution of the Deviation Between UNI RAI/DAI v3 Price Against the Redemption Price
The liquidation ratio can be changed through governance and as of 16.09.2022, it is 135%. At protocol launch it was set to 145%. For example, if a user holds $100 worth of RAI, the ETH held as collateral by the protocol must be at least worth $135.
There’s a one-hour delay between a position falling out of threshold and said position being liquidated. This allows users to have a safety buffer and act up to save their position. If users are liquidated, they risk losing up to all of their collateral (ETH) and can keep the RAI minted.
Positions that meet the liquidation criteria ought to be liquidated by 3rd parties, called “Keepers”. They’re economically incentivized to monitor the positions. The collateral of the Safe is sold in an Auction at a discount to cover the position’s debt.
When a liquidation occurs, an additional liquidation penalty of 10% is added to the total outstanding of the position. This fee accrues directly to the protocol. The value can be changed through governance and was set at 12% at launch. The remaining part of the collateral can be withdrawn by the user, which ranges from 0% to 10% of their collateral.
If no one bids for the collateral in an auction, the system uses a “Surplus Buffer” to eliminate the bad debt. If the buffer is not enough, Reflexer will auction the newly minted FLX. The RAI that is paid for FLX will be used to repay the system’s debt.
How to avoid liquidations
The easiest way to avoid getting liquidated is by using a big enough collateral ratio that can dampen a heavy ETH crash. At a Collateral Ratio of 150%, ETH would only need to drop by 10% to trigger the liquidation.
Another layer of liquidation protection is the so-called “Saviour”. An LP token is deposited in a Safe. If the liquidation threshold is reached, the LP can be used and liquidity will be pulled from Uniswap v2 and added to the Safe. As of 16.09.2022, only the RAI/ETH Univ2 LP tokens are supported. In the future, other pools such as RAI/ETH Univ3 or RAI/3crv could be added.
Figure 9. Price Sensitivity of the Collateral Used to Mint RAI
By adding more collateral, the CRatio increases, and the liquidation is avoided or delayed. The user can customise the “Target Rescue Collateral Ratio”, which is the minimum new Collateral Ratio by adding liquidity. There is a flat fee that has to be paid if the Saviour module is triggered.
Where is RAI?
Roughly 45% of RAI’s supply can be found in liquidity pools across Uniswap and Curve as shown below. The rest of the supply can be found in money markets like Euler or Aave, yield aggregators like Yearn, or wallets. Reflexer has been integrated by over 40 protocols as shown below.
Figure 10. Historical Evolution of RAI’s Supply Distribution
Figure 11. Reflexer Ecosystem: Partnerships and Integrations
Governance & Tokenomics
Reflexer Lab’s governance token is FLX, which has two main functions:
1. Backstop mechanism
Staked FLX can be used by the protocol as a price backstop mechanism. If that’s not enough, the protocol will start debt auctions that will mint FLX and auction it for RAI
FLX holders will be able to remove control from any remaining components in RAI or, if needed, continue to manage components.
The initial token distribution was as follows:
Table 1. RAI Token Distribution
Note. From 15.04.2021 until 15.04.2022, the tokens were locked.
The protocol implemented buyback and burn on FLX. Therefore, the current supply is 984,332. The market cap and FDV are as follows:
Table 2. RAI’s Supply, Market Cap, and FDV
Given that RAI only holds ETH as collateral, users’ funds cannot be frozen due to 3rd parties acting against Reflexer Labs or RAI users. For centralised stablecoins, this is not a bug but a feature, as USDC/USDT can freeze users’ assets for a number of legal reasons. Nonetheless, for RAI’s operations, it’s critical to have a reliable oracle to provide data to the smart contract that controls the PID algorithm.
Although the stablecoin market cap grew from $6b in 2020 to $200b in April 2022, RAI has remained relatively small. There are two general views on RAI.
The first is multifactorial because there is no clear use case; at a capital efficiency level, it is no better than some of its competitors; there is no hard peg; and in general, the relative complexity surrounding it makes it difficult for users to justify its use, as well as for other projects to integrate RAI over other stablecoins.
The second view is that RAI is small by design. RAI is focused on being a resilient and fully decentralised stablecoin without counterparty risk at the expense of having slower growth or adoption than its competitors. Slow and steady wins the race.