In this article we will take Rabbit Finance and Project A for reference, calculate and analyze fees charged and slippage occured when farmers open and close positions with stablecoin (BUSD, USDT as example) leveraged farm, and cost of borrowing assets.
In the case below we will use 200 USDT as principal and borrow 1000 USDT. Thus, the total position value is 1200 USDT, to do 6x leverage farm USDT/BUSD LP on Ellipsis and PancakeSwap.
Rabbit Finance open position 0xc1f04d5c623bc9ac981f59723eb054e253dfe555eb92885df168711c41de4df8
Rabbit Finance close position
Project A open position
Project A close position
Records of asset transaction
You can see the 200 USDT invested in, and the 1000 USDT borrowed from the vault of Rabbit Finance. To synthesize LP we need to exchange some of the USDT borrowed into BUSD, we will do that on Ellipsis for super low exchange fee and slippage (which is one feature of Rabbit Finance).
The record here shows us how the exchange on Ellipsis is done, we can see 600.1188 USDT is exchanged to 599.9543 BUSD.
The assets (598.7970 BUSD+599.8811 USDT) are synthesized into LP.
Let's check the hash below.
Ellipsis would return the 1.157 BUSD to wallet, so it should be minus from farming position value
The currency at the time is 1.1572 BUSD=1.156589 USDT, so the farming position value is 1200USDT-1.156589USDT=1198.843411USD. The position value synthesized into LP is (598.797BUSD+599.8811USDT).
Process of open position is finished here.
Next let's analyze how close the position works on Rabbit Finance.
RabbitFinance close position hash
After LP is removed, we obtain 599.2866 USDT and 599.412 BUSD
Exchange 599.412 BUSD to 599.09 USDT on Ellipsis.
The position value when close the position is
Using the same method, let's check the cost of open position on Project A
Position value at opening is 1199.924 USDT
600.7121 USDT exchanged into 598.125 BUSD on PancakeSwap
The position value synthesized into LP is 598.125BUSD+599.21265 USDT
Open position finished
Step 1 Remove LP
Step 2 Exchange BUSD to USDT
Step 3 999.9 return to Vault, 196.3 BUSD to the user
Position value after close position is 999.9689USDT+196.3BUSD（196.196USDT）=1196.16USDT
The trading fee and slippage is significantly different on Ellipsis and PancakeSwap , which result in a completely different experience for users when farming on stablecoin leveraged farms. The trading fee on PancakeSwap is 0.25%, meanwhile the trading fee on Ellipsis is 0.04% (There will be minimal slippage when large assets are exchanged). Therefore, Rabbit Finance has obvious advantages in the cost of opening and closing positions compared to Project A.
Actual data of 6x leverage farm open/ close position is shown as follow,
RabbitFinance position value at opening: 1198.84USDT
RabbitFinance position value at closing: 1198.3831USDT
Loss rate: 0.46/1198.84 = 0.038%
Project A position value at openning：1199.92 USDT
Project A position value at closing: 1196.16 USDT
Loss rate: 3.76/1199.92=0.3%
In the case above, with the same amount of token supplied and borrowed, position holding time is similar. Compared to Project A, Rabbit Finance saved up to 87.3% cost for the users caused by trading fee and slippage.
When you do leveraged yield farming, there will be borrowing interest, with the same amount of token supplied and borrowed, position holding time is similar, let’s compare the real cost when holding the position in the case above.
Both of the 2 platforms use a triple-slope interest rate model to determine the borrowing interest, then determine the Utilization with the borrowing interest, or vice versa.
The triple-slope interest rate model is as follow,
USDT Vault Contract:0xc18907269640d11e2a91d7204f33c5115ce3419e
Token Borrowed 1000 USDT
Token Returned 1,000.012707626927500359 USDT
Interest while holding the position: 0.01270762 USDT
USDT Vault Contract: 0x158da805682bdc8ee32d52833ad41e74bb951e59
Token Borrowed 999.92479126062835902 USDT
Token Returned 999.968918488703230413 USDT
Interest while holding the position: 0.04412714 USDT
In the case above, with the same amount of token supplied and borrowed, position holding time is similar. Compared to Project A, Rabbit Finance saved up to 71.2 % of the cost for the users from borrowing interest.