At WOWswap, we built the simplest way to make 5x leveraged shot-swaps. When you short a token, you loan it from someone and immediately sell that token: Short = Borrow + Sell.
If the token’s price goes down, you buy it back later for a cheaper price, return the loan, and keep the profit.
Let’s assume that token A is currently traded on Pancakeswap at $10, and you decided to short it for 100 BUSD (your money) with 5️X leverage. It means that you will borrow A token for 500 BUSD (50 tokens). On WOWswap you will borrow these tokens from the lending pool, created by individual liquidity providers who deposited A tokens to the lending pool.
When you make a short swap you will sell 50 borrowed A tokens and receive revenue of 500 BUSD. This revenue + 100 your BUSD (600 BUSD in total) will become a collateral for your short position.
Since you borrowed A tokens you need to pay interest on your loan. So let’s suppose that after some time your payable interest becomes 10%, so now you owe 55 A tokens to the pool.
However, if A-token’s price drops to $8 per token, your position’s value will be:
$600–55*$8 = $160
Since you invested only $100 of your own money your net profit will be $60 or 60%.
In case of shorting, a liquidation happens if:
Collateral < Liquidation price * Number of tokens * (1 +Liquidation margin)
In the example above, you shorted 50 tokens, while having a collateral of 600 BUSD, so assuming liquidation margin of 5% (decided by the DAO participants) the liquidation price at opening will be:
Liquidation price = $600/50/(1.05) = $11.43
It means that if A token’s price rises from $10 to $11.43 your collateral might not be enough to buy back A-tokens from the market to pay the loan, and this position shall be liquidated by a keeper.