Francium-DeFi
Search…
Stop-loss

Motivation

To mitigate the risk of principal loss from an impermanent loss or a significant price drop of the supplied token, we offer a feature named "Stop-loss": A user can specify the maximum percentage of equity that he or she is willing to lose . And when the threshold is reached, the position will be closed automatically to avoid further loss.

Design and trigger

Francium’s farming pools support both tokens of the asset pair as principal. If the user’s initial investment of two funds is tkn0 and tkn1 (where tkn0 is the number of denominated currencies, tkn1 is another currency), when the price of the token fluctuates, the U.S. dollar value of the principal invested by the user and the value of the equity will change. Francium protocol will calculate whether to trigger the stop loss based on the relative value of the two.
The principal is represented by principalValue, and the net value of the user's position is represented by equityValue.
If in the future, due to the price change, the equityValue is lower than the principalValue, then the user's principal is at a loss
Where principalValue = tkn0 + tkn1 * price
At this time, the user's principal loss ratio is: lossRatio = (principalValue-equityValue) / principalValue
If lossRatio exceeds the stop loss value set by the user, Francium will try to help the user close the position automatically

Cost of Stop-loss

The Stop-loss bot will charge a 0.3% fee of your total position when closing the position.
As an example, if you set a 20% stop-loss for 8 SOL and leverage of 2x, your total position is 16 SOL. When you get liquidated, you may receive less than 6.4 SOL (20% loss) due to stop-loss bot delay. You may lose more if the stop-loss bot is delayed. The bot checks positions every ten minutes. If the loss surpasses 20%, the stop-loss is activated. If prices fall much further within the ten-minute period, losses could reach 20% or more. Consider 20% as the trigger to liquidate, not a guaranteed loss percentage.

Price Range

To further minimize the risk brought by the impermanent loss or significant price drop of the supplied token, we have introduced a feature called “Price Range”. By the virtue of this feature, DeFi users can set a price range when exceeds the range, the bots will try to close the position.
By default, the range is from minus one hundred to positive infinity. -100% to infinity, means the price trigger is turned off.
How to set the Price Range?
2 Select the pool and click Farm
3 After adding collaterals, turn on the Stop-Loss Setup button
4 Select “Price Range” from the available options
5 Move the horizontal bar back and forth to set the price range of your own choice and click "Farm"
Example:
Suppose you open SOL/USDC position and set a price range from -50.82 to 50.16 by choosing the “Price Range” feature.
It means that you have set a price trigger range when the price of SOL decreases below -50.82% i-e $16.35 or increases above 50.82 i-e $50.16 of the equity value, the function will be triggered by Francium’s bot and the position will be closed automatically. Hence, avoiding further loss of equity.
Copy link
Outline
Motivation
Design and trigger
Cost of Stop-loss
Price Range