Leveraged capital is a double-edged sword, pushing the pendulum of the cycle to both ends. In the bull market, leveraged funds provide additional fuel for the rise of asset prices, and in the recent down market, the serial liquidation and panic caused by leveraged funds have cast a shadow over the encryption world. According to data from Okey Cloud Chain, on June 14 alone, the liquidation amount of Aave and Compound on Ethereum reached 53.1 million US dollars and 45.44 million US dollars respectively.
The lending agreement is a tool to provide leverage for funds on the chain. Different lending agreements use different oracle mechanisms, mortgage rates, liquidation lines, etc., and the risks of the agreement and users are also different. PANews found the following results after analyzing the risk control mechanisms of three commonly used lending protocols: Maker, Aave, and Compound.
1. The security of the three major loan agreement oracle machines is relatively good. Both Aave and Compound obtain data from Chainlink and judge whether to use it on this basis. Maker has established a similar mechanism by itself, and the price has an hour Delay.
2. USDT, as the stable currency with the largest market value, cannot be used as collateral in the three major lending protocols of Ethereum, and USDC is well supported in these three.
3. Aave has a high capital utilization rate, and the mortgage coefficient of commonly used assets is greater than or equal to Compound, and Aave supports stETH as collateral, and has brought deposits of more than one billion U.S. dollars to Aave.
4. In extreme cases, both Maker and Aave can issue additional tokens and repay debts through auctions. Although there is no relevant expression in Compound, it can also be completed through governance when encountering extreme situations. Maker's emergency shutdown module also adds a layer of insurance for extreme situations.
5. In terms of the limit on the amount of borrowing, each Vault in Maker has a corresponding limit on borrowing, and some assets in Compound have a limit, but Aave does not have such a limit.
first level title
Maker
Oracle
Oracle
The oracle machine can make on-chain and off-chain data be used in smart contracts. In the lending agreement on the blockchain, the oracle machine is particularly important, determining when liquidation occurs and how much other assets can be borrowed from mortgaged assets. The oracle machine is also a module that often leads to hacker attacks, such as flash loan attacks, where perpetrators borrow assets without collateral and use these assets to manipulate the market, thereby changing the price of the oracle machine and making profits for themselves.
The working principle of the Maker protocol oracle machine is a typical example of a commonly used oracle machine in the DeFi protocol. Rune Christensen, the co-founder of MakerDAO, said that Maker pioneered the design of off-chain data aggregation and median device decentralized oracle machines, and these two designs are also in use. Adopted in Chainlink.
Each collateral in Maker has an oracle, and each oracle consists of an oracle security module contract (OSM) and a Medianizer. Its oracle works as follows.
1. First, MakerDAO governance determines which individuals and organizations can provide price feeds. Individuals or organizations participating in price feeds are called Feeds. Individual participants are anonymous, while institutional participants are public.
2. Each feed obtains prices from a series of exchanges selected by itself, extracts the middle price, and then pushes the middle price to the Secure Scuttlebutt network. The published message has a time stamp and signature, and only the owner can update the feed price , and the message cannot be deleted or modified.
3. The repeater reads the feed price of each feed from the Secure Scuttlebutt network, and aggregates the data and sends it to the Medianizer.
4. Medianizer takes the median of these price data, and publishes the price as the queue reference price.
5. There is a delay between the release of the price and its adoption by the system. The delay time is determined by the OSM delay parameter and can be changed through MKR governance.
secondary title
Mortgage rate / liquidation line
In Maker, the mortgage rate is represented by the ratio of collateral to debt. The same type of collateral may be divided into several vaults according to the required mortgage rate. The lower the required minimum mortgage rate, the greater the corresponding risk, and the stable rate (The annualized interest rate for borrowing DAI from Maker) is also higher. For example, there are three vaults with ETH as collateral, ETH-A mortgage rate is 145%, stable fee rate is 2.25%; ETH-B mortgage rate is 130%, stable fee rate is 4%; ETH-C mortgage rate is 170%, stable fee rate is 0.5 %. Among them, ETH-B requires the lowest mortgage rate and the highest liquidation risk, so the stability rate is also the highest.
In Maker, the minimum mortgage rate corresponds to the liquidation line. For example, in ETH-C Vault, when the price of ETH is 1215.5 USD, you can borrow up to 715 DAI by mortgaging 1 ETH. At this time, the mortgage rate is just 170%. You need to control the risk yourself.
auction
auction
There are three types of auctions in the Maker Protocol: Surplus Auctions, Collateral Auctions, and Debt Auctions. External participants participating in the auctions are called Keepers. The Maker protocol can accumulate stability fees through Vaults and earn income. When the surplus reaches a certain limit, these DAIs will be exchanged for MKR through surplus auctions and destroyed. Therefore, the circulation of MKR will gradually decrease if no accidents occur. Debt auctions and collateral auctions involve Maker's risk control.
Maker mints DAI through over-collateralization. When the value of the user's collateral drops below the required collateral ratio of the Vault, the system will automatically liquidate the Vault and sell the collateral until the outstanding debt in the Vault is compensated. This is the collateral auction. Since Maker can only borrow DAI issued by the agreement, the collateral is usually risky assets such as ETH and WBTC, so collateral liquidation usually occurs in a falling market.
If the price of collateral drops sharply and no one wants to buy collateral, there may be a situation where the debt cannot be repaid through collateral auctions, which needs to be resolved by the system. At this point, it will first be repaid through the accumulated stability fee surplus. If it is not enough to repay the debt, a debt auction needs to be initiated. The agreement re-mints MKR and exchanges it for DAI through auctions to repay debts. This step corresponds to the opposite of the surplus auction, which will lead to an increase in the circulation of MKR.
secondary title
emergency shutdown module
first level title
Aave
Oracle
Oracle
Aave adopts Chainlink's oracle machine, the mechanism is similar to Maker, multiple independent Chainlink oracle machine operators update off-chain data, through a lightweight consensus algorithm, each node reports data and signs it, and then A single aggregated transaction containing all observations is transmitted on-chain, where the reported results are verified and a quorum of signatures is checked.
secondary title
loan-to-value ratio
Aave uses the Loan to Value (LTV) ratio to measure the value of other assets that can be borrowed per 1 unit of collateral. According to the different risks of the collateral, the overall LTV is between 0 and 86%. The LTV of USDT, BUSD, sUSD, PAX, FRAX and other stablecoins are all 0, that is, only deposits are allowed, and they are not allowed to be used as collateral. Borrowing, which can be borrowed against other assets supported by the agreement as collateral. USDC has the highest LTV of 86%, that is, depositing USDC can borrow up to 86% of assets. It can be seen that although USDT has a larger market value, it does not receive as much support as USDC in DeFi applications. In Aave’s asset risk rating updated in September 2021, it is believed that USDT’s counterparty risk is C-, because USDT’s redemption procedure is unknown, Tether Limited and BitFinex face accusations of issuing USDT out of thin air to manipulate Bitcoin prices, Tether Limited and BitFinex Legal claims on mortgage assets, etc., so Aave believes that the trust risk level of USDT is D+. And because USDC has real U.S. dollars and other high-quality assets as reserves, the counterparty risk is B.
secondary title
clearing line
The LTV required by Aave liquidation is higher than the initial value of the loan, leaving some redundancy for price fluctuations. When the debt/collateral ratio is greater than the liquidation threshold, the debt will be liquidated. Among the commonly used collaterals, the LTV of USDC is 86%, and the liquidation threshold is 88%; the LTV of WETH is 83%, and the liquidation threshold is 85%; the LTV of WBTC is 70%, and the liquidation threshold is 75%.
secondary title
security module
Aave allows users to lock AAVE tokens or 80/20 liquidity tokens of the AAVE/ETH Balancer pool into the Security Module (SM), earn fees generated by the protocol, and provide insurance for the protocol. When the Aave protocol causes additional liabilities due to liquidation risks, smart contract risks, or oracle machine failures, the pledged funds can be deducted up to 30% to serve as the first layer of protection. If you want to redeem the pledged funds, you need to go through a 10-day cooling period, and then redeem within 2 days. If it exceeds 2 days, you need to restart the 10-day cooling period.
If the 30% of the funds deducted by the security module is not enough to pay all the debts, it will trigger the additional issuance of AAVE to make up the deficit with the funds in the security module.
first level title
Compound
Oracle
Oracle
In November 2020, Compound used the Coinbase exchange to provide prices for oracle machines. When the price of DAI on Compound rose above $1.3, it led to the liquidation of approximately $89 million in assets.
secondary title
Mortgage coefficient
The mortgage coefficient in Compound is in the range of 0 to 90%, and the better the liquidity, the higher the mortgage coefficient. If the mortgage coefficient of an asset is 0, it means that it cannot be used as collateral, and the mortgage coefficient of the asset can be changed through governance.
Among the common encrypted assets, the mortgage coefficient of USDC is 84%, that of USDT is 0, that of DAI is 82%, that of ETH is 82%, and that of WBTC is 70%. Their mortgage coefficients are all less than or equal to Aave.
to liquidate
to liquidate
In Compound, account liquidity is used to indicate the health of positions. Account liquidity is equal to the sum of deposits x mortgage coefficients in each market, minus the sum of borrowed asset values. If the account liquidity is negative, it will face liquidation.
Although it has not been seen that Compound has set up countermeasures for unexpected situations, due to the powerful upgrade of governance, it can determine the countermeasures through governance when encountering extreme situations.


