rcs logo

rico credit system 0

🔆 Overview

Rico Credit System 0 or RCS0 is a simplification of the Dai Stablecoin System with some new features. Users post collateral to mint new Rico. To maintain adequate collateralization, the system detects when users’ positions are underwater and triggers liquidations. RCS can raise or lower collateral requirements reflexively to guard against rapid price movements. This has an added benefit of preventing unsustainable collateralization levels. We’ll discuss these mechanics further.

A CDP management module called vat keeps track of CDPs. Users call frob to evaluate and modify their positions and bail to liquidate underwater positions. Vat collects fees on CDPs which are used to pay down bad debt and create a system surplus. Vat calls hook to manage collateral. RCS Vat is designed intentionally to be flexible in collateral appraisal methods.

A debt/surplus balancing module called vow balances the total system surplus/deficit. Vow mints new risk share tokens (Risk) and sells them for Rico as a failsafe to cover system deficit. Vow auctions off surplus Rico tokens and sells them for Risk.

A price rate controller module called Vox responds reflexively to market conditions by controlling collateral requirements. When the price of Rico rises, Vox lowers the price rate, the rate of change in collateral requirements, to encourage users to borrow more Rico. When the price of Rico falls, Vox raises the price rate to encouraging CDP holders to buy circulating Rico to pay down their debts.

hooks manage different collateral types, including ERC20 tokens but also types that aren’t easy to represent using DSS’s unsigned integer ink or one-per-collateral type price feeds. This manual discusses one such non-ERC20 hook.

🔆 Very Brief

🔆 To The Reader

This manual usually will not reference precisions outside of the precision section below. It will describe multiplications as A * B even if A and B are both rays and their result is also a ray.

In the code, art and urn are interchangeable. If urn were a struct as in DSS, it would only have art.

Core contract does not need Rico/RISK approve. Instead, it uses mint and burn, where the rules for minting and burning are described solely by the controlling contract.

hooks are delegatecalled.

Some minor details are omitted for simplicity. For example, the code might set some values to 1 instead of 0 to save gas. This manual focuses on giving a deep understanding of the mechanics without precisely specifying them.

A critical concept some might not be used to is mash. The high-level idea is that whenever the system runs a collateral auction, it should factor its need to fill the auction into its asking price. That need is mash. deal is a precursor to mash, and pep, pop, and pup are parameters that adjust mash’s sensitivity to deal. So, in general:

auction_price ~= approx_market_price * mash

mash ~= pop * (deal ^ pep) + pup

The effect is:

🔆 Changes from DSS v1.1

🔆 Glossary

Good to Know

Core Modules

Auxiliary Modules






🔆 Precision

name precision
mash ray
pep power
pop ray
pup signed ray
pex ray
dam ray
art wad
tab rad
tart wad
dust rad
fee ray
rho seconds
sin rad
debt wad
ceil wad
rest rad
par ray
deal ray
tot rad
cut rad
rel ray
bel seconds
cel seconds
wel ray
mcap wad
earn wad
sell wad
loot ray
mar ray
way ray
how ray
tau seconds
cap ray
liqr ray

🔆 Doc

Rico Discord
Rico Twitter
Rico Website