Multicoin Capital: A comprehensive understanding of the dependencies of the DeFi ecosystem

20-11-26 11:44
Read this article in 47 Minutes
总结 AI summary
View the summary 收起
Original title: "Multicoin Capital's latest research: 3 major risks in the DeFi market and 8 solutions|Chain Catcher"
Original source: Chain Catcher


The development of DeFi benefits from the catalysis of liquidity mining. Simply provide liquidity to AMMs (Bancor, Curve, Uniswap), lend assets on lending market protocols (Compound, Aave, Cream), or deposit tokens through yield-optimized protocols (Yearn Finance, Harvest Finance, etc.) Attractive profits can be obtained.

 

This is to some extent The above is determined by the composability between protocols. Jesse Walden, founder of Variant Fund, defines composability as: "If the existing resources of a platform can be used as components and programmed into higher-level applications, then this platform is composable. The reason for composability Important because it allows developers to do more with less, which in turn leads to faster, more complex innovation.”

 

In fact, today’s DeFi users can use ETH as collateral, and then create DAI, through Tornado.Cash is in circulation, USDC is exchanged on Curve, and election contracts are bet on Polymarket. This is a very amazing scene. The network effect of the DeFi ecosystem is very strong, but this kind of compound innovation is not without risk.

 

Specific to DeFi That said, risk also increases with the compounding of innovations. In this article, we will explore the dependencies of the entire DeFi ecosystem and how several key layers support the entire ecosystem. If something goes wrong at any one of these layers, DeFi as a whole will come crashing down.

 

trying to figure it out The only effective way for investors to take risks through "yield farming" is to understand the dependencies hidden in the DeFi stack and derive potential risks from them. And to do this, it is necessary to understand the layers in the DeFi stack.




To better understand these risks and dependencies, we divide the DeFi stack into six distinct layers:

p>


01. Unpacking the DeFi stack


Layer 1: Atomic Unit of Value


Layer 1 in the DeFi stack is Start with an atomic unit of value.

 

DAI、ETH、 Lending market tokens (cTokens and aTokens), centrally custodial ERC-20 tokens, pegged assets and stablecoins (USDT, USDC, WBTC), and LP shares of AMM pools, which are mainly used as collateral for derivatives, loans and leverage It is used in the DeFi protocol and represents the beginning and end of a complete transaction life cycle.

 

The risks of DAI and Tether are different. The main risk of DAI is that the Maker system crashes and DAI loses its pegged assets. The main risk for Tether is that something bad happens to the bank accounts that hold the U.S. dollars backing USDT. All centrally custodial assets like WBTC and USDT are subject to binary risk, as their value could plummet if BTC is hacked, or if the market discovers that Tether’s dollars don’t actually exist in bank accounts.


Both sides introduce key risks at the bottom of the inverted pyramid of the DeFi stack. Whether it's a bug or a smart contract failure, if any one atomic unit of value is shaken, any system utilizing them will be affected, no matter how good the code is.

 


Source: Coin Metrics

 

Layer 2: Transaction Layer


< p align="justify" line="Uo91" linespacing="200">

Just being able to mint atomic value units is not enough. DeFi users, whether humans or bots, must be able to transact on-chain, and this ability is the second layer of the DeFi stack.


As DeFi protocols gain popularity, they become part of an increasingly complex DeFi system. DeFi protocols rely on external transactions to run smoothly, including tracking and storing collateral balances, measuring collateral funding ratios, processing oracle prices, performing liquidations, distributing rewards to contributors, issuing deposits, and more. These businesses consume a lot of gas fees, so sufficient Layer 1 or Layer 2 capabilities are required. Therefore, we have identified "transaction processing capabilities" as the core element of the DeFi stack.


While this may seem like an inevitable outcome, it is not. The high gas fee of Ethereum illustrates the cost of transactions. Assuming that users and robots cannot trade on the chain, liquidation, margin call operations, etc. cannot be processed, resulting in systemic bankruptcy risks in the entire DeFi ecosystem.


Trading capabilities have been enhanced in many ways. Projects like Solana are innovating at Layer 1, optimizing throughput, latency, and gas costs to achieve better performance than the status quo (50,000 TPS, sub-second latency, and close to $0 transaction fees). Projects like SKALE, StarkWare, and Optimism are building layer 2 solutions to scale on Ethereum.


Layer 3: Price oracles


Based on the transaction layer, oracle quotes are the foundation of the next infrastructure. The entry of secure and verifiable market data is critical to the functioning of DeFi protocols. The siled design of smart contracts based on off-chain data means that centralized oracles can introduce a single point of failure for the entire system.


The oracle can trigger high-level functional modules, such as liquidation. Coinbase, MakerDAO Neutralizer, Chainlink, Band, Tellor, UMA, API3, Compound Open Oracle, and Nest are nine of the most popular oracles right now.


Loans on Aave or synthetic assets on Synthetix could be inadvertently liquidated if Chainlink’s price quotes are invalidated or misreported, DEXs on Bancor intermediate Prices could go off track, and a range of DeFi systems could go from solvent to insolvent in seconds.


1, 2 , 3 layers constitute the core infrastructure of DeFi. On top of this, DeFi entrepreneurs are building more complex and interoperable financial infrastructure.


Layer 4: DeFi underlying products


< /p>

When most people think of "revenue When you think of DeFi applications such as "farming" or pure use, you will think of the underlying DeFi products. DeFi underlying products include:


1) Loan agreement: Compound, Aave, Cream, bZx, Yield, Notional, Mainframe


< p align="justify" line="E2sX" linespacing="200"> 2) AMM trading platforms: Curve, Uniswap, Balancer, Bancor, mStable, BlackHoleSwap, DODO, Serum Swap


3) Order book trading platform: 0x, IDEX, Loopring, DeversiFi , Serum


4 ) Derivatives trading platforms: MCDEX, Perpetua l Protocol, DerivaDEX, Potion, Opyn, Synthetix, dYdX, Pods, Primitive, BarnBridge

< br>

5) Asset management platforms: Set, Melon, dHEDGE


These underlying products are considered a network, not a stack, because these products do not Must be stacked on top of each other in a specific order. Each product can be used independently or in conjunction with other products, whether it is at this layer of the DeFi stack or a lower layer. A few examples:


1) cToken (layer 1) is used as collateral in Curve (layer 4).


2) User It is possible to borrow from Aave and then deposit that asset into Uniswap. Or users can deposit assets into Uniswap and then use Uniswap LP shares as collateral for Aave.


Below is DeFi Some examples of how bottom layer products can leverage tier 1-3 development: 


1) DAI supports all open rights and interests on Augur, and is the mortgage token of many stable currency pools on Curve.


2) Aave Rely on Chainlink's oracles to accurately issue and liquidate crypto-backed loans.


3) Borrowing Protocols and non-custodial derivatives protocols (Compound, Aave, etc.) require Keepers to be able to send transactions to liquidate positions. When the Ethereum network is congested, positions with low collateral ratios will be liquidated quickly, as evidenced by MakerDAO in the 312 crash.


Layer 5: Aggregator


Aggregators are active on top of DeFi underlying products. This layer consists of supply-side and demand-side aggregators, including:


1) Supply side aggregators: Yearn Finance, RAY, Idle Finance, APY.Finance, Harvest Finance, Rari Capital


2) Demand side aggregators: 1inch, DEX.ag, Matcha, Paraswap< /p>


3) Aggregator Aggregator for: yAxis


4) New aggregators: Swivel Finance, Benchmark 


Layer 5 protocol aggregators do not host collateralized assets, these products usually provide smart contract construction, enabling users to interact with other Ethereum DeFi protocols. Aggregators have exploded in popularity because they are good at one thing: making money.


However, investing The reader must take into account the risks of this protocol stack. If any one of the underlying product protocols fails, users may lose some or all of their funds, as many aggregators such as YFI utilize multiple risk.


from positive On the one hand, demand-side DEX aggregators are the safest from this risk because they don't hold funds, but just execute atomic transactions within blocks.


Layer 6: Wallet and Frontend 


Wallets and frontends are on top of all DeFi, the following are Some examples:


1) Repeaters: Tokenlon, Dharma, PoolTogether, Guesser


2) Wallets: MetaMask, Math, imToken, Bitpie, Exodus, Trust Wallet


3) DeFi local front-end: DeFi Saver, Zerion, Zapper, Argent, Instadapp 


The role of wallets, relayers and front-ends is to improve the development of DeFi User experience, they don't compete on financial or technical constructs, but on design, customer support, ease of use, localization, etc. Their main business is acquiring users.


We will Projects are broken down by function, e.g. relayers provide a frontend to a specific protocol (e.g. Guesser is a frontend to Augur, Tokenlon is a 0x-based decentralized exchange). Frontends like Instadapp and Zapper simplify the process of writing smart contract calls across different DeFi underlying products.


02. DeFi risk management


Today’s DeFi market is becoming more and more risky. Arjun Balaji, a partner at Paradigm, described this phenomenon brilliantly in a tweet: “DeFi risks multiply, including contract errors, poor protocol parameterization, on-chain congestion, oracle errors, admin bots/ LP failed, and the composability and leverage of the contract further magnified the risk.”


Curve's sUSD pool is the most popular "yield farming" opportunity in recent times In one, users deposit one or more stablecoins into a pool and stake their LP tokens to Synthetix's Mintr platform to earn SNX rewards.




Each stablecoin in the Curve pool has specific risk characteristics (DAI’s peg consists of Maker’s governance, oracles and liquidators, The value of USDT depends on the collective trust in Tether reserves). The construction of the stable currency pool reduces the impact of any stable currency value collapse on the currency holders, and also supports the pegged value of each stable currency.


< p align="justify" line="R7lu" linespacing="200"> However, the collapse of any one stablecoin will still adversely affect other stablecoins in the pool, which will adversely affect all protocols that rely on this pool (e.g. the instability of Synthetix's debt pool). This is the double-edged sword of Ethereum's composability, whose ease of integration facilitates groundbreaking innovations, but the risk is multiplied in lock-in.

 

Let’s take a look at some huge potential risks in the DeFi market. There is currently $11.4 billion in value locked in top DeFi protocols (Uniswap, Compound, Aave, Balancer, Curve, MakerDAO, etc.). Of this $11.4 billion, DAI accounts for 9% of the locked value ($1 billion), USDC 24% ($2.8 billion), renBTC 3% ($308 million), and WBTC 17% ($2 billion). If any stablecoin prices deviated from their pegged value, there would likely be a cascade of liquidations, Waves of bankruptcies and price volatility.

 

Source: Dune Analytics

 

Chainlink provides key functionality to three of the top five synthetic asset platforms ranked by locked asset value. Of this, Synthetix has $126 million in its debt pool, which is based on the price of SNX and all synthetic assets generated (fully secured by Chainlink).

 

Synthetix in 2020 Suffered an oracle attack on June 25th, in which the sKRW (synthetic Korean won) price feed returned incorrect values, creating an opportunity for arbitrage bots to withdraw ~37 million sETH from the system at a low price (although the final attack returned the funds following negotiations).

 

oracle price Information can also be directly manipulated by users for personal gain. On February 18 this year, an attacker used flash loans to inflate Uniswap's sUSD price to about $2, providing bZx with sUSD collateral at this inflated valuation in order to borrow about 2,400 ETH and effectively exit bZx positions without loss of collateral - all in one transaction. Since then, oracle attacks have increased, including recent attacks on projects such as Harvest and Value DeFi.

 

only in Synthetix, Between Aave and Nexus Mutual, Chainlink alone secures approximately $2.2 billion in value, which, as discussed, is vulnerable to price manipulation attacks.

 

Last major The risk factor is congestion on the Ethereum chain. As we have seen recently with the launch of UNI, Ethereum is still not ready for transaction activity on a global scale. Several decentralized exchange projects had to delay their mainnet launch due to increased gas costs. Not only is the cost of opening a position high for users, but the cost of executing key transactions such as depositing collateral and liquidating positions can also be prohibitively high.

 

03. DeFi risk mitigation ideas

 

Layers 1-3 of the DeFi stack affect almost all DeFi projects, So when thinking about risk mitigation, they are the most important.

 

Mortgage Tokens


Most protocols in the DeFi ecosystem use the same assets as collateral. These tokens include DAI and centrally managed assets (USDC, USDT, WBTC, etc.). They also include interest-bearing lending market tokens such as aTokens and cTokens. DeFi developers can guard against collateral risk in the following ways.

 

1) Limit mortgage product type (for example, dYdX only allows USDC to perpetual swap positions, while Maker allows multiple types). The tradeoff is that allowing more types of volatile collateral creates systemic risk for all collateral in the same pool.


2) Only accept transparent and audited stablecoins as collateral (such as USDC and PAX).


3) Phased introduction of Collateral type.


4) Limit collateral concentration and incentivize liquidity providers to add underrepresented collateral (e.g. Curve incentivizes LPs to now increase DAI in the pool because DAI has low liquidity in the pool).


5) Teams building 3-tier bottom-level products can purchase collateral insurance for their users. This would essentially bring insurance to the lower layers of the stack, e.g. dYdX could use USDC to buy credit default swaps for its traders equal to the risk exposure of its positions. Stablecoin issuers, insurance companies, or decentralized insurance providers (Opyn, Nexus) could potentially be underwriters for swap products.


Oracle


Oracles are a major failure and attack vector for almost all DeFi protocols. As mentioned above, 30% of the top ten protocols on DeFi Pulse rely on Chainlink, while the other 20% utilize the LINK token in some way. If Chainlink somehow fails, a large part of the DeFi ecosystem will collapse.

 

In order to reduce the oracle Risk, project teams can obtain prices and other off-chain data from several oracle providers (Chainlink, MakerDAO medianizer, Band, Coinbase), and then use the median.

 

If one of the prophecies If the machine quote deviates by X% from other projects, it can be ignored (for centralized oracles, FTX ignores prices with a median price of more than 30 basis points), which will likely prevent an oracle from being attacked. Additionally, protocols can use TWAPs or VWAPs to mitigate flash loan attacks.

 

Additionally, teams can Choose to limit how much the oracle price can change over a certain period of time. This can add security in case the oracle price is leaked and manipulated. But if the price does move significantly and the oracle quotes do not, this could lead to severe market distortions that could seriously threaten the solvency of the system.


Trading ability

 

On March 12, the MakerDAO system was liquidated due to congestion on the chain, failure of some assets on the chain to repay in time, and insufficient collateral. Keepers are network participants in Maker who can bid for zero yuan for liquidation. Due to the rising cost of gas fees, they cannot conduct transactions. The reason is that the default configuration of the software used by Keepers cannot automatically adjust the gas fee according to network congestion.

 

With the rise of decentralized derivatives protocols on Ethereum (such as dYdX, Perpetual Protocol, DerivaDEX, MCDEX), trading capabilities will become more and more important. Just imagine, if Binance cannot liquidate the loss-making traders, the insurance fund will have to pay huge losses and go bankrupt, which will directly lead to a large-scale automatic deleveraging of the entire exchange.



Source: LoanScan

 

We have identified some solutions to reduce this risk of not being able to trade, such as migrating to Layer 2 or other scalable solutions (scaling, side chain , other Layer 1, etc.).

 

1) More optimistic The extension scheme of EVM is backward compatible. They inherit the security of Layer 1, which can have higher throughput, low latency and lower gas fee, but it takes a long time to realize.

 

2) Skale and Sidechains like Matic can be quickly and backwards compatible with EVM, featuring high throughput, low latency, and low gas fees, and provide fast deposit/withdrawal functions, which are highly configurable for developers, but they It does not inherit the security of Ethereum Layer 1.

 

3) Solana, Near, Algorand, Dfinity, Nervos, etc. are running Layer 1 projects that are alternative public chains to Ethereum. They usually have higher scalability and lower cost, but want to have high collateral like Ethereum The product also needs a more mature foundation and components.

 

Create a complex collective liquidation robot program to keep funds at hand

 

1) KeeperDAO is a public liquidity pool that allows Token holders contribute and receive rewards through on-chain liquidation. KeeperDAO works across the entire DeFi ecosystem and runs highly sophisticated and optimized software.

 

2) Build the bottom layer Individual teams of products can create their own mini versions of KeeperDAO, for example Mainframe is pooling liquidator collateral for its fixed-rate zero-coupon bond lending system, so the protocol doesn't have to rely on individuals to execute liquidations.

 

3)  On this basis, the team should make sure they use a robot that can be liquidated quickly, so that they can avoid the crisis that MakerDao encountered at 312.

 

Mining pools can prioritize specific transactions into blocks

 

1. We have been thinking about mining pools issuing their own tokens Possibly (let's call it MPT here for simplicity). The working principle of MPT can be as follows, when an address with at least 10000 MPT broadcasts a transaction, the mining software of mining pool X notices this transaction and marks it as a priority transaction (PT). In the next block mined by pool X, PT will be listed as the first transaction.

 

2. DeFi team Blockchains themselves can have a large number of MPTs to ensure that their key operational calls (such as oracle price updates, liquidations, margin releases) are prioritized and included in blocks.

 

3. Spark Mine Pool recently announced that they are testing a network called Taichi. According to Gasnow, Taichi “pushes directly received transactions into the mining pool’s mempool,” bypassing traditional mempools. This concept helped ethereum researcher samczsun save Lien Finance users $9.6 million a few weeks ago.

 

Mine Mining Value (MEV)

 

The term miner extractable value was first coined by Phil Daian in his seminal Presented in his research paper "Lightning Boy 2.0". The basic idea is that since miners have the ability to review transactions block-by-block in a block, they can choose to replace arbitrage or liquidation transactions with their own transactions (but with zero or lower transaction fees).

 

Although, this The practice is generally considered "evil" and has a negative impact on the stability of the chain, but in fact it may eventually become an effective tool for DeFi risk management. In this case, liquidators and custodians will have zero profit margins. But if miners systematically MEV against liquidations and arbitrage, they will prevent system-wide bankruptcy and price differentials, because liquidations and arbitrage transactions will always happen.

 

Derivatives Position Offsetting and Cross Margin

 

If liquidity providers can cross derivatives platforms or cross margin collateral, And get net long and short positions on competing protocols where they can provide more liquidity per $1 of collateral.


For example: If an Ethereum address has 1x long BTC-USD perpetual contracts on dYdX and 1x short BTC-USD on MCDEX Protocol, these positions could theoretically be netted so that traders only need a small amount of collateral, which is necessary, which would have the added benefit of greatly reducing liquidation volumes. However, given the lack of technical and governance maturity of these systems, this is unlikely to happen in the short term.


Gas tokens such as CHI and GST-2


Gas tokens are an untapped avenue to "scale". Currently, CHI and GST-2, the two major gas tokens, have a total market capitalization below $200. What are gas tokens? Gas tokens can store gas for later use in free transactions, or as a prepayment for future use of gas.


When the gas fee price is low, smart traders will mint it as tokens, and then when the gas fee price for Ali goes up, trade Those who do so will exchange gas tokens, thus saving transaction fees. We expect DeFi teams to start accumulating gas tokens and use them in their protocols when they need to use built-in liquidation bots during periods of high market volatility.

 

04. Summary


Nowadays, various DeFi protocols are increasingly interconnected, and with it comes more and more complex systemic risks. There are many different DeFi protocols out there, however most of them have the following things in common.


First, Contains a mortgage pool that can be traded or borrowed; second, in order to avoid systemic bankruptcy of borrowing/loaning and derivatives agreements, the oracle feeds the price to the contract; third, in the event of insolvency, the third-party Keeper can initiate liquidation , to make a profit from.


So here In this article, we aim to provide a simple framework to think about how to manage the three major risks in DeFi, namely, collateral risk, oracle risk, and liquidation risk.


Currently there are 130 billions of dollars of funds locked in the DeFi market, many of which rely on some underlying products. While some of this value is protected by smart contract insurance providers like Nexus Mutual and Opyn, today there is little protection against economic and congestion failures.


With DeFi With the maturity of the market and the introduction of more complex underlying products, the project team will need to think more rigorously about how to prevent systemic risk factors.


such as Genesis and Institutional players like BlockFi, along with newer banks like Betterment and Wealthfront, will eventually want to use the permissionless DeFi rails.


When they do this, the first thing DeFi teams need to face One question is how they choose to protect themselves from black swan events like a single oracle failure or blockchain congestion, after all having answers to these questions ahead of time could be the difference between winning business and losing it in the DeFi industry .


Original link


欢迎加入律动 BlockBeats 官方社群:

Telegram 订阅群:https://t.me/theblockbeats

Telegram 交流群:https://t.me/BlockBeats_App

Twitter 官方账号:https://twitter.com/BlockBeatsAsia

举报 Correction/Report
PleaseLogin Farcaster Submit a comment afterwards
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit