0% found this document useful (0 votes)
39 views5 pages

Crafting Finance - Dynamic Mining Hedging

Uploaded by

bonobomonkey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views5 pages

Crafting Finance - Dynamic Mining Hedging

Uploaded by

bonobomonkey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

The Dynamic Mining Hedging

Impermanent Loss in DEX


In the past 24 hours, the trading volume of DEX has reached 1.8 billion USD. Currently,
most DEX platforms employ AMM model to match trades, with Uniswap V3's virtual
liquidity formula being one of the commonly used approaches. The formula for Uniswap
V3 is as follows:

This formula facilitates centralized liquidity provision by utilizing virtual liquidity,


enabling users to provide liquidity for their assets within a specified range. This approach
aims to increase capital utilization and user earnings, as depicted in the following diagram.

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.

Synthetic Asset Solution


Crafting Finance is a platform for issuing and trading synthetic assets. As long as a
token A has a corresponding price and stable Oracle service, Crafting can issue synthetic
assets for token A on its platform. Furthermore, derivatives for the token can also be
created, such as leveraged short token "shortA" and leveraged long token "longA".
Building upon this foundation, we can provide a product called CALH (Crafting AMM
Liquidity Hedge).

• Crafting's Short Token Hedging Solution


So, shortA can serve as a hedging token for token A. When the price of A decreases,
the price of shortA increases, and when the price of A increases, the price of shortA
decreases. This allows shortA to hedge the user's losses caused by price fluctuations in
token A.
However, when users provide liquidity for token A in the AMM pool, the risk they face
is not only from the price fluctuations of token A but also from the changes in the quantity
of A tokens they hold, known as impermanent loss (IL). When the price of token A
decreases, the AMM mechanism causes the quantity of A tokens held by the user to
increase rapidly. At the same time, the quantity of shortA tokens held by the user remains
unchanged, preventing a complete hedge. In Crafting, we will introduce a "Quantity
Dynamic Adjustment" mechanism that allows users to dynamically adjust the quantity of
shortA tokens they hold during a price decline of token A, as long as they have sufficient
collateral in the Sharing Debt Pool. We will also dynamically calculate the losses and
gains of the individual user and the entire Sharing Debt Pool at any given moment.
This dynamic adjustment of the quantity of shortA tokens can fully align with the curve
of the AMM. For example, Crafting can replicate the AMM curve of Uniswap V3 or Trader
Joe. We can even directly read the specific curves for each trading pair to achieve a
quantity and price variation curve that is identical to the user's liquidity tokens. This helps
users achieve a complete hedge. We refer to such synthetic assets as Dynamic Synthetic
Assets (DSA).

• 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

New price: 1 ETH = 1800 USDC


1 sETH = 2000U
Total value of user's assets: 3697.2U
Loss due to price change: 100U
IL (Impermanent Loss): 2.8U
Total value of assets in the debt pool: 3902.8U
Profit in the debt pool: 102.8U

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

1. Hedging Effect: Crafting's mechanism, the Sharing Debt Pool, ultimately


discounts user profits and losses based on the size of the Pool's funds. However,
if a user's position size is significantly smaller than the Pool's funds, this discount
can be negligible. If a user's position size represents more than 5% of the Pool's
funds, we can assist the user in increasing their position size when opening a
shortA position to hedge against this discount.
2. Impact on Crafting: This feature will bring in more users, additional traffic, and
liquidity to Crafting. There is no need to be overly concerned that all users will
take short positions and cause significant losses for the platform. Similar to GMX,
market fluctuations will neutralize the gains and losses of the Sharing Debt Pool.

You might also like