What is a deleverage process?
The auto deleverage mechanism can help you reduce risk when there is some black swan, and help you earn more profit in the long term.
To create an arbitrage bot, you will choose if you want to use 1x, 2x, or 3x. When the coin price increases, the actual leverage is increasing, so it will increase the risk too. To keep it simple, when you short a coin, the actual leverage is 2x if the price is 50% away from the liquidation price, 3x (33%), 4x (25%), 5x (20%).
When the actual leverage is N+2 from your initial leverage N, it will be auto deleveraged. For example, if you set the leverage as 2x, it will be auto deleveraged when the actual leverage is 4x.
Let’s make a real example. If you created the arbitrage bot when ETH is $1,000 and set the leverage to 2x, the initial liquidation of the futures part is $1,500. When ETH price goes up to $1,200, it will auto sell a part of the spot and auto close a part of the futures and put that money into the margin. And your Futures liquidation price will become $1,800 after the auto deleverage.