The Inner Workings of Ruler Protocol
Ruler Pairs
Ruler pairs are at the core of Ruler Protocol. Each pair consists of the following elements:
- 抵押物,例如wBTC
- 配对代币,例如Dai
- 到期时间
- 铸币率,抵押品与配对代币的比率。10,000 mint ratio @ $30,000 collateral price = 300% collateralization ratio
-
每个“配对”发行两个可替代的代币 (rToken)。 rTokens 是由借款人为每个 staking 事件铸造的。 Ruler 资本代币 (rcToken) 代表在到期后收取贷款款项的权利。 Ruler 还款代币 (rrToken) 代表在到期前偿还贷款并收到抵押品的义务。 如果借款人不按时还款,则贷款被视为违约,抵押品将被借款人没收。
- Collateral token (ex. wBTC)
- Paired token, the token users have to payback (ex. Dai)
- Expiry, the time users have to pay back (ex. 12/31/2021)
- Mint ratio, the ratio of collateral to paired token. 10,000 mint ratio @ $30,000 collateral price = 300% collateralization ratio
- Each Ruler pair issues two fungible tokens (rTokens). rTokens are minted for each staking event by a borrower. The Ruler capital token (rcToken) represents the right to collect the payments of the loan after expiry. The Ruler repayment token (rrToken) represents the obligation to pay back the loan and receive the collateral before expiry. If borrowers don’t payback on time, the loan is considered defaulted, and collaterals are forfeited by the borrowers.
Two Fungible Tokens (rTokens - rcToken & rrToken)
当用户将抵押品存入 Ruler 时,会铸造两个代币。 根据抵押品类型,rTokens 和抵押品之间会有一个铸币率。 例如,作为抵押品存入的 1 wBTC 可以铸造 10000 个 rTokens(300% 抵押率 @ 30000 wBTC 价格)。
Two fungible tokens are minted when a user deposits collateral into Ruler for each Ruler Pair. Based on the collateral type, there will be a mint ratio between the rTokens and the collateral. For example, 1 wBTC deposited as collateral may mint 10000 rTokens (300% collateralization ratio @ 30000 wBTC price).
- Ruler Capital Token (rcToken)
The rcToken represents the right to collect loan payments (in paired tokens) after expiry. Borrowers can sell rcTokens for paired tokens to complete the cycle of borrowing (receive paired tokens in the end and deposit collateral to begin with). Each rcToken is eligible to collect 1 paired token when no defaults.
Ticker symbol RC_{Collateral}{Mint Ratio}{Paired Token}_{Expiry}
For example, rcToken for (wBTC, Dai, 12/31/2021, 10000) pair (300% collateralization ratio @ $30,000 wBTC price) has the following symbol RC_wBTC_10000_Dai_12_31_2021
RC_wBTC_10000_Dai_12_31_2021 will be able to collect 1 Dai after 12/31/2021.
- Ruler Repayment Token (rrToken)
The rrToken represents the obligation to pay paired tokens and get back collateral before expiry. Each rrToken is eligible to receive a portion of the collateral by paying back 1 paired token.
Ticker symbol RR_{Collateral}{Mint Ratio}{Paired Token}_{Expiry}
For example, rrToken for (wBTC, Dai, 12/31/2021, 10000) pair (300% collateralization ratio @ $30,000 wBTC price) has the following symbol RR_wBTC_10000_Dai_12_31_2021
RR_wBTC_10000_Dai_12_31_2021 will receive 1/10000 wBTC by paying back 1 Dai.
Interest Rate
请注意,上面没有讨论利率。 这是因为利率由借款人出售 rcToken 的价格决定。 然后使用到期日将 1 个配对代币与收到的 rcToken 价格之间的差额进行年化,以计算支付的实际利率。 当然,如果抵押品的价值大幅下降,那么借款人可能只会没收抵押品,在这种情况下,实际利率会更低。
最低抵押率和预言机的使用
Ruler 在给定的 Ruler Pair 对的生命周期内固定铸币比率。这意味着,在货币对到期之前,每单位抵押品将铸造相同数量的代币(铸造比率)。但是,如果抵押品的价格(由预言机确定)下降到足以:
抵押品价格/铸币比率 < 最低抵押品比率
then depositing will be disallowed (either manually or through an Oracle price check) until the price rises to bring the collateralization ratio back above the minimum. This mechanism prevents minting when the price of the collateral is close to or below the value of the repayment of the Ruler Repayment Tokens. If minting were allowed with the price below expected repayment value, then risk of free mints would be possible whenever there are prepayments.
For example, imagine the minting ratio is 10000 and a user deposits 1wBTC to mint 10000 rcTokens and rrTokens. The user then sells the rcTokens and holds rrTokens. Before expiration, the user prepays 10000 DAI along with 10000 rrTokens and receives the 1 wBTC back. However, still before expiration, the price of wBTC drops to $9000. There is now a risk free mint to deposit 1 wBTC and mint 10000 rcTokens and rrTokens and then default on the repayment. The 10000 rcTokens would then receive the pro-rata share (50%) of both the 10000 DAI already prepaid into the capital pool and the 1 wBTC forfeited. This 5000 DAI + 0.5 wBTC would be worth $9500 for a risk free profit of $500. By eliminating minting below a certain threshold this situation is avoided.
学习更多
https://docs.rulerprotocol.com/