Add Market: RAI

What is RAI?

RAI is an incarnation of the early design for Single Collateral Dai: it is solely backed by ETH, meant to have less governance as time passes, and uses a funding rate to automatically balance market forces and keep itself stable.

This funding rate can be either positive or negative. A positive rate is similar to the stability fee in SAI or DAI, meaning that RAI borrowers would pay a fee by having their RAI debt increase in value. A negative rate can compel market participants to sell RAI when it is traded at a premium compared to its floating “target price” — something that is missing from all pegged coins currently on the market. The target price is the price that the protocol wants RAI to have on the open market.

For more details on RAI, you can check out the videos and FAQs on the Reflexer website.

Why should RAI be added to Compound?

RAI is currently the only real stablecoin that is not 1:1 pegged to fiat and is also solely backed by ETH. It offers a unique value proposition to protocols that want to diversify their stable asset risk and maintain censorship resistance.

Historically, Compound proved to be extremely prudent in choosing which assets to include in the protocol. RAI seeks to minimize risk on all fronts by removing human governance, maintaining purity with ETH collateral, and automating the vast majority of parameters in the protocol. For these reasons, we believe RAI fits Compound’s approach to add safe assets to the system.

Technicals

  • Token Etherscan link: 0x03ab458634910aad20ef5f1c8ee96f1d6ac54919
    • Contract code verified and open-source? Yes
  • Team: People · Reflexer Labs · GitHub
    • Experience in the respective field: Certain team members received grants for stablecoin R&D and all team members have prior experience in building or auditing L2 scaling solutions or DeFi protocols
  • Whitepaper: whitepapers/rai-english.pdf at master · reflexer-labs/whitepapers · GitHub
  • Audits: GitHub - reflexer-labs/geb-audits: List of audits for the whole suite of GEB related smart contracts
  • Governance structure: 3/5 multisig
    • 3 core team members and 2 anons
    • 24h delay on changing anything
  • Number of contract transactions: More than 20,000
  • Age of the token: 8 months
  • Social channels:
  • Pausability: Can trigger settlement for the whole protocol after a 24 hour governance delay
  • Upgradeability: Can upgrade the whole protocol besides the ERC20 RAI contract and the core contract that contains data about each position minting RAI
  • Restrictions on transfers: No
  • Total supply: 33,169,412
  • Circulating supply: 32,583,538
  • Token distribution
    • Number of unique holders: 2476
    • Addresses holding >= 10% of supply: 3
  • CEX liquidity: $400K
  • DEX liquidity: $53M (as at November 15, 2021)
    • Uniswap V2
      • Total liquidity: $16M
      • Volume (24h): $635k
      • Transactions (24h): 20
    • Uniswap V3
      • Total liquidity: $37M
      • Volume (24h): $891k
      • Transactions (24h): 35
  • Market cap: $98M (as at November 15, 2021)
  • Price volatility: Sub 1% per day
  • Supporting oracles: Chainlink RAI/ETH, Chainlink RAI/USD
  • Underlying assets
    • How quickly can the amount or value of any underlying assets change?
      • RAI is solely backed by ETH. ETH experienced sharp 30%+ drops over a couple of days
  • Insurance:
    • Nexus Mutual
      • What’s covered:
        • Contract bugs
        • Economic attacks, including oracle failures
        • Governance attacks
      • Amount staked: 96.194k NXM = ~$16.747M
      • Capacity: $19.1M
      • Max individual coverage length: 365 days
      • Cost: 2.60% annually

Proposal parameters

  • Collateral factor: 0%
  • Borrow cap: 4M RAI
  • COMP borrow/supply speeds: 0
  • Interest rate model: Same as DAI
  • Reserve factor: 25%
3 Likes

I’ve been working with @stefan on this new proposal, taking consideration points from Compound’s developing formal process for new collateral assets, other proposal threads, as well as processes outside of Compound.

I think this is a great asset to add, further diversifying the stablecoin markets on Compound with this innovative gem.

Related: https://www.comp.xyz/t/add-market-rai-reflex-index/2045

5 Likes

I am a big fan of RAI and a member of the community but not the team.

RAI diverges from other stablecoins in a few key ways that I think should make it of interest to Compound.

1. Not pegged to $1
DAI, USDC, USDT, TUSD, USDP, GUSD, sUSD, UST, etc., are all pegged to $1.00. If the price diverges from $1.00 then arbitrageurs mint or redeem coins to offset the price – this is usually facilitated by centralized minting authorities (Circle, Gemini, Tether, etc) or a PSM.

RAI, on the other hand, is stable relative to USD, but is not pegged to 1.00 USD. Currently, the “redemption price” is $3.0275 and the market price is ~$3.025. If the market price diverges significantly from the redemption price, then the system changes the redemption price via the “redemption rate”.

If RAI is over-sold, e.g. it’s at $2.99 when the redemption price is $3.0275, then the system slowly begins increasing the redemption price via the “redemption rate” (recently, redemption rate has always been between -7% and 5% APY).
This means people who have minted RAI are seeing their collateral requirements increase and are incentivized to buy up cheap RAI to cover their debts. People who don’t have RAI debts may also choose to buy, hold, and lend RAI as reserves because they expect it to outperform USD when the redemption

Conversely, if RAI market price is above the redemption price then people are incentivized to sell or short RAI. This means there is significant demand to borrow and lend RAI, which will lead to profits for Compound that would normally be captured by arbitrageurs in the case of $1-pegged coins.

2. Ungovernance
Forming DAOs is a hot thing to do right now. We’ve all recently seen crazy and/or controversial government shenanigans in big $1B+ protocols.

I am unconvinced that you need a big, complicated DAO with hundreds of voting members, delegates, governance bribes, etc. solely to maintain an asset that is roughly stable relative to USD. RAI/Reflexer are guided by an opposing philosophy: governance minimization. Aside from certain critical functions such as the ability to change oracles, Reflexer aims to minimize the power of governance.

This is a massive divergence from almost every other DeFi protocol. If it succeeds, RAI will be a public good and beyond the control of VCs, hedge funds, governments, regulators, even the Reflexer team. (Only the hand of the market will effect RAI price).

In conclusion, adding a RAI market will help Compound generate more fees. The initial on-chain proposal will set collateral factor to 0 so I don’t see much risk from Compound’s point-of-view in the short term. In the long term, having RAI as collateral will reduce risk because it is more resistant to the powers that be than any other stable asset and will provide collateral diversity.

Disclosure: I hold a significant amount of Reflexer’s ungovernance token, FLX.

4 Likes

First of all, thanks for the detailed writeup - best set of facts I’ve seen so far on one of these, and clear you have done your homework.

I know the current proposal isn’t for RAI being used as collateral. And it is still fun think through the collateral implications ahead of time.

I think a big lesson from the recent C.R.E.A.M. total hack is that is fatal to a lending platform to list a wrapper token:

  • …that can be created and destroyed from other assets
  • …that has a low market cap
  • …that can change value
  • …that uses live, on-chain oracles for lending

Because you are proposing using Chainlink as a oracle, the last condition is not met. As a result, an attacker can’t really flash loan to manipulate the price.

However, it’s still worth thinking about if it would be possible to exploit Compound using this coin since it meets the other criteria.

The majority of the RAI liquidity is in Uniswap v3. This liquidity is allocated in bands, and currently RAI price is on one side of the narrow liquidity band.

This means that it only takes a comparatively small amount to shove the price arbitrarily further in this direction - the attacker just adds a liquidity band where they want to price to end up, and then buy up the small amount of liquidity in between. Maybe a million dollars might be enough to manipulate the price enough on v3, v2, and cex, which puts it into feasible to do without a flash loan. Pure arb bots wouldn’t respond to correct because all the DEX prices have changed. If an attacker can do this within a few blocks of when the chainlink oracles read the price, then the attacker can massively swing the oracle price on Compound. They could either swing the price down hard, and liquidate people (similar to the DAI event), or swing the price up hard, and roughly do a C.R.E.A.M. attack to empty Compound.

Although the attacker can’t flashloan to manipulate the price, they can flashloan to exploit the protocol after the oracle price is manipulated.

I’ve not proved out, or POC’d this attack - just back of the napkin thinking. Life in DeFi security has made me paranoid and jump at shadows. :ghost: I could be wrong about this…

image

1 Like

Understand the concerns and happy to see the community here is thorough :raised_hands:

RAI isn’t a wrapper token so there’s no interest accruing when you hold it. Also as you mentioned, Compound would be using a Chainlink feed for RAI so manipulation isn’t that easy.

Additionally there’s a borrow cap for RAI and it will not start as a collateral asset.

1 Like

Forgive my ignorance. :slight_smile:

If I’m reading the RAI site correctly, you can instantly mint RAI from ETH, right? Is it possible to instantly redeem RAI back to ETH at the contract level?

It works like DAI, you can mint RAI with ETH and then repay your position with the minted RAI to get back ETH.

Adding more details for RAI as advised in this post.

  • Gini Coefficient of EOAs: 0.972
  • Top 10 EOAs own 4.2% of entire float
  • All CEX liquidity is currently on Coinbase.
  • 30/60/90 day moving average for CEX liquidity is approx $430K
  • 30/60/90 day moving average for DEX liquidity: $35.9M/$34.2M/$35.1M

Top 10 EOAs:

addr,rai
0xc230ce5643a10702111572c938919c9f448c46d8,70789.966640855
0x8ffab4fb8661484580a02d5408a49222c9e2f4ba,71399.8384428706
0xc74199c865360812210745508d4efd12a18e907b,82518.0101538891
0x9f03409298b9126254ff190012a12220fc73aba0,83150.9317642231
0x7cd7a5a66d3cd2f13559d7f8a052fa6014e07d35,85627.3924139083
0xe41a2b194f15aaae7500421ecb71e39c5be26bfd,110008.023617276
0xeb2629a2734e272bcc07bda959863f316f4bd4cf,123760.433183171
0xec61e3957739f01084d1b167012aaeeed367eec3,199767.59525634
0x86f6ff8479c69e0cdea641796b0d3bb1d40761db,228852.899264981
0x26da854f28f2181858ce4aad1cdb0c2027b6465c,294085.658265806
2 Likes

The cToken has been deployed to 0x2220e2A723C5099aB0be7FBBc29D052938F82E0b. :tada:

Simulation: https://github.com/TylerEther/compound-protocol/blob/add-market-rai/spec/sim/1002-add-market-rai/hypothetical_proposal.sim

Works up until the Comptroller calls the price oracle for the price of RAI - we’re still waiting on Chainlink for a new oracle contract, which should be deployed tomorrow.