In this round of DEFI wave, constant product market makers, for example Uniswap, have achieved an explosive increase. Market data shows that trading volume reached 15.4 billion U.S. dollars for Uniswap in September, surpassing the cryptocurrency exchange Coinbase for the first time. Uniswap as Dapp with only 500 lines code easily surpasses DEX, which can be called a great innovation in the blockchain world. However, its impermanence loss has been criticized. The author found that this kind of automatic market maker always performs the opposite operation of the market, which is also the reason for impermanence loss. However, there is no effective tool to hedge the impermanence loss up to now. Let's take the ETH-USDT fund pool as an example to explain the working principle of uniswap, here, x is the number of ETH, and y is the number of USDT. Uniswap satisfies:
xy=k
y=k/x
Its price P is the slope of the hyperbola=|⊿y/⊿x|=|dy/dx|=|y'|=k/x^2
In order to hedge against the impermanent losses, the author designed a contract system:
USDT Value of 1 Contract is (P)^0.5,wherein P is the price of ETH. When the price of ETH to USDT is P0, a liquid mining user deposits x0 ETH and y0 USDT into the Uniswap fund pool ETH-USDT, and shorts 2y0/(P0)^0.5 contracts in the contract trading system at the same time, in other words, there is short order of 2y0 USDT. When the price of ETH/USDT fluctuates to Pn:
Meet the following conditions in Uniswap:
x0=(k/P0)^0.5
xn=(k/Pn)^0.5
y0=(kP0)^0.5
yn=(kPn)^0.5
yn=y0*(Pn/P0)^0.5
The changes in the amount of USDT of this liquid mining user in Uniswap is 2yn-2y0=2y0*(Pn/P0)^0.5-2y0
The changes in the amount of USDT of this liquid mining user in this contract trading system is 2y0-2y0/(P0)^0.5*(Pn)^0.5
Then the net profit and loss of the liquid mining user for USDT is 2y0*(Pn/P0)^0.5-2y0+2y0-2y0/(P0)^0.5*(Pn)^0.5=0
It can be seen from the above, the impermanent loss of liquid mining users in Uniswap is zero by using the contract system designed by the author for hedging, and it is equivalent to hold a single asset for liquidity mining. In order to further verify the feasibility of the above system, the author selected the ETH/USDT data from February 15, 2020 to March 13, 2020 for back testing. A liquid mining user (market maker) made funds to Uniswap ETH-USDT on February 15, 2020. The equivalent of 1000 USDT is deposited in the pool. The figure below shows the change in the amount of USDT Vs Price in Uniswap and the contract trading system of the mining user. The price of ETH has dropped from 290 USDT to 85 USDT. If the liquidity market maker is only in Uniswap while making market, the USDT loss was as high as 43% during the period. But If he chooses to hedge in the contract trading system at the same time, the total USDT remained unchanged at $1,000, which indicates that the contract trading system can completely hedge the risk of impermanent loss of the automatic market making mechanism. It truly realizes the possibility of automatic market maker hedging and a single asset mining. In order to protect the intellectual property and prevent from copying by others, such as sushi completely copying uniswap, the author has recently submitted the technical solution to the State Intellectual Property Office for patent right protection. If anyone wants to launch this product and seize the commanding height of DEFI's 100 billion U.S. dollars per year, please contact me privately for technical details.