# RAI Dollar Overview RAI Dollar(RD) is an immutable, overcollateralized stablecoin system designed to keep core monetary functions onchain and robust under adversarial conditions. RAI Dollar offers loans against various ERC-20 collaterals in the form of the RD stablecoin. It combines principles of Reflexer's RAI, Liquity's LUSD/BOLD and some new, novel mechanisms to achieve stability while being 100% immutable and uncensorable. Each RD token can be redeemed for a basket of underlying collateral worth $1.00. The protocol incentivizes deposits into Liquity-style stability pools by sending an adaptive portion of loan fees to these depositors. RD deposits in the SP auto-compound by accruing additional RD from loan fees. In addition to fees, depositors in the SP receive collateral from liquidations at a profit. RAI Dollar adopts the benefits of RAI's floating par without the non-determinism. RAI Dollar uses the floating value of par to only drive the market price of RD back to $1.00. One of the main criticisms of RAI's floating peg was the perceived unpredictability of its price. RAI Dollar will only use this to achieve stability around $1.00. RAI Dollar incentivizes liquidity in a Balancer V3 RD/USDC/USDT/USDS StableSwap pool, through an adaptive fee mechanism, providing low slippage swaps with major US stablecoins. This mechanism ensure adequate liquidity in volatile market conditions. RAI Dollar also has several built-in mechanisms to handle undercollateralized debt, a critical safety component and possible first for an immutable, CDP-backed stablecoin. Key differentiators of RD include: immutability, support for many collaterals, a novel, opt-in protection from redemption for trove owners, automated borrow rates, optimization of protocol revenue flow to stakers, peg stability under extreme market stress, automated recovery from under-collateralized debt and a large community allocation. ## Immutability and Uncensorability RAI Dollar will have 100% fixed and transparent on-chain monetary rules. In practical terms, this means: • No governance risk: users do not carry an embedded risk premium from future parameter changes, emergency interventions, or shifting stakeholder incentives. • Censorship resistance: all actions (minting, repaying, liquidation, redemption, fee distribution) are permissionless, with no reliance on offchain limits or governance. ## Many Collaterals RAI Dollar will be backed by many more collaterals than existing immutable CDP stablecoins. This provides: • Diversification of collateral shocks: reduced probability that one asset’s crash dominates system solvency. • Increased borrower surface: More users, communities and treasuries can borrow against the assets they hold. The list of supported collaterals will include ETH, LST, and Defi "blue chips". ## Redemption Shield The RAI Dollar stablecoin, RD, can be redeemed at par value in exchange for backing collateral. This imposes a tradeoff: redemptions provide a hard price floor, but they also create borrower risk because a borrower can be redeemed against at any time. RAI Dollar introduces a novel mechanism, the *redemption shield*, that allows borrowers to completely opt out of backing redemptions. A borrower that selects redemption shield will pay a higher interest rate for a guarantee their collateral will not be redeemed against. Redemption Shield allows improved borrower UX and capital planning, reducing tail risk of involuntary redemption. **Note**: The exception to the redemption shield is in the case of emergency shutdown of a collateral. This is triggered when: - an oracle is stale or - the collateralizaion ratio of the branch drops to an unsafe level. In this case, *all* trove collateral will be susceptible to redemption unless the trove is closed. ### Dynamic Shielding Rates To ensure system stability and redeemability of the collateral, the cost of shielding rises as more borrowers opt-in. Below is the shielding interest rate curve, with an example starting collateral interest rate of 4% APR. Final borrow rates for both shielded and unshielded borrowers are shown. ![image](https://hackmd.io/_uploads/SJkGZ1yQWg.png) #### Chart Dynamics As shielded debt proportion(x-axis) increases, the shielded cost(red) goes up. Similarly, the unshielded cost goes down. At the critical point where 85% of debt is shielded, the unshielded rate goes negative. As the shielded proportion nears 100%, the rates reach extreme positive and negative values. Because of this, a collateral shielded proportion reaching 100% is expected to be a rare, ephemeral state. #### Rate-neutrality The total effective APR for the collateral can be seen in orange. This value is approximately unchanging up until about 80% shielded debt. This "rate neutrality" is good for system stability, as it means the state of shielding doesn't affect the final APR of RAI Dollar under most regimes. This independence allows the other mechanisms of peg control to operate separately without interaction from shielding. #### Overshielded System State As the proportion of shielded(unredeemable) debt in a collateral branch rises, the interest rate for unshielded(redeemable) debt drops. If the proportion of shielded debt reaches an extreme high, threatening redeemability of that branch, unshielded debt will eventually reach *negative* interest rates, and unshielded troves will effectively be paid to borrow. **Note**: *All subsidies paid to unshielded borrowers are paid by shielded borrowers*. There is never a negative interest rate incurred by the protocol. ## Automated Borrow Rate Mechanism RAI Dollar uses an automated, multi-stage interest-rate mechanism to regulate system utilization and stability dynamics. The final interest rate paid by borrowers is: $r_f = r_{base} * m_{collateral} + shield_{term}$ ### Base Rate: $r_{base}$ $r_{base}$ is the system-wide base rate and is the primary mechanism to influence the RD/USD market price to stay near $1.00. It is derived by an onchain PI controller that monitors the RD/USD peg and adjusts as follows $p_{rd/usd} <$ $1.00 $- \epsilon$: $r_{base}$ increases $p_{rd/usd} >$ $1.00 $+ \epsilon$: $r_{base}$ decreases Where: $\epsilon$: a $0.003 noise barrier $p_{rd/usd}$: TWAP of RD/USD price. #### Rate and peg intuition An under-peg condition means there is not enough demand and/or too much supply. In this case, raising interest rates: 1. Creates more demand from SP depositors who will earn more yield 2. Reduces supply from borrowers not wanting to borrow at higher rates Vice-versa for over-peg conditions. #### RD/USD TWAP $p_{rd/usd}$ is a 24-hour TWAP of the median of three spot prices, $[p_{rd/usdc}, p_{rd/usdt}, p_{rd/usds}]$. These spot price are sourced by the system's RD/USDC/USDT/USDS Balancer V3 StableSwap pool, which is incentivized with RD borrow fees(more below). ### Collateral Multiplier: $m_{collateral}$ The collateral multiplier raises a collateral's final interest if it's over-utilized in the protocol. This reduces the risk of a single collateral backing too high a % of RAI Dollar supply. Similarly, a collateral with little to no utilization will see a lower final borrow rate. Let $S_i$ be the % of RD debt from collateral $i$. $S_i$ too high: $m_{collateral}$ increases $S_i$ too low: $m_{collateral}$ decreases ### Shield Term: $shield_{term}$ In the case of a shielded trove, $shield_{term} > 0$ and represents the *premium* paid by the borrow in exchange for a guarantee against redemption. In the case of an unshielded troves, $shield_{term} < 0$ and represents a *subsidy* paid to the borrower by shielded borrowers in exchange for the trove being eligible for redemptions. #### Behavior Let $shield_{share}$ be the % of collateral debt that is shielded(x-axis from above chart). Then $shield_{term}$ follows these rules: - $shield_{share}$ rises $\rightarrow shield_{term}$ increases Shielded debt gets more expensive Unshielded debt gets cheaper - $shield_{share}$ drops $\rightarrow shield_{term}$ decreases Shielded debt gets cheaper Unshielded debt gets more expensive. In practice, the derivation for $shield_{term}$ is different for shielded and unshielded debt and will be outlined in a separate, detailed mechanism paper. ## Protocol-incentivized Liquidity RAI Dollar routes protocol fees to liquidity providers automatically, rather than relying on periodic manual incentives or discretionary programs. This creates: • Endogenous liquidity incentives: The system itself pays for the liquidity it needs without requiring exogenous emissions • Robust swap liquidity: The protocol continously rewards swap liquidity, incentivizing availability during volatile markets. • Attractive to LPs: LPs can receive protocols fees by LPing only non-volatile stablecoins. ## Peg Stability Under Severe Conditions The first mechanism to manage the RD/USD $1.00 peg is the autonomous rate $r_{base}$ outlined above. However, there are extreme times where supply/demand of a CDP stable can be inelastic with the market price not responding to rate changes. 1. Extreme collateral shocks and liquidations -> RD/USD > $1.00 During these times of fear, there can be excessive demand to close debt, with borrowers weary to keep debt with volatile collateral prices. 2. Prolonged Redemption Devaluation -> RD/USD < $1.00 If a CDP stablecoin becomes unredeemable for $1.00 of collateral, the price floor can drop. In RAI Dollar, this can specifically happen with lingering undercollateralized debt, but is handled by the dynamic par mechanism. ### The Solution: Par Mechanism Reflexer's RAI proved that moving the par value of a CDP stablecoin can influence and direct the market price. RAI Dollar uses par to only achieve stability around $1.00. The par value of RD is initialized at $1.00 and used to calculate RD's internal value for: * A trove's collateral ratio * RD's value during liquidiation * RD's value during redemptions Unlike RAI, RD uses par to force RD/USD market price back to $1.00 and nothing more. After the market returns to $1.00, par slowly decays back to $1.00 iself. #### Par Mechanism Behavior RD/USD > $1.00: par decreases RD/USD < $1.00: par increases #### RD/USD > $1.00 RD responds by *decreasing* the value of par < $1.00. As par decreases, RD/USD will decrease: * Liquidation threat drops as trove collateral ratios increase. Borrowers are somewhat safer to mint more debt. * Redemption value of RD(par) decreases and thus, the RD/USD price floor drops. * The liquidation value of RD(par) drops and SP depositors have less incentive to buy and deposit RD to back liquidations. When par reaches, $1/$1.10 $\approx 0.\overline{909}$, an inevitable arbitrage happens and RD/USD returns to $1.00. In practice, all actors understand this inevitability and RD/USD returns to $1.00 long before par reaches $$0.\overline{909}$ #### RD/USD < $1.00 RD responds by *increasing* the value of par > $1.00. \ As par increases, the RD/USD market price will increase: * Liquidation threat increases as trove collateral ratios increase. Borrowers buy RD to re-pay debt. * Redemption value of RD(par) increases and thus, the RD/USD price floor rises. * The liquidation value of RD(par), rises and SP depositors have more incentive to buy and deposit RD to back liquidations. **Note**: Par deviation by RAI dollar from $1.00 in order to restore RD/USD $1.00 peg should be a rare occurence. ## Optimized Staker Revenue After the protocol pays SP depostiors and LP providers, the remaining fees go to FEE token stakers. FEE token is the native token of RAI Dollar, emitted to both SP depositors and LP providers. The adaptive feedback mechanisms ensure the SP and LP fee sinks, only get the fees required to keep them at safe levels and no more. The are sent the minimum fee amounts required, with the FEE stakers getting the rest. ## Under-collateralized Debt Clearance It is possible after collateral shutdown for a collateral to reach a state of "undercollateralized debt", where there is still debt but zero collateral remains for that branch. The system has three automated ways to simulataneously clear this debt. #### Source: Staking revenue In rare cases, the protocol can reach a state of under-collateralized debt for a collateral branch. This can happen after collateral shutdown, where shutdown redemptions have reduced collateral levels to zero, but non-zero debt remains. In that case, this under-collateralized debt is paid off from FEE staker revenue. 50% of the staker fee flow is diverted to the under-collateralized debt until it's paid off. That is the primary, active method of under-collateralized debt clearance. #### Source: Redemption Fees Under normal redemptions, redeemers effectively pay a small, constant fee to perform a redemption. This fee is paid to the trove owner being redeemed against. If under-collateralized debt is present in the system, this fee is used to pay off under-collateralized debt instead of going to the trove owner. #### Source: Controlled Redemption Under-valuation When under-collateralized debt is present in the system, the redemption process takes 0.5% of the redeemed RD amount to pay down the under-collateralized debt. This RD is effectivly redeemed for zero collateral during redemption and thus de-values the entire redemption basket to 99.5% of its previous price. This devaluation drops the price floor of RD in a controlled manner. The RD par controller detects this deviation, rising the par value of RD above $1.00, and ultimately correctly the price floor drop. This new equilibrium of par > $1.00 is the expected system state until the under-collateralized debt is cleared(with this mechanism and the previously stated diversion of fees from redemption and staking.) After the undercollateralized balance is cleared, the protocol no-longer "injects bad debt" into the redemption process, and par decays back to $1.00. ## FEE Tokenomics RAI Dollar's FEE token will be emitted to SP depositors and LPs over a decayed curve, with the main goal being to provide a highly community-centric distribution. **Total Supply**: 100M **Timeline**: SP and LP emitted with half-life of 1 year(Year 1: 50%, Year 2: 25%, etc) | Destination | % | units | | -------- | -------- | -------- | | Stability Pool Depositors | 32.5 | 32.5M | | Balancer LPs | 32.5 | 32.5M | | Team | 20 | 20M | | Investors | 15 | 15M | Team and investors are subjected to 1-year post-launch lock and then a 3-year linear stream. ### Schedule ![image](https://hackmd.io/_uploads/BkaEHfk7Wl.png)