Zou Chuanwei: In-depth analysis of the five functional modules of DeFi from user needs
DeFi users want to better manage their crypto assets to increase risk-adjusted returns. What kind of “toolbox” should they have?
What functional modules should DeFi have? ” Key Perspectives for Understanding DeFi ” (No. 80, 2020) covers six basic financial functions including payment and settlement, gathering resources and equity segmentation, transferring resources across time and space, managing risks, providing information, and solving incentive problems. Sorted out.
This article continues to discuss this issue from the perspective of DeFi user needs. Consider a DeFi user who wants to better manage his crypto assets to increase risk-adjusted returns. What kind of “toolbox” should he have? This article proposes the following functional modules:
- Obtain stable income, including deposits and staking;
- Risk exposure switching, represented by DEX, especially AMM;
- Amplify risk exposure, including DeFi lending, DeFi leveraged long and short, and DeFi futures and forwards, but DeFi swaps are of little significance;
- Non-linear risk exposure, represented by DeFi options;
- Tokenization of risk exposure.
In addition, there are two basic functional modules: 1. Oracle; 2. Collateral adequacy monitoring and liquidation.
Obtain stable income-deposit coins and staking
DeFi users can obtain stable income by depositing coins and staking when their liquidity requirements and risk appetite are not high. Staking income comes from the block rewards obtained by participating in the consensus algorithm of the PoS public chain. The deposit income comes from the interest paid by the borrower, which needs to be understood in combination with DeFi lending.
” DeFi Basic Modules and Risk Analysis Framework ” (2020 Issue 31), “Staking Risks and Solutions” (2020 Issue 50) and ” DeFi Interest Theory ” (2020 Issue 74) discussed this Aspects of the problem.
Risk exposure switch-DEX
DeFi users can adjust their positions through DEX when they expect other encrypted assets to provide higher risk-adjusted returns than their current positions. AMM is currently the most concerned DEX scheme.
” Looking at the Development of Decentralized Exchanges from Uniswap ” (No. 69, 2020), “The Feasibility and Plan for Centralized Exchanges to Introduce Automatic Market Makers (AMM)” (No. 71, 2020), “Through Market Mechanism Solving the AMM Unsustainable Problem Caused by Impermanent Loss” (No. 77, 2020), and “ Sustainable Automated Market Maker (SAMM) Program ” (No. 86, 2020) discussed this aspect.
Enlarge risk exposure-DeFi lending, DeFi leveraged long and short, DeFi futures and forwards
When DeFi users expect a certain encrypted asset to provide higher risk-adjusted returns, but do not want to adjust their current positions, they can use DeFi lending and DeFi leverage to go long and short to amplify their risk exposure. For the convenience of discussion, the following assumes that the user holds a number of encrypted assets and wants to gain risk exposure to another kind of encrypted assets.
The core steps of DeFi lending are:
- At the initial moment (denoted as time 0, the same below), the user uses x amount of X as mortgage and lends y amount of Y.
- At a future time T, the user repays the y amount of Y (plus interest), and releases the x amount of X.
The above two steps seem simple, but form the basis of the next analysis, so it is necessary to explain in detail.
First, mortgage, release, loan, and repayment are all embodied as smart contract operations between the user’s address and the escrow address. The importance and application of this point will be discussed later.
Second, the “Key Perspectives for Understanding DeFi” (No. 80, 2020) has emphasized that the public chain is a trustless link, and the public chain address cannot be a true credit subject, and borrowing must rely on over collateralization. .
Suppose that when X is used as the collateral for borrowing Y, the haircut is h<100%. Assuming that at the initial moment, the market prices of X and Y (in fiat currency or Bitcoin as the unit, the same below) are p x (0) and p y (0), then there is
Not only that, at every moment before the DeFi loan expires, the DeFi lending platform must monitor whether the over-collateralization conditions are met:
Once the overcollateralization condition (2) is not met at a certain moment, the DeFi lending platform will initiate collateral liquidation, sell X as collateral, and buy Y to ensure the security of borrowing. Collateral liquidation can be auctioned, and arbitrageurs can be attracted to participate through price discounts; it can be centralized or decentralized.
Third, in DeFi lending, the user not only maintains the risk exposure to x amount of X, but also obtains the risk exposure to y amount of Y through borrowing, which reflects the goal of amplifying risk exposure.
DeFi leveraged to go long
There are many ways to achieve DeFi leverage. Here are two examples.
First, after step 1 of DeFi lending, the user purchases the amount of x of p y (0)*y/p x (0) with the y amount of Y lent . If (1) the equal number is established, the number of X owned by the user becomes
The above is the easiest way to go long with DeFi leverage. If it is understood as ETH, it will be understood as Dai, which is the mechanism to do more ETH through MakerDAO.
Second, consider the following operations:
- At the initial moment, the user uses x amount of X to amplify l>1 times the leverage, that is, borrows (l-1)*x amount of X, then buys y amount of Y, and uses these Y as leverage to borrow mortgage;
- At the future time T, after the user sells all or part of Y and repays (l-1)*x amount of X (plus interest), the remaining is his net income.
At the initial moment,
Suppose that when using as collateral for borrowing, the valuation discount (haircut) is h * <100%. At every time t <or = T before the expiration of the DeFi Leveraged Long, the DeFi Leveraged Long Platform must monitor whether the over-collateralization conditions are met:
Once the over-collateralization condition (5) is not met at a certain moment, the DeFi leveraged long platform will initiate collateral liquidation (the collateral liquidation mechanism is similar to the DeFi lending part, and the discussion will not be repeated. The same below.), sell as collateral Y, buy X to repay the (l-1)*x amount of X (including interest) borrowed by the user. If the collateral is liquidated and the loan principal and interest are repaid, there is still surplus, it will be returned to the user. It should be noted that the user may not be able to recover 100% of the principal investment (that is, x amount of X).
If there has been no collateral liquidation event, then at time T, the net income of the user’s long leverage is (assuming that the loan interest is not considered, the same below):
The economic meaning of (6) is very clear. There are three sources for the gains of DeFi leveraged long: 1. Invest principal; 2. Leverage multiple; 3. Long target excess return rate:
DeFi leveraged short
DeFi leveraged short selling can also be implemented in multiple ways, let’s take two examples.
First, after step 1 of DeFi lending, sell the loaned amount of Y, and buy the same amount of Y from the market at a lower price at time T to repay the loan principal and interest and release the mortgage. Assuming that the loan interest is not considered and (1) the medium number is established, the net income of the user from short selling is:
(7) Explain that there are two sources of income from short-sales: 1. Invest in the principal h*p x (0)*x; 2. The price of the short-sale subject falls by 1-p y (T)/p y (0 ).
Second, the second example of the DeFi leveraged long part. While the leverage is long Y, it is actually the leverage short X, so I won’t repeat it.
DeFi futures and forwards
The above examples of amplifying risk exposure require both buying and selling of cash. In mainstream financial markets, the more convenient way to obtain risk exposure through leverage is futures and forwards. Both futures and forwards promise that users will buy or sell an agreed amount of assets at an agreed price at an agreed time in the future. Futures are standardized derivatives that are traded on the exchange, and forwards are OTC derivatives that can be individually designed. In futures trading, users need to provide margin to the exchange; in forward trading, both parties need to provide collateral as a means of mitigating counterparty credit risk. The futures margin and forward collateral must be adjusted according to the fluctuation of the capital price. The leverage of futures and forwards is reflected in the ratio of nominal principal to margin or collateral. Because the amount of margin or collateral is roughly equal to the nominal principal multiplied by the volatility of asset prices, the leverage of futures and forwards can be very high. In other words, in the mainstream financial market, users can use smaller funds to leverage higher risk exposure.
In contrast, the leverage effect of DeFi futures and forwards is not prominent. Let’s look at the long-term example first. Suppose one party to the transaction (may be called the “underwriter”) promises the other party (may be called the “user”) to buy x amounts of X for y amounts of Y at a time in the future. In order to ensure the future performance of both parties to the transaction, the underwriter needs to transfer x amount of X to the escrow address in advance, and the user also needs to transfer y amount of Y to the escrow address in advance. Therefore, the underwriters and users are equivalent to providing full collateral and will not be affected by the fluctuations in X and Y prices, but the leverage effect of users is much weaker.
The example of DeFi futures is similar, the user is equivalent to providing full margin, and the leverage effect is also weak. If DeFi futures want to support secondary market transactions, it involves the tokenization of risk exposure. The following will focus on this issue.
Non-linear risk exposure-DeFi options
In the above discussion of DeFi lending, DeFi leveraged long and short, and DeFi futures and forwards, the risk exposure amplified by leverage is linear, which can be seen from the relevant formula.
DeFi options can achieve non-linear risk exposure. In the DeFi call option, the underwriter promises the user that the user can buy the x amount of X with the y amount of Y in the future T, but if the price is not ideal, the user may not exercise this right. Obviously, the condition for the user to exercise the right at time T is p x (T)*x>p y (T)*y. The net income of the user at any moment is:
(8) Shows the meaning of non-linear risk exposure. What needs to be noticed is that (8) can be regarded as both a call option and a put option, so there is no need to specifically discuss DeFi put options.
The leverage ratio of an option is embodied in the currency of the nominal principal and the option premium, and the option premium depends on the pricing of the option. For DeFi options, mainstream pricing methods can also be used. “DeFi Oracles and Arbitrage Mechanisms” (No. 76, 2020) discusses the option pricing issues involved in the decentralized oracle NEST.
But like DeFi futures and forwards, in order to ensure the future performance of the DeFi option transaction parties, the underwriter needs to transfer the amount to the escrow address in advance, and the user also needs to transfer the amount to the escrow address in advance. For users, the leverage effect of DeFi options is also weak.
In mainstream financial markets, standardized options can be traded on the floor. If DeFi options are to support secondary market transactions, it also involves the tokenization of risk exposure.
So far, this article has discussed derivatives such as DeFi futures, forwards, and options. Among these DeFi derivatives, because the addresses in the public chain cannot be a true credit subject, the credit risk of counterparties can only be mitigated by means of full collateral or margin. This makes the leverage effect of derivatives weaker than that of mainstream financial markets.
Finally, it should be noted that in the mainstream financial market, swaps or swaps are also a broad category of derivatives, especially interest rate swaps. In the DeFi ecosystem, it is of little significance to discuss swaps, and swaps can be regarded as a combination of a series of forwards, and the analysis is not complicated.
Tokenization of risk exposure
Tokenization of risk exposure has many important implications for DeFi. First, the above discussion of DeFi lending, DeFi leveraged long and short, DeFi futures and forwards, and DeFi options are conducted under the peer-to-peer trading mechanism. However, in practice, in order to achieve economies of scale and increase the intensive use of liquidity, it is better to group transactions with the same terms together. In this way, a “symbol” is needed to represent the share that belongs to each user.
Second, for various reasons (such as liquidity requirements), users may need to transfer their risk exposure before the expiration of DeFi loans, leveraged positions, futures, forwards, and options. This involves the “packaged” transfer of related collateral and future payment obligations, which requires the tokenization of risk exposure first. In view of the prevalence of over-collateralization conditions, the tokenization of risk exposure can help improve the efficiency of collateral use.
Third, after the tokenization of risk exposure, even trading on DEX will help provide liquidity for the DeFi ecosystem, promote price discovery and market transparency. This will be very helpful to the development of DeFi ecosystem.
Tokenization of risk exposure is based on the application of smart contracts and escrow addresses, which also reflects a key difference between DeFi and mainstream financial markets. In a nutshell, the key to tokenization of risk exposure is to “encapsulate” the relevant terms of risk exposure into a “fungible” Token, so that Token transfer does not involve the internal structure of the Token. Next, use the previous example to illustrate.
After step 1, the user obtains a quantity, some as collateral in the escrow address, and obtains the following DeFi loan Token:
If the amount is transferred from the Token address to the escrow address at any time Transfer the amount from the escrow address to the token address End Destroy Token
DeFi leveraged long and short is similar to DeFi lending in the tokenization of risk exposure, so I will not repeat it.
DeFi futures and forwards
After the user provides a quantity as collateral, he will get the following DeFi futures/forward tokens:
The amount transferred from the escrow address to the underwriter address at any time Transfer the amount from the escrow address to the user address at any time Destroy Token
After providing a quantity as collateral, the user will obtain the following DeFi option token:
At the moment of If, the rights represented by Token are executed Transfer the amount from the escrow address to the underwriter’s address Transfer the amount from the escrow address to the user address Else Transfer the amount from the escrow address to the underwriter’s address Transfer the amount from the escrow address to the user address End Destroy Token
It can be seen from the above several examples: First, Token can be transferred between different users, and after the transfer, only the “Token address” needs to be adjusted accordingly, and the escrow address can be regarded as a global variable; second, risk Tokenization of exposure is essentially to “encapsulate” future payment requirements; third, in addition to the use of smart contracts, the management of escrow addresses in Tokenization of risk exposure may also require the use of multi-signature technology.
The logic of tokenization of risk exposures can also be found in reality. For example, after buying a house by mortgage, the property right of the house is in a state of mortgage, and the purchaser obtains it is actually a Token:
If Token holders pay off the loan principal and interest as agreed House property mortgage registration cancellation Token holders obtain complete housing property rights Else Bank acquires property rights End
The change of the real estate certificate and the adjustment of the mortgage accompanying the house transaction are essentially part of the Token transaction.
Posted by:CoinYuppie，Reprinted with attribution to:https://coinyuppie.com/zou-chuanwei-in-depth-analysis-of-the-five-functional-modules-of-defi-from-user-needs/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.