Crafting Finance - Dynamic Mining Hedging
Crafting Finance - Dynamic Mining Hedging
However, the AMM mechanism itself has an unavoidable flaw known as impermanent
loss. Specifically, when users provide liquidity, they passively buy or sell one of the assets
based on the current price fluctuations, resulting in a change in the quantity of assets held
by the user. The difference between the value of these liquidity positions and the initial
value of holding those assets is referred to as impermanent loss (IL). This portion of profit
is captured by arbitrageurs between exchanges.
The impermanent loss curve is associated with the range of liquidity provided, where
a smaller range results in a greater impermanent loss.
Risks and Solutions in User Liquidity Mining
To achieve asset appreciation, users often deposit their assets into a liquidity pool to
provide liquidity and earn trading fees. Taking the ETH/USDC pool as an example,
assuming the current price of ETH is 1900 USD, a user provides liquidity of 3800 USDC.
The standard procedure is to exchange 1900 USDC for 1 ETH and then deposit 1 ETH
and 1900 USDC into the liquidity pool. However, at this point, the user faces the risk of
losses due to a decrease in the price of ETH. To hedge against such losses, it is
necessary for the user to open a short position for 1 ETH on a CEX.
However, based on the mechanism of AMM itself, users providing liquidity passively
act as counterparties to other users in the market. In other words, providing liquidity
always entails taking positions opposite to the market, often favoring the holding of more
vulnerable assets. When the price of ETH drops, the liquidity pool automatically buys
more ETH, but the user's short position is only for 1 ETH. The difference between these
amounts represents the risk faced by users in liquidity mining. This loss is essentially the
impermanent loss of the V3 curve.
Currently, there are two main solutions:
The first solution involves providing liquidity within a narrow price range, as
impermanent loss is reduced when the price is close to the current level. Users can
continuously adjust the price range based on price changes to minimize impermanent loss.
The drawback of this approach is that it requires users to constantly monitor the market
and possess a certain level of financial and computer knowledge to develop and adjust
the range promptly.
The second solution involves adjusting the quantity of short positions based on price
fluctuations. The disadvantage of this approach is the erosion of fees, and if the price
returns to its original level, substantial losses can occur during the process.
• Example
Crafting will provide the corresponding short token. Taking the ETH/USDC pool as an
example, let's assume the current price of ETH is 1900U, and the user provides liquidity
with 1 ETH and 1900 USDC.
When the user stakes their LP in Crafting, it will generate 1sETH, which represents
short ETH. The price of sETH is set to the price of ETH at the time of generation and
linearly inversely correlates with the price of ETH. So, 1 ETH = 1sETH = 1900U.
When the price of ETH drops to 1850, the price of sETH increases by 50U to 1950U.
In terms of quantity, sETH always remains equal to the total quantity of ETH. The specific
numerical value of the quantity can be calculated using factors such as the liquidity pool
coefficient and price range.
Here's an illustration:
Current price: 1 ETH = 1900 USDC
1 ETH = 1sETH = 1900U
Total value of assets in the AMM pool: 3800U
Total value of assets in the debt pool: 3800U
When the debt pool is infinitely large, the increase in asset value within the debt pool
will be fully transformed into user profits. In this scenario, the earnings obtained by users
through Crafting will consist of impermanent loss and the profits from shorting 1 ETH. In
other words, users will be able to earn transaction fees from the liquidity pool without
having to worry about losses caused by asset price fluctuations while providing liquidity.
• Implementation Method
Crafting's current mechanism is to mint the synthetic asset when a user opens a
position and calculate their profits or losses when they close the synthetic asset and burn
it. We don't concern ourselves with the price changes in between. Therefore, in the CALH
module, users can select their AMM liquidity when opening a position, which CALH labels
as DSA (Dynamic Synthetic Assets). When a user closes their synthetic asset or when
other users open or close synthetic assets, the CALH module updates the latest prices
and quantities for each DSA and helps the Sharing Debt Pool calculate the updated ledger.
This way, we have seamlessly and efficiently integrated CALH and DSA into the Sharing
Debt Pool.
• Analysis