An analysis of Ethereum’s decentralized finance ecosystem in Q2 2021.
An analysis of Ethereum’s decentralized
finance ecosystem in Q2 2021.
ABOUT THIS REPORT
In The DeFi Economy Built on Ethereum, we analyze the growth of stablecoins, DeFi assets, and DeFi loans, and the type of transparent data consumers can get when financial services occur on Ethereum.
Decentralized exchanges are also solving the issue of being able to access crypto assets from anywhere in the world as long as you have an internet connection and a wallet like MetaMask. We cover DEX volume, explore the capital efficiency of Uniswap Version 3, and do a deep dive into the anatomy of a token swap.
While much of DeFi today involves a community of power-users that can stomach risk and custodying their own assets, we are increasingly seeing the emergence of new services that manage risk, custody assets, and provide compliance and reporting. In How DeFi is Attracting Institutional Finance, we analyze the new types of companies and services that are enabling institutional inflows of capital into DeFi.
What makes DeFi so alluring is that anyone with an idea can coordinate, pool funds, and even create tokens that represent your share within the organization. Decentralized Autonomous Organizations (DAOs) have grown in Q2 to represent new coordination mechanisms for dealing with financial decisions as a group, for fundraising or deploying capital, which we cover in Down to DAO.
Most of the major DeFi protocols are not only used for borrowing and lending, but are also governed by token holders. We cover the major DeFi governance votes and their significance for generating yield for participants.
In the Scaling DeFi section, we describe the new ways in which Ethereum-compatible scaling solutions are solving current limitations on Ethereum, such as high gas fees and throughput limitations. As new types of Ethereum-compatible Layer 2 protocols and sidechains come to market, so too has DeFi activity begun to migrate to these new networks.
As of July 1, 2021, there are now 161 million unique Ethereum addresses, a 10% increase from the end of Q1 2021, and a slight decrease in the 12% growth from the beginning of the year.
By the end of Q2, 2.91 million unique addresses used at least one DeFi protocol, a growth of 65% from Q1. As community driven education, simple user interfaces, appealing yields, and general awareness around DeFi best practices increased throughout the quarter, so too did the number of new addresses, though it must be noted that with wallets like MetaMask, it is easy to make multiple accounts, which means addresses and users are not simply one-to-one. While this is a substantial increase, active DeFi addresses only represent 1.81% of all Ethereum addresses.
Another metric to gauge DeFi usage is the number of monthly active users on MetaMask, which is the leading non-custodial wallet on Ethereum. By June 1, 2021, MetaMask monthly active users surpassed 8 million. This is in part due to the growth of DeFi applications on other Ethereum Virtual Machine (EVM) compatible networks that users can access via MetaMask, like BSC and Polygon. We dive deeper into this data in the Scaling DeFi section.
Stablecoin supply continued to grow at a rapid pace in Q2 2021, now representing a total issuance of nearly $65 billion USD, up more than 60% since the end of Q1 2021. We’ve written about the different types of stablecoins and how they keep parity with the USD or other fiat currencies in our Q1 2021 DeFi report, if you need a refresher.
At the advent of stablecoins on Ethereum, USDT (issued by Tether) represented the largest proportion of stablecoins on Ethereum. Tether now represents 48% of the total stablecoin market on Ethereum, decreasing from approximately 58% of the total supply at the end of Q1 2021.
USDC, a stablecoin issued by the Centre consortium, is backed by USD in a bank account. At any time, USDC holders can convert their USDC into dollars on exchanges like Coinbase for no cost. Open questions around Tether’s backing, which only this quarter revealed that 49% of its treasury is backed by unspecified “commercial paper,” might be part of the reason why DeFi users increasingly prefer USDC and DAI for DeFi protocols. DeFi lending protocols like MakerDAO, Compound, and Aave now hold about 23% of the USDC supply.
Stablecoins, like MakerDAO’s DAI or Centre’s USDC, are not only one of the great early foundations for DeFi but also are a way to hedge against volatility in crypto markets. Swaps between ETH and other ERC-20 tokens and stablecoins are one of the most frequent trading pairs that users access through MetaMask Swaps.
Beyond hedging against volatility without having to convert ETH and other tokens into fiat currency on a centralized exchange, stablecoins are a fundamental building block for other DeFi primitives, like borrowing and lending. Outstanding DeFi debt increased from $10 billion USD to an all time high of $18 billion USD in mid-May until asset prices of ETH and other ERC-20s crashed, causing a record $362 million USD in liquidations on May 18th.
Decentralized exchanges (DEXs), automated market makers, and token swapping aggregators are technical descriptions of the types of cryptocurrency exchanges that operate without a central authority, allowing users to transact peer-to-peer and maintain control of their funds.
Coinbase, the popular cryptocurrency exchange that went public in Q2, identified decentralized exchanges as one of the key threats to their business in their S-1. It’s no wonder: in Q2 2021, DEXs saw the highest ever volume, with May alone witnessing a whopping $173 billion USD in volume, and Q2 total of $343 billion USD. This surpassed Coinbase’s total trading volume of $335 billion in Q1 2021. This is notable because DEXs enable trading only for EVM-compatible assets, whereas 58% of Coinbase’s trading is Bitcoin.
Why not compare the Q2 DEX volume with Coinbase’s Q2 volume, you may ask? The answer reveals another one of the advantages of decentralized exchanges: because they are deployed as smart contracts on Ethereum itself, all real-time data can be viewed using open-source services like Dune Analytics. With Coinbase (and really, most financial reporting), you need to wait for the company to issue its data. Now, companies like Nexus Mutual, a decentralized insurance protocol, use Dune Analytics to maintain a real-time public dashboard of their financials, such as total supply, cover costs, claims, earnings, and more. We anticipate that public real time transparency will increasingly become not only a key differentiator of Ethereum-based DeFi, but a major advantage.
One of the significant moments for DEXs in Q2 was Uniswap’s deployment of its third version, Uniswap V3. Uniswap’s market share of DEX volume increased from 60% to 74% throughout Q2. The major change for Uniswap V3 is improving its capital efficiency, or concentrating funds at the price range where an asset is most likely traded.
Because smart contracts on Ethereum are permanent, people can still use Uniswap V1 or V2. Currently, there is still more value in providing liquidity on Uniswap V2, but Uniswap V3 has more trade volume — evidence that this new approach to capital efficiency is working for finding users the best prices for various asset pairs.
Token Swaps have become a major part of the DeFi ecosystem: from swap aggregators built into MetaMask to decentralized exchanges and automated market makers Uniswap, SushiSwap, Curve, 1Inch, and many others. We think it is important to give our readers a peek under the hood of the foundational concepts and code that make a swap possible. We are going to look at some code snippets based on the Ethereum Foundation ERC20 Tutorials, OpenZeppelin ERC20 Token Standard and the Uniswap Smart Contracts.
Why is this important? As we have mentioned in other DeFi reports and on the ConsenSys blog, Ethereum allows for transparency - we can inspect the smart contract code that powers the DEXs and AMMs we interact with and see what those shadowy super coders are doing. The claim of transparency requires a user to have the literacy and tools to actually see what is going on, and our goal is to do that for you here. Providing some literacy around what this code does provides insight into how our decentralized ecosystem works. If you find this section interesting and want to learn more about how to read and write smart contracts, we encourage you to sign up for the ConsenSys Academy Blockchain Developer Program 2021!
What is a token swap? In this example, we are going to define a token swap as an exchange of fungible token(s) that conform to the ERC-20 token standard. The token or tokens will be moved from one address to another address in exchange for a different ERC-20 token atomically; at the same time. A token swap can occur between two addresses not associated with a smart contract, often serving as a wallet. We refer to these addresses as externally owned addresses (EOAs). A token swap can also occur smart contract addresses, or a combination of EOA and smart contract addresses. An example of such a swap would be Wrapped Bitcoin (WBTC) for DAI. The term swap is also used to apply to an ETH to ERC-20 token exchange, and vice versa. An example of this would be ETH for USDT.
Hover over the code to get a brief explanation of what it does.
In order to a swap from one ERC-20 token for another ERC-20 token, one possible flow is as follows:
Externally Owned Account (EOA) Holding WBTC → WBTC TOKEN MOVES TO → Router Smart Contract → Router Contract Handles the Swapping of Token at a certain exchange → Returns DAI to → Original EOA
There are three functions that we are going to examine - transfer, approve, and transferFrom.
The transfer function allows the address that owns the ERC-20 to move the token to another address. The transfer function is called by the address that possesses the token.
In instances where the owner of the token wants to delegate moving of tokens to another account, a combination of approve and transferFrom are required in order for the token to move.
The approve function allows the token owner to provide another address with a specific allowance of tokens to move. allowance is the number of tokens that the address is authorized to move from the balance of the token holder. The approve function is required in order to allow for the movement of tokens from one account to another when an address that is not the owner of the token is initiating the transfer.
The transferFrom function is called by an address (EOA or contract) that has been authorized to move funds. Thus, it could be used to move a token from one EOA to another EOA. It could also be called from a Smart Contract Account to move a token from our account to, for example, a Router Smart Contract. TransferFrom is the same as transfer except for the fact the token movement is being initiated on behalf of the token owner by an account provided an approval to move the tokens, and has a predefined allowance of tokens authorized to move.
One of the advantages of swapping in MetaMask is that the UX abstracts away needing to both approve and transferFrom function, meaning that you can do both with a single button click, creating a better user experience.
From the data and analysis presented, it’s not hyperbole to claim that the entire financial system is being rebuilt from first principles with more security, transparency, and composability across protocols.
With radical financial innovation and growth comes radical investment returns and opportunity, leading to more and more institutional capital flooding into this space. Just check out our tool Codefi Compare, to see how yields compare with traditional finance. Providing USDC liquidity on the lending protocol Aave currently yields 6.27% APR, yielding 7.22% on average since inception. As protocols chase liquidity, attractive yields like 32.5% for providing sUSD liquidity on Aave are increasingly becoming the norm.
Most of these lending protocols have only been around for a few years, and while jurisdictions around the world are still determining how to best map existing regulatory structures with their new logic, new services have begun playing a fundamental role in enabling institutional financial inflows onto these protocols. In general, larger financial entities have more onerous compliance and regulatory monitoring, reporting, and oversight. This is why DeFi has seen strong early adoption within small and mid-cap crypto funds (with AUMs of less than $1bn).
Driven to take advantage of the exceptional investment returns, but also able to do so from a regulatory and compliance perspective, more regulated institutional investors are now stepping into this space. PWC reports 47% of traditional hedge fund managers, representing $180 billion of AUM, are looking at investing in crypto. An Intertrust survey found hedge funds are expected to hold 7% of their assets, equating to $312 billion in cryptocurrency in 5 years. Investment firms will no doubt lead the adoption of DeFi; however, for these and other larger and more regulated institutions to cross the chasm, the required DeFI infrastructure will have to be built. Excitingly, this is exactly where the market finds itself.
The requirements of institutional finance can be mapped using the capital allocation cycle — from research, pre-trade compliance and best execution to monitoring, reporting, and custody. Over the last 6 months, there has been an explosion in products and services in all these categories. With capital flooding in to build the necessary DeFi infrastructure. Crypto custodians, for example, have raised large rounds, taken on strategic investments, and have even been acquired.
Coinbase custodies over $90 billion alone, while other purely institutional custodians like Bitgo custody have at least $16 billion assets under custody. Gemini has more than $30 billion in assets under custody. Furthermore, custodian technology companies, like Fireblocks, have transferred more than $100 billion. Compliance, trading and data analytics are attracting capital to build and scale institutional crypto access.
It’s not just the tooling and infrastructure around DeFi that is being built. DeFi itself is also innovating to provide access to institutional finance. One example is private lending pools that ensure only verified participants (KYC laws) have access to on-chain asset management, such as Aave’s permissioned pools. Compound Finance recently launched the Compound Treasury, a new product that will allow institutions to earn a fixed interest of 4% a year. Leading fintech companies, such as Current, have already begun working on integrating Compound Treasury into their product. More and more institution-focused projects are coming to market to solve for miner extractable value (MEV), create best-execution protocols, and figure out decentralized identity.
This quarter, ConsenSys launched MetaMask Institutional, a wallet built for institutions utilizing the same technology that supports the most battle-tested wallet in the industry, MetaMask, which boasts over 8 million MAU. MetaMask Institutional allows institutional investors to access DeFi while ensuring that they can create safeguards preventing their internal fund managers from absconding with funds. MetaMask Institutional allows for how many internal parties are required to move assets, ensuring that a fund manager cannot go rogue and steal all the assets.
Furthermore, MetaMask Institutional also has a robust address tracking system that allows custodians to effectively identify addresses within pools that are suspected of nefarious activity, called Codefi Compliance. There are many funds wanting access to DeFi, but cannot because they legally feel they cannot commingle their assets with assets from unverified sources. Usually, KYC solves this issue, but since DeFi protocols don’t employ KYC because they are open and decentralized by nature, there is no centralized party that can perform the action for the protocol.
With the continued success of DeFi protocols and services, Decentralized Autonomous Organizations (DAOs) as a means of protocol governance have flourished. These DAOs, which number in the thousands, control sizable treasuries that can be allocated towards various initiatives and new projects.
In fact, more than $6 billion dollars’ worth of digital assets are now held in just the top 20 DAOs alone. While well-known DeFi projects such as Compound and Uniswap command the largest DAOs, there are thousands of other projects — from media organizations like Bankless to social token communities like Alex Masmej’s, to public funding entities like Gitcoin — that utilize DAOs to coordinate, govern, and manage their financials. There are now more than 190,000 DAO members across crypto.
DAOs have been able to flourish largely because of the emerging tooling and development ecosystem that is increasingly providing the necessary functions to support these new organizational structures. Our very own Corbin Page did an excellent job creating an infographic depicting the ecosystem.
There are now projects that solely focus on token services, governance, treasury management, risk management, growth, community, operations, and development for DAOs.
As crypto projects continue to grow and distribute governance, DAOs will continue to increase in importance. Today, many projects have DAO structures but are still often controlled by a small handful of investors and the original team that built the initial product.
Over time, DAOs will gain more relevance as real disagreements emerge between key stakeholders within communities that can only be solved by campaigns for votes, similar to activist investing.
Until there are true disagreements between key stakeholders of DAOs, gadflies such as Chris Blec will continue to be the sole parties that point out the current areas of improvements within DAOs.
Currently, governance drives changes in most of the major DeFi protocols.
Token holders vote on proposals, which range from propositions on how a protocol should allocate its treasury funds to more specific details, like changing a collateral factor for an asset on Compound Finance which determines how much a user can borrow when posting that asset as collateral. Users can clearly see major upcoming changes in DeFi protocols by following the governance updates.
Out of any protocol, Synthetix by far has the most active governance. Every week, there are always multiple updates changing the various parameters tied to minting synthetic assets based on posted collateral. Furthermore, Synthetix often changes the fees associated with issuing synthetic assets on the protocol. Synthetix has opted to lower their target collateralization ratio because of market volatility. Finally, Synthetix manually approves new assets that users can create synthetic versions of, such as US stock indexes, via the governance process.
Below are the top changes this quarter:
While Synthetix offers one of the most active governance systems in all of DeFi, Aave’s governance typically deals with bigger proposals, such as updating their native insurance system in case there is a shortfall event, which is called the Aave Safety Module. Additionally, Aave also voted to add the crypto collateralized stablecoin Rai to Aave V2.
Below are the top changes this past quarter:
AirSwap token holders are compensated for creating improvement proposals and voting. After voting, participants are able to claim from a pool of collected protocol fees, proportional to the weight of their vote. In Q2, the community proposed and approved a vote to create a new token swapping website refined around a lean, simple, and secure swapping experience, established a new visual style for AirSwap web properties, and passed a bounty system allowing additional activities beyond proposal authoring and voting to be rewarded, such as creating analytics dashboards, and technical improvements. The community has also passed a vote to have a governance ‘circle’ where each member can allocate points to the contributors they have worked with based on their contributions which are paid at the end of each epoch.
Similar to Aave, Uniswap also does not have an incredibly active governance process. This lack of robust governance could stem from the fact a vote requires 40 million UNI backing it to pass, and that a user must have 2.5 million UNI to submit a proposal.That being said, Uniswap did pass two votes to reduce the proposal submission threshold to 2.5 million UNI and to fund a new DeFi lobbying organization that seeks to educate regulators/lawmakers on the benefits of DeFi.
Like Aave and Uniswap, Yearn does not have a very active governance presence, though this past month the protocol saw significant changes to its governance process. Additionally, Yearn set parameters for what teams should decide how to distribute airdrops Yearn strategies generated. Finally, Yearn proposed a change to their Multisig Signers and also passed a new governance structure for the protocol. Multsig signers are akin to a board of trustees for the protocol. They are not managing the day to day operations, but do have to approve the major decisions.
Below are the top changes this past quarter:
Compound, like Synthetix, also has an incredibly active governance process. Big updates include moving to a new governance smart contract that iteratively updates, support for new assets such as LINK, and an increase in the amount of days users have to review a proposal prior to voting/how long they have to actually vote on a proposal. Furthermore, Compound opted to change their oracle system from utilizing primarily Coinbase to using Chainlink’s oracle network. Finally, Compound updated their cToken standards so that now 2.8% of a liquidation goes to their cToken reserves, reducing the risk of cascading liquidations that could render the protocol insolvent.
Below are the top changes this past month:
Between April 1st and June 1st, the median gas price fluctuated significantly, from 100 Gwei to 300 Gwei at its peak.
Every DeFi user dreads when gas reaches 300 Gwei, which happened on May 18th as the price of ETH slid and users rushed to interact with DeFi lending protocols to avoid liquidation, where the total gas costs exceed $100 USD. Since June, the median gas fee has been quite low, hovering around 30 Gwei, or $1.33 for a simple transfer and $12.65 for a Uniswap trade. Why the huge disparity?
The best answer is that EVM compatible blockchains have really taken off in Q2, attracting users with much lower fees and higher throughput. In fact, Binance Smart Chain and Polygon’s Proof of Stake commit-chain have recently overtaken the number of transactions on Ethereum.
Layer 2 technologies aim to dramatically reduce the cost and time of transactions on Ethereum. Currently, there are more than 15 significant EVM-compatible scaling projects, and the semantics around whether a network is a Layer 2, sidechain, commit-chain are fraught. For that reason, we created a framework for users to apply when considering which Layer 2 project to explore and understand how it might fail?
The process for using a Layer 2 network on Ethereum involves a few steps. You first need to move assets like ETH or USDC to the Layer 2 network using a “bridge,” and then switch networks on MetaMask from Ethereum Mainnet to the specific Layer 2 network you will be using.
Each of these steps introduces risk — that you may be locking funds in an insecure bridge, or not be able to withdraw those assets when the network becomes congested. As you can see in the following charts, the value of assets locked in these Layer 2 bridges has been variable, as users try out different networks and mostly a similar group of users move assets between various networks.
In general, as more and more Layer 2 networks go live, rollups in particular, we may see assets further redistributing. Optimism, which uses Optimistic Ethereum, is now available on Infura and Truffle. Arbitrum will soon be available as well. The community is also anticipating Uniswap V3 deployment on both of these networks, and it will be interesting to see which implementation drives more volume.
MetaMask Institutional gives institutional investors access to the DeFi ecosystem through the most trusted and used wallet. Metamask enables funds to easily swap tokens, borrow, lend, invest, and interact with DeFi protocols and applications directly using the MetaMask interface—upgraded to include enterprise security, operation, and reporting features to power a professional DeFi experience. With MetaMask Institutional, institutional investors achieve unrivaled access to decentralized applications with native integration, enterprise-grade security, and robust compliance features to create secure and efficient processes for institutional workflows.
Codefi Staking enables institutions to stake ETH without the complexities of maintaining validator infrastructure or ever surrendering custody of their ETH to a third-party. We significantly reduce technical risks and optimize operations for increased rewards generation. We utilize best-in-class validator key and transaction security and facilitate efficient validator management. Early staking participants, including exchanges, funds, and custodians, are generating an average of 9.9% annual percentage yield.
Codefi Activate supports decentralized networks through application development, network launch, community growth, token distribution, and network governance. We leverage the ConsenSys product suite—including infrastructure from Infura or Quorum, development tools from Truffle, security audits from Diligence, and DeFi access through MetaMask—to help build and strengthen decentralized applications. Codefi has already helped facilitate SKALE’s token sale, deploy the Eth2 deposit launchpad, build Filecoin’s storage platform and DeFi bridge, and manage AirSwap’s new governance model.
Crypto exchanges and exchange aggregators need reliable infrastructure to access this data, in addition to scaling capabilities in order to meet large request volumes. The Infura API suite helps cryptocurrency exchanges like Uniswap and exchange aggregators like Paraswap meet the data demands of their users, with easy integration and high volume scaling capabilities.
ConsenSys Codefi is the blockchain application suite powering next-generation commerce and finance. Our vision is to lead the convergence of existing and decentralized financial technologies to create more accessible and equitable financial services for everyone, everywhere.
We work with financial institutions, global enterprises, and Ethereum projects to optimize business processes, digitize financial instruments, activate markets and networks, and deploy production-ready blockchain solutions.