Risk of Compound being overlooked: insufficient liquidity and bank runs
Author: Bogdan Gheorghe, Momo Araki, Everett Muzzy
Compilation: Share Finance Neo
Summary: Looking back at Compound's history of liquidity risks and what it means for the future of DeFi?
Introduction
The open finance (also known as decentralized finance or DeFi) platform running on the Ethereum blockchain has attracted the attention of blockchain enthusiasts and institutional investors.
- Industry Blockchain Weekly: Banks Take the Lead, Hainan's Policies Are Most Aggressive
- The bridge for millions of users to enter the world of cryptocurrencies: an article to understand the Ethereum expansion solution ZK Sync
- The demand for cryptocurrencies may skyrocket! What else does Deutsche Bank report "Imagine 2030" imply?
In an era where interest rates are historically low, decentralized financial applications may provide higher returns than traditional alternatives. They provide financial products and services with emerging features such as transparency, decentralization and non-intermediation through smart contracts and blockchain technology.
Figure 0: User relationship between DeFi protocols commonly used on Ethereum
A prominent decentralized financial application on the Ethereum blockchain is the Compound financial lending platform. Compound is a hub in Ethereum's booming DeFi ecosystem, and its use and accumulated assets have grown significantly.
Figure 1: ETH and ETH prices locked in DeFi [USD]
With the increasing popularity and utility of Compound Finance, it is essential to better understand the opportunities and risks that decentralized finance brings. Unlike opaque financial systems, blockchain is transparent and immutable, providing us with the opportunity to study the internal operation of decentralized systems related to currency and debt. Prepare users for the future financial world and share knowledge based on fact analysis.
Compound users should be fully aware of the risks associated with diversified loans. These include:
Smart contract security risks
Governance / protocol risks (including the risk of managing key breaches)
Liquidity / Bank Run Risk
credit risk
This article takes the third type of risk as the research object, and conducts an empirical analysis of liquidity risk in the Compound currency market. (The SAI mentioned in this article refers to the legacy token originally called DAI in MakerDAO's single collateral stabilization system.)
Liquidity risk in open finance
The Compound lending platform is a decentralized protocol that establishes a currency market and sets the interest rate based on supply and demand through algorithms, allowing users to exchange Ethereum assets without friction.
In short, Compound allows users to:
Provide crypto assets to the money market to earn interest;
Borrow crypto assets from the money market.
Figure 2: Simplified money market diagram
In the Compound loan agreement, users provide tokens-BAT, DAI, SAI, ETH, REP, USDC, WBTC, ZRX-to one of several currency markets to earn interest. The tokens provided form a liquidity pool from which other users can borrow.
A common understanding is that suppliers are free to withdraw their principal and interest at any time, that is, Compound will maintain sufficient liquidity, and suppliers can withdraw their funds at any time. However, just as borrowers are limited by the size of the liquidity pool, so are suppliers. Every loan reduces the liquidity pool. The total amount of loans that can be withdrawn and the total supply that can be withdrawn are both limited by the size of the liquidity pool.
Figure 3: Insufficient liquidity in the SAI currency market in July 2019. Liquidity is close to zero on three different dates, which means that suppliers and borrowers will not be able to initiate more than a certain amount of action at Compound
There is no doubt that when liquidity begins to diminish, withdrawals or borrowings that exceed the amount of available liquidity will fail. For its part, the occasional lack of liquidity is not necessarily a bad thing. This may just be a symptom of a clear trend in supply and demand. This is also a phenomenon unique to emerging markets, so it is also a reasonable expectation in the emerging crypto industry. Design Compound anticipates that the moment of illiquidity will occur, and the agreement will regulate the supply and demand of the lending market through dynamic interest rates. The algorithms driving these dynamic interest rates are coded into money market smart contracts
In a given currency market, when liquidity is low :
Increase in supply APR, stimulate users to supply tokens
Increased annual interest rate of borrowing, stimulating users to repay borrowing tokens
When liquidity is high :
The supply of APR is reduced, and the incentive for users to provide tokens is reduced.
Lower annual interest rates on borrowings, stimulating users to obtain low-interest loans
In a decentralized manner, the agreement's dynamic interest rates are designed to offset the lack of liquidity. However, what may be harmful to users of such an open financial application is bank runs.
A bank run will occur when a supplier is suddenly worried about the stability of the market and tries to quickly and simultaneously withdraw even more funds than are available on the platform, leading to further panic and distrust of the system. In the context of open financial blockchain applications, bank runs will mean a force: the market or fraud, which overwhelms decentralized protocols and its autonomous control mechanisms.
Figure 4: A simplified model of bank runs
Alethio co-founder Johannes Pfeffer said: "If any part of the system fails, such as DAI or any other bank failure, DeFi bank runs are likely to occur."
This is not an unknown possibility and should not be ignored or despised by the blockchain community. The issuer of SAI and DAI stable assets, Maker DAO, has a global settlement mechanism to mitigate the impact of potential market crashes.
However, it is crucial to ask rigorous questions about open financial applications:
Has the lack of liquidity happened before?
Will Compound's value proposition hold up over time?
Is there a bank run or will it happen in the future?
To answer these questions, we focused most of our attention on SAI (formerly known as DAI). At the time of writing, SAI is the most active loan asset in the Compound loan market.
Explanation of lack of liquidity
Through the analysis of Compound, we organize our conclusions based on three guiding definitions or "stages" of insufficient liquidity:
Close to insufficient liquidity : When the liquidity is close to 0, in fact, because the fund pool is not large enough, no withdrawal or loan attempt will be cancelled.
Insufficient liquidity : Withdrawal or borrowing failure due to insufficient funds in the liquidity pool.
Bank run : a continuous withdrawal operation, which quickly drains the liquidity pool's funds to the level of "supply = 0", at which time the market will panic.
The following figure shows the total borrowing and total supply of the Compound SAI market in July 2019.
Figure 5: SAI loan and supply data, first interest rate contract changes
In Figure 5, the green line is the total supply of SAI, the red line is the total amount borrowed by SAI, and the gray line is the utilization rate (access / provision).
The blue circle-where the green and red lines almost intersect-is when liquidity is low or near liquidity.
In the SAI currency market, three near-liquidity incidents and one actual under-liquidity incident occurred on July, July 15, July 19, and July 23, respectively. We noticed some interesting things:
The near-liquidity situation was not caused by suppliers' attempted divestments . During these dates, the green line did not drop significantly (ie, sudden, large withdrawals).
The almost zero liquidity situation is indeed caused by a continuous and large amount of loans. On these dates, there is a sudden spike in the red line (that is, a sudden large amount of borrowing).
These borrowings reduced the size of the liquidity pool to almost the level of available supply.
Of the two possible causes of failure, the disadvantage of not being able to borrow money is smaller. Obviously, failing to withdraw funds is much worse than failing to borrow the money you want. Therefore, we focus on the moment when people try to withdraw funds but are unable to do so due to insufficient liquidity.
So, is there a problem of insufficient liquidity of Compound assets? In other words, although liquidity is close to 0, has anyone really encountered a problem extracting liquidity from the protocol?
In short, the answer is yes.
Figure 6: History of all illiquid events
From the above table, we can see that in all the currency markets of Compound, the event of redemption ("Description of Information" in the column of "Redemption") has occurred three times. Two of these incidents involved BAT. We didn't find these particularly noteworthy because the BAT market was just formed at the time and the trading volume was small. We are focusing on another example, which happened on the more popular SAI market on July 19, 2019. Therefore, we can conclude that one of the three near-illiquid moments in July 2019 shown in Figure 5 (July 19) turned into a true lack of liquidity event.
Figure 7: Enlarge the chart above—the exact point in time when the SAI withdrawal transaction failed
It can be seen in Figures 3 and 5 that the yellow highlighted in Figure 6 cannot be recovered on July 19th. Figure 7 shows this moment enlarged. The invalid withdrawal transaction is an attempt to redeem 344020.128054 cSAI tokens-the exchange rate of cSAI and SAI at that point is 0.0203495763, which means that the failed withdrawal is 7000.66 SAI. The liquidity at this time was only 5790.16 SAI, and the utilization rate exceeded 99.97%.
For users, this means that they are trying to withdraw 344k cSAI, but because the application cannot support such a high withdrawal, it cannot be withdrawn. Compound's response was to adjust the interest rate model in an attempt to re-incentivize the pool of funds to return to higher liquidity. As a result, after 5 minutes, the withdrawal was successful (Figure 8).
Figure 8: 344k SAI successfully withdrawn
Similar situation
It can be said that it is rare for July 19 to be unable to actually withdraw due to liquidity problems. Although this may be accurate, further analysis shows that Compound Finance has experienced several dangerous situations in the past.
We will show the first 5 of them and delve into the biggest one.
Figure 9: Top 5 "Closed Links"-draining a large portion of available liquid withdrawals
In these five cases, the Compound fund underwent a withdrawal transaction, draining more than a quarter of available liquidity.
The largest one (calculated as a percentage) occurred at block 8208406 at 6:04 pm on July 23. (As shown in Figure 5, this is the moment when the utilization reaches 99.17%). One address picked up slightly more than 216k SAI, and the remaining liquidity pool was only 10.9k SAI. The following table (Figure 10) shows the top suppliers and their liquidity situation before then.
Figure 10: The cut-off line for remaining liquidity, showing that some users can fully recover their supply, while others cannot
Even before the 216k SAI exited in large numbers, we can see that most of the top 30 were unable to exit the supply completely. We can imagine that this vertical line is under pressure from both sides-suppliers try to push it to the right by enlarging the corresponding bar chart on the chart, and those suppliers who exit and borrow funds push it left. After exiting through the address 0x … 5e3d (yellow mark in Figure 10) 216k SAI, the available liquidity drops to <10k SAI, making more addresses unable to exit. After exiting, the other 2125 addresses will not be able to withdraw their supply.
The danger of black swans: bank runs
Therefore, from a more macro perspective, we can say: Compound Finance has at least five major moments approaching liquidity insufficiency (Figure 9) and one moment when actual liquidity is insufficient (Figure 6) . The crypto ecosystem also has some concerns, but in most cases, these events are ignored. The interest rate model was adjusted and the agreement returned to a functional and liquid state.
There is evidence that Compound's incentive mechanism may not necessarily hedge against insufficient liquidity and invalid withdrawals, and we need to properly assess the dangers of bank runs. A certain event of insufficient liquidity may affect one or several users (usually larger holders) who cannot withdraw funds, while a bank run will affect a large number of smaller holders who cannot withdraw Less money.
As Compound's user base continues to grow, a sharp rise in borrowing that significantly reduces liquidity could scare suppliers and cause them to start withdrawing funds. Larger withdrawals will default first, and as the liquidity pool continues to shrink, fewer users will be able to recover funds. The results are reminiscent of traditional bank runs, which are simply copied to a decentralized platform.
There is a view that such a bank run will be a "black swan" event-a once-in-a-lifetime event that users cannot predict or prevent. However, we have already seen 5 times of insufficient liquidity in history (3 times in July alone), and there has been a withdrawal of default.
We will continue to update Blocking; if you have any questions or suggestions, please contact us!
Was this article helpful?
93 out of 132 found this helpful
Related articles
- The "Bitcoin Giant Whale" gray company continues to move in 2019, indicating that there may be great changes in 2020?
- Perspectives | Stateless Clients: New Trends in Ethereum 1.x
- One article to understand why 2019 is the year of DeFi and 2020 is the year of DeFi
- China Europe Business School Gong Yue: DAO and Alliance Chain, a dispute that began with Hayek and Keynes
- Vitalik's latest thinking: what kind of subversive effect the second party payment will bring
- Nobel laureate Tirole: Humanity is facing a new round of currency war, this round of war is likely to include cryptocurrencies
- Weekly Bitcoin Positions Report | Many types of accounts show a bearish attitude and further callback danger signals appear?