contents/BlockChain/DeFi-PDN.md
In conclusion: because the stop-losses will execute when you have deployed this strategy on Francium.
In general, this is where the pseudo nuance comes into the picture — when you open a pseudo-delta neutral position, you are actually betting for the asset’s price to move within a particular range. In other words, the two true Delta neutrals are stable and profitable as long as they are within acceptable limits. By design, the neutral strategy’s default stop-loss threshold is at 10% of your position. Total liquidation of a position is avoided with this protection strategy.
For example, with Francium stop-loss mechanism, the asset you are invested in with this hedging strategy will be returned to you if equity value moves 10% below your entry. if you invested $1,000, stop-loss triggers when your equity value falls to $900, and the remaining asset will go to your wallet after deducting a certain amount of robot fees.
There are two Integrate yield farming from liquidity pools: Raydium and Orca. The underlying assets selected for the Pseudo-Delta Neutral Hedging Strategy are $whETH and $USDC. We select these assets as they are relatively stable and have excellent leverage returns.
Begin by depositing a total of $400 USDC into the following positions:
Deposit $100 USDC in Position: 3X ETH/USDC (borrowing USDC)
You have deposited $100 equivalent USDC and borrowed $200 USDC. The total position value is $300 USDC. Since it is a 50%-50% position setting, you will have a $300 - $150 = $150 cost ETH LONG exposure.
Deposit $150 ETH & $150 USDC for LP tokens.
Stake LP tokens into the farming pool.
So far, long position part is staked into the farming pool.
Deposit $300 USDC in Position: 3X ETH/USDC (borrowing ETH)
You have deposited $300 USDC and borrowed $600 equivalent ETH. The total position value is $900 USDC. Since it is a 50%-50% position setting, you will have a $600 - $450 = $150 cost ETH SHORT exposure.
Deposit $450 ETH & $450 USDC for LP tokens.
Stake LP tokens into the farming pool.
So far, short position part is staked into the farming pool.
Both the long position and short exposures are hedged.
According to the above example, we can get $150 whETH long position and $150 whETH short position.
When closing the position, the following steps are followed. Let's liquidate the long position first:
Assumption we take P as the price of ETH, using the amount of USDC as a unit. Initially, we holds N USDC, and the price of ETH is P₀. When he participated in LYF with leverage Y. Based on the AMM formula, when P changes, the amount of USDC we can withdraw by redeeming the LP token is:
$$ NY\sqrt{\frac{p}{p_{0}}} $$
So when you close the position, the profit by long we get is:
$$ NY(\sqrt{\frac{p}{p_{0}}}-1) $$
USDC Profits on 1x/2x/3x Margin VS Traditional 1x function curve:
Then liquidate the short position:
Initially, we holds M USDC, whose initial price is P₀, when he participated in LYF with leverage Y. Based on the AMM formula, when P changes, the amount of USDC we can withdraw by redeeming the LP token is:
$$ MY\sqrt{\frac{p_{0}}{p}} $$
The total worth of LP tokens are: (amount * price)
$$ MY\sqrt{\frac{p_{0}}{p}}*p = MY\sqrt{p_{0}p} $$
When you the close position, the profit you get is:
$$ MY(\sqrt{p_{0}p} - p) $$
Token A 1x/2x/3x Margin Profit, with Token A as Principal
From the above figures, you can see the LYF curve is smoother. When the leverage is equal, long & shorting with LYF can reduce the risk when the price is going up/down. When the leverage reaches twice that of the traditional short, it begins to suppress the profit of traditional longing and shorting within a certain range, but the cost is higher when prices fall or rise, or when capital usage is higher. It may look like a simple long/short strategy, but there is an important factor we haven’t taken into account: farming yield, or maybe what we can call self-adjusting leverage. Because our LP tokens keep earning rewards and those rewards are reinvested into our LP tokens, the borrowed tokens are going to take a lower and lower proportion relative to the capital, so we have decreasing leverage. For example, if token A is not likely to fluctuate within a short time, LYF longing/shorting can make it more resistant to market volatility in the future. In a constant APR auto-compound model, the profit can be demonstrated as below:
If we combine long and short to see profit, we can get a curve similar to the following figure:
In the graph above, the horizontal axis shows the price movement of ETH and the vertical axis shows the profit/loss (%) of the position.
As you can see from the picture above. If we only invest 10 days, Our profit is the highest when the whETH price is the same as when we bought it. The whETH on the chart is $1086, and the Equity value is 2.49%. We are still profitable when whETH fluctuates between -22% and +29%. When whETH falls below -22%, we start to lose money, and when whETH rises above +29%, we start to lose money.
As our investment days get longer, the range of returns that can be made becomes larger and larger. As shown above, if you choose to invest for 365 days. Then there is a huge range of gains.
When you believe the assets in the pair will neither rise nor drop dramatically in the coming period.****
Risk to the Yield Farmers:
Price impact when entering/exiting a position
Impermanent Loss (IL)
What is impermanent loss: https://coinmarketcap.com/alexandria/glossary/impermanent-loss
impermanent loss calculator: https://defiyield.app/advanced-impermanent-loss-calculator
Negative APY
Liquidation
Risk to the Lenders:
Asset Return Timing
For example, if the utilization is too high and most of the assets in the pool are occupied, users may not withdraw their deposits on time until leveraged farmers repay their debt.
Bad Debt
Loss of Capital
There is a 10% maximum drawdown when you open a Neutral Strategy position on Francium.
Details:
If the price of ETH varies sharply (for example, rises > 60% or drops > 50%) ,your position will be at a loss.
Your position will be closed at the maximum 10 % drawdown of the total position value to avoid further loss.
The 10% drawdown only applies to the market-neutral strategy, not positions where you manually selected the amount of leverage.