
Summary
As the first article in our DeFi series, this article aims to give an overview of the DeFi ecosystem and introduce several of the most important protocols. In this article, we analyze the overlap between Maker and Compound in terms of user bases. In subsequent articles on DeFi, we will also conduct research on user bases and systemic risks. Keep an eye out for our continuously updated dashboard and Reporting tool to download all the data. We will also continue to push the DeFi weekly report - welcome to subscribe on our official website!
introduce
introduce
Over the past few months, various projects have popped up in the decentralized finance space on Ethereum. We took an overview of the DeFi ecosystem from the block. The most popular protocols are divided into Exchanges & Liquidity, Derivatives, Prediction Markets, Stablecoins, and Credit. We will analyze each case one by one below.
-Figure 1 - DeFi Ecosystem Classification Overview (Source: https://www.theblockcrypto.com/2019/03/14/mapping-out-ethereums-defi/)-
image description
Maker DAO & DAI
-Figure 2 - ETH locked in major DeFi projects (Source: https://public.tableau.com/profile/alethio.defi#!/vizhome/Overview_15567111639100/DeFiOverview)-
first level title
What is DAI?
DAI is a cryptocurrency backed by pledged assets. It exists entirely on the blockchain. Its stability and anchor relationship with the US dollar do not depend on any intermediary. DAI is backed by pledged assets locked in audited open smart contracts.
How is DAI generated?
Through the CDP (collateralized debt position) mechanism, feedback mechanism and trusted third parties, Maker uses a series of smart contracts deployed on the main network to maintain the value of the stable currency DAI. Anyone can use their ETH to generate the stable currency DAI.
Users who want to generate DAI first need to create a CDP, and then pledge ETH into Maker's CDP smart contract.
From a technical point of view, what is pledged is not the real ETH, but PETH, also known as Pooled Ether. First convert ETH into WETH (Wrapped Ether), that is, an ERC 20 token with a 1:1 exchange ratio with ETH. PETH acts as a share of the "Ether pool" - after you pledge ETH, you will get a certain share according to the pledged amount. It should be noted that, unlike the exchange ratio between ETH and WETH, the exchange ratio between ETH and PETH is not 1:1. Currently, 1 PETH = 1.04 ETH — the reasons for which will be explained later.
The ratio between the amount of ETH pledged by the user and the amount of DAI generated is called the pledge rate. For example, depositing 1 ETH into the pledge contract, if the pledge rate is 200%, and 1 ETH is worth $1,000, the user can generate 500 DAI. At this point, the control of this ETH is no longer in the hands of the user—after the debt of 500 DAI is repaid, the CDP will be closed and this part of DAI will be destroyed.
If the price of ETH fluctuates, the price of ETH in the CDP drops to close to the pledge rate-it will face the risk of liquidation. However, unless the assets in the CDP are liquidated, users can increase the amount of pledge through the mechanism. The reverse is also true - if ETH appreciates, the collateralization ratio becomes higher - the user has two options. You can choose to generate new DAI based on the previous pledge rate, or take out a part of the pledged ETH. Users can also transfer the ownership of CDP, repay all debts or completely cancel the account.
(When the liquidation occurs) PETH as a pledged asset will be sold to DAI holders at a certain discount until the debt of the corresponding volume in the CDP is paid off. If DAI is purchased at a premium, the premium will be used to repurchase PETH in the market and burn it, thereby increasing the ratio between ETH and PETH (1 PETH = 1.04 WETH = 1.04 ETH).

(According to the purple paper) the life cycle of CDP can be divided into 6 stages:
image description
-Figure 3 - The 6 phases of the CDP lifecycle-
1. PRIDE: CDP meets the over-collateralization condition, but has not reached the debt ceiling
2. ANGER: CDP creates debt up to ceiling
3. Worry (WORRY): CDP's pledged asset prices fluctuate
4. Panic (PANIC): The CDP is under-collateralized, or the price fluctuation of the pledged assets in the CDP exceeds the grace period
5. Grief (GRIEF): Trigger liquidation mechanism
6. Despair (DREAD): Trigger and start liquidation
Some revelations:
Pledge assets can be added to the CDP before the GRIEF stage.
The pledged assets can only be taken out in the PRIDE stage, and some debts can be paid off in the ANGER stage.
Each liquidation action has a corresponding phase.

Risk Management: MKR Token. It is an ERC-20 token that is automatically minted/burned based on fluctuations in the price of DAI in order to maintain the price of MKR around $1. In addition to being used to pay the stability fees imposed by the system, MKR holders are responsible for participating in risk management by exercising voting rights. They can add/modify existing CDP types (currently only single-collateral CDPs are supported), change the DAI savings rate (currently not used - this is part of the transition to multi-collateral CDPs), choose to help provide An oracle for accurate pricing of pledged assets (appropriately incentivizing external participants to participate in the quotation), selection of an oracle that can trigger an emergency shutdown, and finally, (under the emergency shutdown mechanism) once enough yes votes are obtained, voters can Trigger an emergency shutdown (emergency shutdown can be triggered when the technology is updated or the system encounters a serious attack).
-Figure 4 —— Maker community situation as of March 12th-
Compound
The graph above shows the user profile surrounding the Maker staking asset pool as of March 12. Green nodes represent all external accounts that create CDPs and pledge assets in the liquidity pool. Some of these nodes communicate through proxy contracts (blue nodes), first exchange ETH into WETH, and then pledge WETH into Maker SaiTub, and some nodes directly send WETH to Maker (that is, the green nodes around Maker). The total amount of WETH is the total amount of ETH locked in Maker, currently there are about 2 million. (* 2% of total ETH supply, ~89% of the main 6 DeFi projects*)
first level title
Users send tokens directly to the Compound platform and receive a floating interest rate without negotiating with the counterparty (instead, the borrower lends tokens from the platform and pays the interest rate).

The interest rate of the Compound agreement is not determined by the negotiation between the borrower and the lender, but is calculated based on the theoretical model that the interest rate rises with the increase of demand. Every money market calculates this, so each token has its own interest rate model — a function of the utilization of that particular token. Of course, the lending rate is lower than the borrowing rate - to ensure the economic stability and sustainability of the protocol.
image description
-Graph 5 - Current Rates of Tokens on Compound (Source: https://compound.finance/) -
What are the advantages of lending on the Compound platform?
Similarly, the borrower can lend tokens immediately (users must ensure that the pledged amount exceeds the debt amount through an over-staking mechanism similar to Maker to ensure solvency). Borrowers do not need to place an order, and can use their existing assets to lend tokens, which can be immediately used in the Ethereum ecosystem.

Platform usage
-Figure 6 - Token Usage on Compound-
The table above summarizes token usage on the Compound platform. The easiest way to determine supply and demand conditions and their effect on interest rates is to look at the loan amount, number of lenders, and number of borrowers. Another interesting metric that could explain the higher interest rates is that DAI and WETH are the two most lent tokens, as shown by the percentage of total supply lent at a given moment.
first level title
Token exchange: Uniswap
Uniswap is a protocol that automates token trading on Ethereum. According to a Reddit post by Vitalik, Uniswap is a series of smart contracts deployed on the mainnet. The platform has no native token of its own (it actually aggregates more than one token, and there will be more in the future), no centralized order book, and no fees from the platform and platform creators (liquidity providers and users will be charged a fee). At present, less than 30,000 ETHs are locked on the Uniswap platform. This amount alone is enough to make Uniswap one of the top five DeFi platforms. However, this amount does not yet represent all the tokens pledged on Uniswap-after adding it, Uniswap has become the third largest value-locked DeFi platform in the world (after Maker and Compound).
The way Uniswap works is primarily to create separate money markets for different ERC 20 - ETH token pairs. Everyone can deploy smart contracts on this platform to create a new exchange for any ERC 20 token. These smart contracts reserve some ETH and associated ERC 20 tokens. Then, use ETH as the transaction medium to match the transaction between the two tokens - all smart contracts are connected through a register, and the transaction information is recorded by this register. These tasks are completed by the uniswap_factory contract, which is both a factory and a register. Users can deploy an exchange contract for new ERC20 tokens using the createExchange() function.
Traditionally, on centralized exchanges, the way users provide liquidity is to choose a few price points for trading—you can place buy orders, sell orders, or both parties. All traders' orders are recorded in the order book. However, on Uniswap, the liquidity of both parties to the transaction is brought together, and then the market is automatically made according to the algorithm. Uniswap has an obvious feature - liquidity will never be exhausted. Admittedly, such a grandiose goal cannot be achieved without sacrifice. The approach taken by the Uniswap algorithm is to increase token prices through a progressive function. Therefore, the more tokens you want to buy at one time - the higher the unit price you have to pay, thus forming a trade-off relationship. Big players can no longer trade large sums, but at the same time - and the system is always liquid - deals are being made every second of the day.
What does it mean for liquidity providers?
After injecting the equivalent value of ETH and corresponding tokens into an ETH-ERC 20 token trading contract, the contract will issue a liquidity token to the liquidity provider, and these tokens represent the liquidity in the liquidity pool. Shares (10% of the total liquidity in the liquidity pool - those who receive these tokens are entitled to 10% of the total liquidity). These liquidity tokens only represent the amount provided by liquidity providers. As liquidity increases or decreases, liquidity tokens are generated/burned accordingly, ensuring that everyone's relative share remains the same.
fee structure
After talking about how to become a liquidity provider, let's talk about why you should become a liquidity provider. The incentive to provide liquidity comes from fees that all transactions pay. These fees are re-injected into the liquidity pool, so that even if the percentage of the liquidity pool held by the provider is always the same, the value of this percentage will increase. The platform does not charge fees, only transaction fees.
fee structure
1. ETH ➡️ ERC 20 Token Trading
Pay 0.3% transaction fee in ETH
2. ERC 20 token ➡️ ETH transaction
Pay 0.3% transaction fees in ERC 20 tokens
3. ERC 20 Token ➡️ ERC 20 Token Trading
Pay 0.3% transaction fee in ETH Exchange ETH to ERC 20

The actual transaction fee for the token is 0.5991%.
-Figure 7 - Uniswap Liquidity Providers (Currencies and Quantities Offered)-
The graph above shows the liquidity providers for each token. Each color represents a currency, and each rectangle represents a liquidity provider. The size of each rectangle is proportional to the fluidity. The two largest coins on the left (green and gold) are DAI and MKR respectively – these two are clearly the most popular trading pairs.
first level title
Prediction Markets: Augur
Augur is a platform where users can create prediction market projects. In these prediction markets, players can bet on which outcome will actually happen. Because people who guess the result correctly can get rewards afterwards, people are motivated to contribute their wisdom on different projects (ie betting, buying and selling), and the final result is the prediction of the participants.
Prediction markets are divided into four phases: creation, trading, reporting, and settlement. Trading is opened immediately after the prediction market is created, and once the event occurs and the outcome is determined, users can close their positions and withdraw their funds.
As long as it is something that has not yet happened, you can create a prediction market. The creator will set the event deadline and designate a reporter of the event result (if the reported result is deemed wrong, the community can challenge the event reporter). The creator can also choose a resolution source - used to determine the outcome (almost any source). It also determines the fees that those who settle the market should pay the market creator.
trade
Market creators also need to pay security deposits: validity period security deposit (paid in ETH, if the market is not effectively settled, it will be returned to the creator - based on the number of recent invalid results, used to incentivize creators to open explicit prediction markets) and Default bond (paid in REP - will only be returned to the creator if the designated reporter submits a report within three days - this will incentivize the creator to choose a reliable reporter so that the prediction market will close as soon as possible) .
trade
All prediction markets are maintained by an order book, and users can create/fill orders for any market at any time. This could be to trade with other users, or to create new collections of shares. Traders set a minimum price for their orders. If they can't trade all of them, at least part of them can be traded. For the part that has not been traded, an order will be regenerated and put out.
Report
All of the aforementioned assets — Augur prediction markets, outcome shares, participating currencies, margin shares — can be traded and transferred at any time.
Report
market settlement

Traders can exit by selling their shares to others or by settlement with the market.
-Figure 8 - Popular tag cloud on the Augur prediction market (source: https://public.tableau.com/profile/alethio#!/vizhome/DeFi_15529865481350/AugurPopularTags) -
When creating a prediction market, users can describe it in detail and add some tags to limit the market. The image above is a word cloud based on all the tags used in the Augur prediction market. (These tags are all extracted and decoded from the data segment of the topic generated by the Augur smart contract after the prediction market is created.)
first level title
User Overlap Analysis - Maker & Compound
Of all the protocols we mentioned above, the only two that share the market (see the "Lending" column in the lower right corner of the first picture) are Maker and Compound. These two agreements happen to be the two largest agreements so far (Maker is several times larger than Compound). Therefore, it is possible to analyze their user base.
Maker's users are those who create CDPs, while Compound's users are borrowers and lenders, because both are equally important to the platform. The difference is that Maker users lock ETH (create CDP) to borrow DAI, while Compound users can be either or both of the borrower and lender.
475 borrowers on Compound (2549 borrows)
230 users had 1 borrowing behavior
136 users have borrowed 1 to 5 times
54 users have borrowed 5 to 10 times
55 users have borrowed more than 10 times (7 of them have borrowed more than 50 times, up to 171 times)
3116 lenders (10956 lending actions) on Compound
1527 users had 1 loan
1133 users had 1 to 5 loans
338 users had 5 to 10 loans
199 users had more than 10 loan behaviors (4 users had more than 100 loan behaviors, up to 160 times)
7518 CDP creators on Maker (16848 total CDPs created)
6308 users have created 1 CDP
1091 users have created 1 to 5 CDPs
28 users created more than 10 CDPs (2 of them created more than 1000 CDPs - 1360 and 4893 respectively)

From the above, a total of 30353 behaviors (corresponding to the shape shown in the figure below, in order to avoid too clutter, some behaviors are not shown in the figure, only 11109 behaviors are shown in the figure at present - represented as a line in the figure) It can be seen in the figure that there are 9539 addresses that generate these behaviors (shown as dots one by one in the figure).
image description
-Figure 9 - Network Diagram of User Overlap Between Two Lending Platforms-
At first glance, we notice the difference in size between the two platforms, the sheer number of addresses between them (with a small number of addresses pointing to only one of the platforms), and the rings formed around the nodes representing Maker and Compound shape. Let's describe these groups of addresses to better understand the content of the above picture. First of all, the nodes of Maker and Compound can be imagined as having some kind of "gravity". Nodes that are closer to them will have more interactions.
The large group of addresses in the middle, that is, the addresses that interact with the two protocols, is about 775, and these addresses interact with each protocol in an equal or approximately equal amount (1- 2 interactions).
Each small group of addresses distributed on both sides is an address that interacts with two protocols, and the difference lies in which protocol they are more "gravity" and have more interactions with which protocol. In other words, the closer these groups of addresses are to which protocol, the more interactions with this protocol. For example, we see the small reddish-brown dots near Maker in the graph—these all represent users who created a large number of CDPs (10 or more) and only interacted with Compound once.