2020 Q2 DeFi Report: Liquidity Mining Frenzy Did Not Bring New Users, DeFi Has a Long Way to Go
Editor's Note: This article comes fromBabbitt Information (ID: bitcoin8btc)Editor's Note: This article comes from
Babbitt Information (ID: bitcoin8btc)
ConsenSys, an Ethereum ecological development company, officially released the "DeFi Report for the Second Quarter of 2020" (the backstage of the DeFi Zhidao official account replied "Q2" to obtain the full text of the report in Chinese and English). The report summarized and analyzed the development of all aspects of DeFi during Q2. During the second quarter of 2020, the Ethereum DeFi field can be summarized into three major events: (1) the number of BTC locked on Ethereum exceeded that locked on the Lightning Network; (2) three major security incidents, resulting in $ 26 million The funds were stolen by hackers; (3) The issuance of COMP and the fanatical liquidity mining movement inspired by it.
The following is the full text of the report:
Summary
introduction
The following is the full text of the report:
Summary
introduction
ETH and USD locked: data snapshot
DeFi Users: Data Snapshots
Protocol Manifestation: Data Snapshot
ETH and Total Value Locked: A Deep Dive
DeFi Users: A Deep Dive
Compound and COMP: A Deep Dive
BTC on Ethereum DeFi
The State of Stablecoins
in conclusion
DeFi Security
Contributor notes
appendix
About Codefi data
first level title
01 Summary
During the second quarter of 2020, the Ethereum DeFi space can be summarized into three major events: 1) the number of BTC locked on Ethereum exceeded the BTC locked on the Lightning Network, 2) three major security incidents, resulting in $ 26 million in funds It was stolen by hackers, and 3) the issuance of COMP and the fanatical liquidity mining movement inspired by it.
BTC Tokenized on Ethereum
Event: In May 2020, the number of BTCs on Ethereum (tokenized BTCs, such as WBTC) surpassed the number of BTCs on the Lightning Network (Bitcoin’s second-tier scaling network).
Why it matters: Cross-chain interoperability is anti-minimalism, but more likely the future of blockchain. The team behind BTC tokenization on Ethereum has been adhering to this belief and it is reaping the rewards. Likewise, Ethereum’s DeFi ecosystem has such a strong gravitational pull that BTC holders are always looking for ways to use BTC to participate in DeFi.
COMP and Liquidity Mining
Event: The Ethereum DeFi project Compound released its governance token COMP in mid-June. The token is used as a reward to be distributed daily to borrowers and lenders on Compound. The upshot is that active DeFi users maximize COMP yields by locking up capital using DeFi mechanisms and then borrowing and lending on Compound (i.e. “liquidity mining”).
Why it matters: The last two weeks of the quarter saw a high-yield liquidity mining movement sweeping the DeFi ecosystem. Key metrics such as value locked in ETH and daily active users spiked after a fairly stagnant start to the quarter. However, data (discussed below) shows that the frenzy is not bringing many new users into DeFi, suggesting that innovation in DeFi must be coupled with education and UX before we see the DeFi community transcend existing boundaries.
3 major security incidents
Incidents: Uniswap, Lendf.me, and Bancor all had high-profile security incidents this quarter, totaling $26 million stolen (most returned, discussed below).
Why it matters: The occurrence of security incidents is inevitable in emerging technologies. The DeFi community continues to develop strategies to hedge against such events, including: auditing services, security products, and insurance applications. All this thanks to DeFi’s operating system feature, which allows third parties to monitor DeFi dapps, provide advice, and analyze attacks to protect the entire community in the future.
02 Introduction: DeFi Development in the Second Quarter of 2020
Not only has the DeFi ecosystem returned to growth since March, but activity has also increased significantly, largely due to the launch of COMP in June 2020. Coupled with some high-profile security incidents, DeFi has clearly been going through the pain of new technology development this quarter. Continuous security challenges underscore not only the importance of robust security checks, but also the practicality of safeguards such as DeFi insurance applications. Meanwhile, the continued growth and hype has proven that DeFi still has a lot to innovate and is poised to continue growing in the quarters to come.
first level title
03 Locked ETH and USD: Data Snapshot
secondary title
Locked ETH
DeFi is run through smart contracts that automate the execution of new blockchain-based financial instruments. A popular way to measure the success of DeFi is to measure the amount of funds "locked" in DeFi. "Locked" funds are funds that consumers send in trust to the smart contracts that make up the DeFi ecosystem. A very simple and modern analogy: People keep cash under their mattresses, rather than trusting it to bank and brokerage accounts. If people move more cash from under their mattresses to the bank, it means they trust the bank to protect or increase their wealth, rather than fear that the bank will lose it. As time goes on, more and more funds are locked in DeFi, which represents a growing confidence among consumers to put money into the hands of smart contracts to interact with these new financial instruments.
The amount of ETH locked represents the amount of ETH and WETH (ETH represented as ERC-20 tokens) that have been sent to these smart contracts.
Locked USD represents the dollar value of funds locked in DeFi smart contracts. The locked USD value is directly related to the market price of ETH. Even if the ETH locked in the DeFi amount remains the same, as the USD price of ETH changes, the USD value locked will increase or decrease.
The total amount of ETH locked in DeFi has been increasing since early 2019, with much of it attributed to Maker and Compound. Maker’s dominance in locking ETH (as of mid-2019, Maker accounted for nearly 100% of ETH locked up, and still accounts for the vast majority today) is due to Maker being an early and key player in the DeFi wave that started in 2018. Maker is the enabler of a new wave of financial protocols that rely on a decentralized stablecoin: DAI. When Maker released DAI, it was essentially the only DeFi player using the stablecoin's unique features, so the ETH locked in DeFi-related smart contracts flooded into smart contracts that locked ETH in exchange for DAI. Starting in mid-2019, a new wave of DeFi protocols began to launch, many of which use the DAI stablecoin. Maker continues to account for the majority of locked ETH, but newer protocols are beginning to erode its dominance in the market by introducing new ways to leverage DAI, now multi-collateral DAI.
Figure 1: ETH and WETH locked in DeFi (2018-2020). Since mid-2019, the amount of ETH locked in DeFi has been trending towards a net increase.
The impact of COMP on ETH locking is huge. After stagnating for most of the quarter, ETH locked increased by more than half a million in less than a month. By the end of the quarter, the amount of ETH locked had reached an all-time high of 3.3 million (Figure 2). The increase in ETH locked is almost entirely attributable to COMP (green).
image description
Figure 2: ETH (WETH) locked in DeFi In the second quarter of 2020, starting from mid-June, the sudden increase in ETH locked was due to COMP.
secondary title
USD Locked Value
In Q2, the dollar value of locked ETH and WETH nearly doubled, from $400 million in early April to $750 million by the end of the quarter. The bulk of this (approximately $200 million) occurred in the last two weeks of the quarter and can be attributed to Compound (Figure 3).
For more analysis of ETH locked in Ethereum, see the ETH and Total Value Locked: A Deep Dive chapter. There we explored the possibility that some locked funds were being double counted, which could lead to inflated statistics.
Figure 3: USD value of ETH and WETH locked in DeFi, Q2 2020
first level title
04 DeFi users: data snapshot
image description
Figure 4: DeFi Daily Active Users in Q2 2020
Figure 5 shows ETH locked, user growth, and daily active users (DAU) statistics for a significant group of DeFi protocols throughout the quarter. In Figures 2 and 4, we have seen that Compound accounts for a huge increase in ETH locked and DAU, which we can see in Figure 5.
Figure 5 tells us that although COMP caused huge waves in the DeFi community and greatly affected the ETH locked volume and DAU, it did not bring many new users into the ecosystem. The increase in activity caused by activity around COMP comes from activity already present within the ecosystem.
Figure 5: ETH Locked Amount, User Growth, and DAU for DeFi Protocols in Q2 2020
Compound
first level title
05 Protocol Performance: Data Snapshot
secondary title
As mentioned above, the user growth of the entire DeFi ecosystem has not increased as dramatically as ETH locked and DAU. However, the total number of Compound users alone increased from 30,000 to 40,000 in the second quarter. 50% of the growth occurred in the last two weeks of the quarter, during which time user growth increased from about 35,000 to about 40,000. Additionally, user growth rate — a measure of how many new users interact with Compound each day — has risen sharply, growing 28x from a monthly low of 0.12% in early June to an all-time high of 3.42% in late June.
For more information on Compound and COMP, see Compound and COMP: A Deep Dive. We will explain COMP in more detail and investigate the circumstances behind it.
Uniswap
Figure 6: ETH Locked, User Growth, User Growth Rate, and DAU, Q2 2020.
In the first quarter of 2020, Uniswap saw the largest change in ETH locked, user growth, and DAU among all DeFi protocols, due in large part to market events in mid-March. We did not see the same impact of COMP on Uniswap this quarter. Unlike most other protocols in June, when most other protocols were at their most active across the three main stats (ETH locked, DAU, user growth), May was the most active month for Uniswap, while June was actually stalled (Figure 7). In May, Uniswap locked 320,000 ETH before dropping to 240,000 by the end of the quarter. In May, DAU also reached a quarterly high of 4,745. June’s DAU high was lower than April and May.
Maker
Figure 7: ETH locked, user growth, user growth rate, and DAU on Uniswap v1 in Q2 2020.
Throughout Q2, Maker remained stagnant, DAUs remained fairly steady, and user growth has remained steady over the past three months (Figure 8). We did see an increase in DAU in the last two weeks of June, with an increase in ecosystem-wide activity, but Maker DAU’s high in June (643) was lower than the high in April (656). Interestingly, we did see a decrease in ETH locked in Maker, from just over 2 million at the beginning of the quarter to just under 2 million at the end of the quarter. Much of the drop appears to have occurred in the last two weeks of June, suggesting that some of the ETH locked in Compound came from Maker, as people scrambled to free up liquidity for liquidity mining investments.
image description
Figure 8: Maker's ETH locked, user growth, user growth rate and DAU in the second quarter of 2020.
first level title
When measuring the amount of ETH locked and the value locked in USD, a common metric used to measure Ethereum DeFi is Total Value Locked (TVL). The amount of ETH locked is just looking at the locked ETH and WETH in Ethereum DeFi, while TVL is designed to measure the total dollar value of all assets locked on Ethereum, which may include stablecoins like DAI and USDT as well as WBTC and BAT etc other tokens.
TVL in DeFi climbed in the last two weeks of June, ending the quarter at $1.2 billion, with 80.3% attributable to Maker and Compound.
image description
Figure 9: TVL (ETH + ERC-20) on DeFi in Q2 2020. See the appendix for a list of measured tokens.
A concrete example occurred on June 8, when a user (0x...aa7a) withdrew 12 million DAI from Compound and AAVE, borrowed another 2.5 million DAI on dYdX, and then deposited all the DAI into a Maker CDP. Based on a rough estimate of the roughly 200% collateral ratio of WETH deposits, we know that when users move these DAI into CDPs, they lock up at least $5M on dYdX (to borrow 2.5M DAI) and 1450 on Maker. Ten thousand U.S. dollars. This means they contributed $19.5M to DeFi’s TVL, while users actually brought about $17M into DeFi ($5M on dYdX, $12M withdrawn from Compound and AAVE). The flow of the user's funds is shown in Figure 10.
image description
This individual user's locked value was inflated by 14.7% due to double counting of activities that occurred within a single day. We should try to imagine what that number might look like for the entire DeFi ecosystem. More work and further assumptions are required to get a comprehensive double counting rate.
Instead, what we propose is to measure the true total value locked (TTVL). This measurement identifies and removes double counting of funds from the equation when we talk about value locked in DeFi. It’s not a perfect metric, but by identifying and removing as many double counts as possible, we arrive at a picture of the DeFi ecosystem that is closer to reality and more reflective of how the ecosystem has evolved over time.
first level title
07 DeFi users: Deep dive
When we look at Compound usage surging in the last two weeks of June, while Ethereum DeFi user growth has been relatively steady, the question we ask is who is actually using DeFi?
secondary title
DeFi network diagram
Much of DeFi's promised value is DeFi's unique ability to build user networks between interoperable dapps. Existing financial applications often require a third party to facilitate the interaction between financial instruments. This "seamlessness" is by design, and while it may seem simple to the end user, it is often supported by high costs and high liabilities. These end up being passed on to users as fees, long delivery times like 1-3 days and 2% deposit or remittance fees, and lack of sovereignty.
The value proposition of a strong DeFi user network is attractive — but measuring overall user numbers alone doesn’t show us how active users are. However, the transparency of the Ethereum blockchain allows us to answer the question: Are DeFi users actually taking advantage of the interoperability of Ethereum-based DeFi protocols?
Codefi Data's DeFi user network diagram shows DeFi protocols (indicated by logos in Figure 11-13) and users (addresses). Each dot represents a user, and the user is connected to a DeFi protocol that interacts with it during a specific period of time. Users who only interact with one protocol are collected next to that protocol (represented by a "cloud of dots" next to each logo). The size of the cloud illustrates which protocols have a large number of dedicated users. More interesting, however, are the users interacting with multiple DeFi projects, represented by yellow dots (users interacting with 2 protocols) and red dots (interacting with 3+ protocols).
image description
Analyzing DeFi networks over time can provide insight into user behavior in response to ecosystem events. Figure 12 shows DeFi user interactions in April, May and June (from left to right). As expected, the density and size of the clouds around Compound increased slightly from April to May, and then increased dramatically from May to June. As discussed in Figure 7 above, we see that Uniswap's cloud becomes denser from April to May, and then gradually thins out in June as the number of DAUs decreases. Also, in June we saw a significant increase in user overlap between Compound and Aave (June = 2040 vs. May = 730)
Figure 12:
image description
image description
Figure 13 shows the network graph of DeFi users in the second quarter among super users - super users who conducted at least 100 transactions through DeFi protocols during the quarter. There were 1,884 super users in the second quarter, an increase of 18.8% from the first quarter. Uniswap had the largest number of super users in Q2. 1,625 users who made 100 or more transactions (both unique and overlapping) within 3 months (+55% from Q1). No other protocol had more than 1,000 superusers in Q2. Kyber has the second largest super user base with 916, followed by Compound with 367. The largest superuser overlap between DeFi protocols is between Kyber and Uniswap (890 superuser overlap).
image description
Figure 13: “Power users” with 100 or more interactions on DeFi protocols in Q2 2020.
first level title
08 Compound and COMP: A Deep Dive
In mid-June, Compound will sell, use and trade its governance token COMP. COMP enables token holders to vote on Compound mechanisms and protocol decisions. Compound distributes about 2,800 COMP every day.
“In its simplest form, liquidity mining means putting idle assets to work. Typically, it involves providing liquidity in return for rewards, as many protocols that reward liquidity providers attempt to bootstrap liquidity to launch their DeFi applications .Yield seekers are the ones looking for and maximizing those opportunities. The way they measure yield is the amount of underlying crypto assets like DAI, USDC, and USDT that they put on a DeFi platform like Compound for interest or rewards.”
In order to obtain the maximum COMP rewards, DeFi users began to borrow and lend on Compound at the same time. This activity has been aided by protocols such as InstaDApp, which released a feature called “Maximize COMP Mining” to help users more easily leverage Compound’s distribution mechanism.
DeFi users continue to lock funds in Compound — often by releasing more and more funds through other DeFi mechanisms (such as flash loans) and earning a portion of the daily allocation of COMP. As the price of COMP increased from <$100 on June 16 to a high of $341 on June 21 (now around $220), rumors of yield mining began to circulate on Crypto Twitter and Reddit .
Figure 14: TVL in Maker and Compound in Q2 2020. See the appendix for a list of tokens.
From Figure 15, we can see the "crazy" phenomenon of COMP liquidity mining, which shows the amount of COMP distributed every day and the number of users (addresses) allocated to funds. At its peak on June 21, 337 addresses had received COMP payments. During the last week of June, both data sets—users who applied daily and users who received rewards daily—decreased. The downward trend, coupled with the risk of liquidity mining, and Compound’s announcement to change the distribution mechanism of COMP, means that we may see Comp’s share of the TVL market return to historical proportions in the third quarter.
image description
Figure 15: COMP's daily distribution and number of recipients in June 2020.
image description
There are many types of collateral that can be borrowed on Compound. BAT tokens accounted for a relatively small amount of borrowed or borrowed collateral on the Compound platform for most of the quarter (Figure 16). The total supply remained below 5 million in April and May. Total borrowings remained below 500,000 in April and below 250,000 in May.
The annual yield (APY) of encrypted assets on Compound is shown in Figure 17. The release of COMP did not significantly affect the APY of most assets on Compound, including DAI and USDC. However, as expected, BAT lending APY rose from nearly 0% to ~30%, and supply APY increased to ~24%. A similar trend is seen with ZRX and WBTC, two other assets with high potential upside potential and higher potential downside risk when used for yield mining.
image description
Figure 17: APY on Compound in Q2 2020.
first level title
09 Bitcoin in Ethereum DeFi
Just as ETH can be wrapped as an ERC-20 token (WETH) for a wider variety of token mechanisms, BTC can also be represented as an ERC-20 token on the Ethereum network. These "wrapped" or "tokenized" bitcoins can be used in a variety of DeFi protocols that are not available on the bitcoin network.
This quarter, there were approximately 900 to 960 BTC on the Bitcoin Lightning Network. We saw in early April that the number of WBTC on Ethereum reached ~1,000, surpassing the BTC balance on the Lightning Network, and has been increasing since then.
image description
Figure 18: The amount of BTC locked in Ethereum DeFi in Q2 2020.
Figure 19: The amount of WBTC locked on the Ethereum DeFi protocol in the second quarter of 2020
Figure 19 shows the distribution of WBTC among the most well-known DeFi protocols. Starting in mid-May, Ethereum’s WBTC has suddenly increased, and this is all due to Maker. This is due to Maker voting in early May to start accepting WBTC as collateral on the platform.
From mid-June onwards, as we’ve seen throughout the DeFi statistics for the quarter, Compound’s market share began to grow steadily. With the release of COMP and the frenzied liquidity mining activity on Compound, the amount of WBTC increased from a considerable amount (e.g. 167 WBTC on June 15) to 2,273 WBTC on June 30, an increase of 1,261%. We saw similar increases in Balancer (light blue) and Curve (dark green) in late June.
first level title
In Ethereum DeFi, an automated market maker (AMM) is a liquidity pool of two or more assets. These liquidity pools follow a smart contract controlled pricing mechanism that determines the price of each asset in the pool relative to each other based on the volume of each asset in the pool. Uniswap is one of the earliest and most successful AMMs on Ethereum.
In June, the amount of ETH locked in Balancer increased by 370% from 9.6K to 45.4K (Figure 20). This coincides with the steady increase in users in June and the substantial increase in DAU this quarter (up 2107% from April). The attack on Balancer happened at the end of the quarter, but the data in the days after the attack did not show a significant decrease in user activity or the amount of locked ETH, suggesting that Balancer provided DeFi users with opportunities in June that exceeded users’ suspicions. This is most likely due to the BAL governance token. During the liquidity mining boom triggered by COMP in mid-June, Balancer released its own governance token on June 23. Similar to COMP, BAL is used to reward users who provide liquidity to the Balancer protocol. Balancer grew steadily in the final weeks of the quarter, but the specific sharp rise in all metrics in Figure 20 is almost certainly due to the ecosystem's reaction to BAL.
Curve
Figure 20: Balancer’s ETH locked, user growth and DAU in the second quarter of 2020.
Curve's quarterly performance metrics are more in line with what we've seen from other protocols. Cumulative users and DAU grew steadily during the quarter, and then started growing rapidly in mid-June in parallel with the launch of COMP. Shortly after the release of COMP, Curve reached its DAU quarterly high of 1,098 users, up 565% from its May high of 165. Curve ended the quarter with 7,258 subscribers. After hitting a record quarterly DAU high, Curve's daily user count dwindled to about 400 at the end of June.
Figure 21: Curve's user growth and DAU in the second quarter of 2020.
first level title
11 The State of Stablecoins
Stablecoin Trading Volume
Last quarter, on March 13th, we saw a huge uptick in stablecoin trading volumes on DEXs. On Uniswap alone, more than 80% of the day's trading volume was in DAI and USDC, and on February 14, 17% of the day's trading volume was in stablecoins (the highest volume for the month).
image description
The decline in DAI’s transaction volume market share in the second quarter may be due to the increase in USDT transaction volume in the second quarter compared to the first quarter, and the decrease in DAI’s transaction volume in the second quarter compared to the first quarter. Figure 23 shows the transaction volume of USDT in 2020. We can see that after March (which was the yearly high for other stablecoins), USDT’s trading volume has remained at (or close to) March’s volume. An increase in USDT volume, combined with a decrease in DAI volume (from ~$300M in March to ~$100M in June - Figure 24) has driven a "balancing" of stablecoin volume between DAI, USDT, and USDC , as shown in Figure 22.
image description
Figure 23: Trading volume of USDT stablecoins on DEX in 2020.
Figure 24: Trading volume of DAI stablecoin on DEX in 2020.
The data in Figure 25 only illustrates transaction volume for on-chain stablecoins. Overall, DEXs account for only a small fraction of trading volume in the crypto ecosystem. CEX captures the vast majority of trading volume. Our approach in the DeFi report is to analyze as much on-chain data as possible, and believe that the ability to objectively audit an ecosystem like DeFi is one of its greatest characteristics as a new financial paradigm. Data provider Messari has created a Stablecoin Index that tracks stablecoin trading volume on CEXs. Overall, we believe CEX stablecoin volume trends match DEXs – a notable increase in March and a notable decline this quarter.
image description
Figure 25: Stablecoin trading volume of major DEXs from 2018 to 2020
secondary title
Stablecoin Whales
Therefore, the concept of a stablecoin whale is different from the concept of an ETH whale. ETH whales are individuals who can have a huge impact on an already highly volatile market, and an address with a large number of stablecoins is a better indication that someone is protecting themselves from a volatile market, or that someone wants to have a lot of liquidity with the protocol to interact. Since there is no value in holding stablecoins (other than locking them up and putting them to use), we expect stablecoin ownership to be more diverse than other major cryptoassets.
Among "Others" - i.e. all other token holders outside the top 100 - average holdings of DAI = 0.0003% of total supply, USDT = 0.00004%, USDT = 0.0001%.
image description
Figure 26: Top 100 stablecoin owners as a percentage of total supply as of July 1, 2020.
first level title
12 Security of DeFi
2020 is a pivotal year for the Ethereum DeFi ecosystem. In addition to celebrating the milestone of more than $1 billion locked in DeFi and important platforms, security incidents, large and small, are a regular occurrence across the industry in both new and established DeFi applications.
Uniswap: On April 18, $340,000 was stolen via a reentrancy attack vector.
Lendf.me: $25M stolen via reentrancy attack vector on April 19; funds returned after team negotiates with hackers.
Balancer: On June 28, hackers withdrew $450,000+ from the DeFi liquidity provider agreement Balancer.
Uniswap and Lendf.me - Reentrancy Attacks and ERC-777
Uniswap
On April 18-19, hackers stole $25 million from the Uniswap and Lendf.me protocols by breaking the ERC-777 token standard.
secondary title
Interestingly, this attack vector is unknown to Uniswap or the crypto community at large. Almost a year before the Uniswap attack, ConsenSys Diligence, a security audit service provided by ConsenSys, identified and published the ERC-777 reentrancy attack vector. As Uniswap outlined in a March 23 blog post about the capabilities of Uniswap V2, the company plans to address this attack vector.
Lendf.me
image description
secondary title
Unlike the Uniswap incident, the stolen funds were not limited to ETH and imBTC. Most of the stolen funds were in WETH ($10.8 million), USDT and HBTC accounted for another $9.7 million, leaving at least 16 other coins. Figure 28 and Figure 29 show the asset distribution and monthly token volume of the compromised funds on Lendf.me attacked on April 19.
image description
image description
Out of the blue, the Lendf.me hackers returned the stolen funds to the protocol, supposedly because they inadvertently exposed IP addresses during the attack. The Sankey diagram in Figure 30 shows the flow of funds after the hack. Funds left the Lendf.me contract (green), entered the processing contract (gray) and the hacker's address (black). When the IP was exposed, the hacker transferred the funds back to the Lendf.me admin address, which in turn transferred the funds to the recovery address (both in purple). The far right of the graph (which goes out to many individual fund streams) represents when Lendf.me returns funds to individual users.
image description
Figure 30. The flow of funds throughout the Lendf.Me event
secondary title
Balancer DeFi attack
On June 28, Balancer CTO Mike McDonald published a blog post outlining an incident that saw a user lose around $450,000 in cryptocurrency earlier in the day. STA and STONK are ERC20 "deflation tokens", and the attacker exploited the incompatibility between the Balancer contract and the deflation token mechanism. The key to this attack is that, as a deflationary token, STA will also incur a 1% fee on every transaction. Over time, the 1% fee will deplete the total supply of tokens (hence "deflation").
PeckShield conducted a more in-depth review of the incident, outlining that the attack consisted of four steps: 1) obtaining a flash loan; 2) draining the STA pool and driving down the STA price on Balancer; 3) manipulating the pool mechanism and stealing funds, And 4) repay the flash loan.
At this time, the hacker has a large amount of WETH, and there is a Balancer pool holding 1e-18 STA, which means that the price curve controlled by Balancer's smart contract makes the remaining amount of STA in the pool very valuable (this means that a large amount of WETH can be purchased , and does not require too many STAs). The attacker then traded 1e-18 STA for WETH. STAs have to charge 1% for transactions, but there are only 1e-18 STAs in the pool, and deducting 1% of them would cause a mismatch between the functionality of the Balancer contract and the ledger.
This means that Balancer's record (the pool now holds 2e-18 STA) does not match the reality (the pool actually received 0 STA from the hacker, while still holding 1e-18 STA). A better practice of the protocol at this stage is to revert the transaction. However, Balancer's contracts are written to reset previous state snapshots and let transactions go through. This means hackers only need 1e^10-18 STA to get their WETH and can execute transactions again and again. The hacker executed the same series of transactions on multiple pools, including WETH, WBTC, LINK, and more.
The hackers then repaid the loan of 104,331 WETH to dYdX, keeping the remaining assets, taking about $450,000.
Protect DeFi Assets
Auditing service ConsenSys Diligence previously foreshadowed the Uniswap attack in April. In addition, the security incidents of 2020 seem to have pushed DeFi developers into a new era of transparency on security issues. Developers of trading protocol Hegic have released a public "postmortem" for a bug in their code that left some funds unusable. Trading protocol Loopring also confirmed a front-end vulnerability, suspended trading services, announced to the community and worked to fix the issue. In May, Keep Network suspended deposits of BTC into an ERC-20 token known as tBTC, two days after discovering a critical vulnerability. This transparency is critical to building trust between new and existing users and scaling a network of more secure DeFi protocols.
As the number, complexity, and interconnectedness of DeFi protocols grow, more security vulnerabilities and compromises are likely to emerge. Although regrettable, these incidents are critical to the secure development of any emerging technology. The more we can identify and defend against these attack vectors using the services and tools available to us, the more confident people will be in interacting with the emerging open financial ecosystem. Learn more about monitoring network health and preventing security incidents for individual users and DeFi protocols.
first level title
13 DeFi Insurance
Launched in February 2020, Opyn Insurance is an Ethereum insurance protocol that provides protection for DeFi users and ETH speculators. Opyn's existing product allows users to buy or sell composite deposit (USDC and DAI) protection and hedge against Ethereum price volatility by buying and selling ETH protection.
Typically, so far in 2020, roughly four options exist at the same time, each locking in an average of about $400,000. The usual ripening time is about 15-40 days.
image description
Figure 31: Total Value Locked (TVL) in Opyn March-June 2020
image description
Figure 32: Number of liquidity deposits and number of providers for Opyn, March-June 2020.
Especially after the market crash in mid-March — when people were probably more interested in finding ways to protect their ETH holdings — the number of daily providers and USDC deposits has been increasing. Since April, there have been more than 20 liquidity providers on nearly 25 days, and more than 40 liquidity providers on four days. Moreover, these liquidity providers are depositing large amounts of USDC. At the end of April, nearly half a million USDC records were deposited at the end of the month. Volumes were even higher in May, with USDC deposits surpassing $500,000 in those two days.
Liquidity providers have an incentive to earn premiums on their USDC deposits if the price of Ethereum rises. Recipients with the highest USDC premiums have received between 700 and 22k USDC. The largest premium recipient — $22,300 — accounted for more than 30% of total premiums on the Opyn platform.
Liquidity providers have an incentive to earn premiums on their USDC deposits if the price of Ethereum rises. Recipients with the highest USDC premiums have received between 700 and 22k USDC. The largest premium recipient — $22,300 — accounted for more than 30% of total premiums on the Opyn platform.
Figure 33: Breakdown of premium income recipients on Opyn March-June 2020
When the Opyn platform launched in February, it came at a time when the blockchain, Ethereum, and DeFi ecosystems were paying particular attention to security. Amid a flurry of security and market events over the past two quarters, ethereum users are looking for better ways to ensure their funds are protected when using these new platforms. Audits, rigorous security reviews and open source architectures will undoubtedly help, but security incidents will continue to happen. Insurance is the only way to hedge against safety and volatility. Two of the biggest players in the ethereum insurance game, Opyn and Nexus Mutual, have both gone live to help the ecosystem stay bigger in the face of uncertainty
elasticity.
14 Conclusion
Thanks for checking out this Q2 2020 DeFi report. Last quarter, we made some assumptions about our “look ahead” for DeFi in Q2 and beyond. We believe that the decrease in ETH locked in early 2020 was "expected" - and now, we have seen the amount of ETH locked increase to a new all-time high, fueled by frenzied liquidity mining. After the bZx incident, we stated that flash loans will continue to play an important role in the ecosystem. While the biggest impact of Flash Loans this quarter (the Balancer attack) doesn’t illustrate the most positive scenario, it still shows the power of this financial mechanism. Finally, we said the ecosystem should pay close attention to insurance protocols, and we saw Opyn take center stage this quarter as DeFi users look for more ways to protect themselves and their assets.
secondary title
Growing Communities: User Experience and Education
secondary title
The surge in activity on Balancer and Curve (along with continued high activity on Uniswap) suggests that AMMs will play an increasingly important role in the growth of DeFi. For previous points about UX and education, this could be a good sign for DeFi adoption. AMMs are no strangers to the traditional financial world. If the purpose of education is to illustrate the risks and benefits of migrating from traditional AMMs to AMMs dictated by smart contracts, then we could see external AMMs driving the next wave of not only protocol activity, but community growth as well.
DEFI Dad
first level title
15 Acknowledgments to Contributors
secondary title
A few years from now, I believe Q2 2020 will be seen as a turning point for the rise of DeFi and solidify Ethereum’s unstoppable network effect. The narrative that everything worth building is built on Ethereum is the impetus for a new alternative p2p financial system. We're talking currency Lego, pieced together that saves us time, saves us money, and enables apps to have greater global access with low fees, high-yield apps, and no middlemen. The very public milestone of $1 billion in total value locked (TVL) locked in DeFi applications had already been achieved in the first quarter, but the global economic downturn related to the coronavirus pandemic was unexpected. It is impossible for me to foresee that the price of the entire crypto asset market fell by nearly 50% at the end of the first quarter of 2020, and then the locked value of DeFi applications and protocols reached a new historical milestone of $2 billion in the second quarter.
EVERETT MUZZY & DANNING SUI
Beyond those dizzying numbers above and the inscrutable data you'll find in this report, there's a simple explanation for all this growth: There's something for everyone in DeFi. The composability of the DeFi currency LEGO set combined with Ethereum's largest developer community brings new P2P currency applications by many orders of magnitude for lending, borrowing, trading, stablecoin swaps, DEX aggregators, margins Trading, Futures, BTC Futures, Tokenized BTC, Options, Commodities and Forex Derivatives, and exposure to new ETF-like products thanks to Balancer. Most of them were launched in just 3 months or became widely available in the second quarter.
DeFi on Ethereum has seen more innovation in 3 months than traditional finance has seen in 3 years. When you use these apps on a regular basis and realize that they not only work but also confer an asymmetric value, you will find that they are not complicated. If you can recall ever experiencing the likes of email, AOL Instant Messenger, and Napster, there's no way you can't see the value of this revolution. DeFi is to money what email is to the postal service. With the variety of DeFi applications built on Ethereum, everyone can benefit from it. It would be a shame to read this report full of data and insights without actually trying to use one of the many DeFi applications to revolutionize how future generations conduct peer-to-peer transactions. A quick warning though: once you experience DeFi, there is no going back.
Everett Muzzy is a researcher and product marketing manager at ConsenSys.
Danning
Over the past two quarters at Everett, we have seen massive upheavals in the DeFi ecosystem. In the first quarter, the bZx attack and March 13th “Black Thursday” – both caused DeFi protocols to come under enormous pressure and caused some people to lose funds and positions. In the second quarter, the issuance of COMP and the stimulation of liquidity mining caused market volatility—but in a positive direction. While DeFi’s heights today are the result of gradual adoption and growth since 2018, each quarter tells a more convincing story of how DeFi has thrived under enormous network pressure. The first quarter reminded us of the importance of security audits, open communication and hedging risks. Q2 reminds us of DeFi's extraordinary innovation and opportunity for a new financial paradigm. There can be no second-quarter success without first-quarter clarity, and we will continue to see this relationship until we reach yet-to-be-determined adoption and stability thresholds. Strong data availability is fundamental to our ability to deal with this DeFi evolution.
LEX SOKOLIN
secondary title
In the past two quarters, we have seen DeFi products open up various new financial functions, including flash loans, insurance options, liquidity mining and tokenized BTC. A wider range of species has been added to the ecosystem. We are excited to see most of the new DeFi products incentivizing existing and new DeFi users to explore new ways to play "Def Lego" in the second quarter. In the example of COMP in particular, we've seen how COMP's price hypes up over the course of a week, how the BAT supply rises and falls, and how DAI locked in Compound insanely exceeds its total supply -- all These are due to an adjustment made in the COMP reward model. All these dynamics and synergies demonstrate the vitality of the DeFi and Ethereum communities from both a user base and a developer perspective.
secondary title
Lex Sokolin is ConsenSys Global Fintech Co-Head.
The DeFi network graph in this report shows you the user growth, evolution, and interconnectivity between 2018 and 2020 in the emerging blockchain-based financial software industry, or DeFi. Digital currencies are collateralized on the left, invested across various loan products in the middle, and sent to multiple trading and derivative exchanges on the right. The number of service providers, their specialization and users is growing. The linkages between these services and the economic activity between them is also growing. This is both an advantage and a disadvantage. Systemic risk comes from too much interdependence. But so are network effects and communities.
This snapshot could be the seed for the birth of a financial machine as more activity from real world economies is able to move to public blockchains. Of course, this transition is a huge assumption, and so far, much economic activity in the digital world has remained digital and independent. However, signs of change have emerged. EY, Microsoft, and ConsenSys recently announced the launch of a protocol that allows private transactions on ethereum, packaged in such a way that large technology integrators can use it to engage with enterprise customers. If the big consultancies can solve the scalability and privacy challenges and deploy the core infrastructure on the Ethereum network, it will bring the mana DeFi needs to thrive.
We've gotten a little far in the weeds, but I want to make one last point. As you dig deeper into these questions and think about new software providers, don't think of them as investment managers, creating return streams. The mistake is to assess the investment quality of certain network tokens of a certain size as unattractive, while missing the bigger picture. You might be spending too much time thinking about the Ethereum token instead of its ability to power asset allocation software like TokenSets (social trading) or PieDAO (robo-advisor). To that end, the visualization below gives you an orientation-correct comparison of technology enablers rather than assets themselves.


