What is Rai?
Reflexer Labs (the folks who are behind Rai) describe Rai as a “decentralized and non-pegged stablecoin that defies fiat currencies”. This seems counter-intuitive for most definitions of stablecoins, as they are nearly always pegged to a fiat currency. This is true for “money market” style coins like Tether, over-collateralized coins such as Dai, and algorithmic stablecoins like Terra. However, Rai does not try to maintain a tight peg to a specific currency, instead allowing itself to drift based on demand, while trying to make sure that drift is never too aggressive. It is a very different conception of stablecoin, but does remind me of the Target Rate Feedback Mechanism that was originally part of Dai, which makes sense because Rai is a fork of Dai.
How does it work?
Ether is deposited into a ‘’SAFE” (equivalent to MakerDAO ‘Collateralized Debt Position’) with the loan extended and the debt denominated in Rai. Simply, Rai is overcollateralized by Ether and the protocol will attempt to liquidate the positions if necessary to keep the system collateralized. If the system is unable to liquidate the position in time then the surplus in the protocol is used first, and if that is insufficient the protocol attempts to sell more of it’s governance token (FLX) to cover the deficit. The surplus is funded by the borrow rate paid when Rai is created.
These liquidation mechanisms are of course not without their own risks, including chain congestion which contributed to MakerDAO’s ‘Black Thursday’ where users were unable to get bids in due to change congestion and default configurations which were not well suited to a congested chain.
The protocol has two prices for Rai that it tracks, the ‘market price’ and the ‘redemption price’. The redemption price is what the protocol currently ‘wants’ the value of Rai to be, and the market price is the price on Uniswap.
When the value of the redemption price and the market price differ, the protocol begins to change the redemption price to correct for the imbalance. If the market price begins to fall, the redemption price (perhaps counter-intuitively) will rise. The intention behind raising the redemption price is to make it so that less Rai can be borrowed against Ether, potentially motivating people to modify their positions (and hopefully purchase Rai to do so).
The additional brinksmanship at play here is the ‘global settlement’ option. Global settlement is effectively pressing the big red button and returning collateral. Collateral is distributed based on the redemption price, so people who purchased Rai at a market price below the redemption price get a disproportionate share of the collateral. This is meant to help incentive users who create the Rai to purchase Rai and close their positions, so that they are not exposed to that risk.