bk
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 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)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully