Fees & Spread
Introduction
In line with industry standard, fees are calculated on the value of the total position size (leverage x collateral).
Fees Breakdown
Open Fee -> 100% Governance (Buyback and Distribute)
- 50 - 75% referrer
Closing Fee -> 100% Governance (Buyback and Distribute)
Borrowing Fees -> 100% Borrowingfee Pool (EARN Investor Side)
Cryptocurrencies
Opening a trade: 0.08%
0.06 % -> Open fee
0.01485 % - 0.0198 % -> Referral fee
0.02 % -> Market/Limit fee
Closing a trade: 0.08%
0.06% -> Close fee
0.02% -> Trigger order fee
Stocks
Opening a trade: 0.08%
0.06 % -> Open fee
0.01485 % - 0.0198 % -> Referral fee
0.02 % -> Market/Limit fee
Closing a trade: 0.08%
0.06% -> Close fee
0.02% -> Trigger order fee
Forex
Spreads on all minor pairs are fixed at 0.01%.
Opening a trade: 0.012%
0.0045 % -> Open fee
0.0022275 % - 0.00297 -> Referral fee
0.003 % -> Market/Limit fee
Closing a trade: 0.012%
0.009% -> Close fee
0.0023 -> Trigger order fee
Commodities
Opening a trade: 0.05%
0.01875 % -> Open fee
0.00928125 % - 0.012375 % -> Referral fee
0.0125 % -> Market/Limit fee
Closing a trade: 0.05%
0.0375% -> Close fee
0.0125 -> Trigger order fee
Lifecycle of a Trade
Opening Fee
Let's say we use 250 USDT at 10x leverage to long ETH/USD. The fee is applied to leveraged amount: 2,500 USDT.
2,500 * (0.08/100) = 2 USDT fee
248 USDT is the total collateral value of your newly opened trade, and therefore its total position size is 2,480 USDT.
Fixed Spread
When opening a trade the Pyth oracle returns a price for the asset, for instance 3,003.19. The spread is then taken into account (0.04%), so the open price would be 3004.39 before consideration of the dynamic spread (see section below).
That is: 3,003.19 + (3,003.19 * 0.04 / 100) = 3004.39
Please make note that the spread is different for each pair — smaller pairs with lower liquidity have a higher spread. It is displayed on the front end next to the Price in the Trade Parameters box, and can be confirmed in the pair storage contract by searching for the relevant pair index
Dynamic Spread
Dynamic Spread, formerly known as 'Price Impact' is added on top of the fixed spread (if the pair has one). It depends on the open interest of the pair, the position size of the trade being opened, and on the direction of the trade (long / short).
Dynamic Spread (%) = (Open interest {long/short} + New trade position size / 2) / 1% depth {above/below}.
Cryptocurrencies
Dynamic spreads using the 1% depth in each direction (long: 1% depth above / short: 1% depth below) from Binance.
Forex
Fixed spreads.
Commodities
Fixed spreads.
ETH/USD Example
So using our above price example with a position size of 2,480 after fees, if the "1% depth above price" parameter for ETH/USD is 8m and there is 100,000 USDT of open long interest:
(100,000 + 2,480 / 2) / 8,000,000 = 0.0126% dynamic spread
This percentage is then applied to the opening price including the Fixed Spread. In the case of crypto, as there is no Fixed Spread, this is just 3,003.19:
Final opening price = 3003.19 + (3003.19 * 0.0126 / 100) = 3003.57
So in this case if the median spot price was 3003.19, the opening price would be 3003.57.
Borrowing Fees
Borrowing fees are applied to trades while they are open.
Borrowing fees treat open trades of the dominant side as vault borrowers. The fee is determined by a pair's (or the group the pair is part of) net OI relative to the overall vault TVL, meaning pairs (or groups) with more lopsided OI will charge more than pairs with balanced OI.
The fee is charged per block on a trade's total position size.
Example:
For this example, on Base (1800 blocks per hour), the estimated borrowing fee per hour is:
0.00034976% = 1800 * Math.max(1.9219146149012726e-7, 1.9431296324610092e-7)
For this example, Position is 10000 USDT:
0.034976USDT per Hour = 0.00034976% / 100 * 10000 USDT
Liquidations Prices
Trades liquidation prices can get closer over time if you pay borrowing fees.
Liquidation Price Distance = Open Price * (Collateral * Liquidation Thresholds - Closing Fee - Borrowing Fees) / Collateral / Leverage.
Liquidation price = If Long: Open Price - Liquidation Price Distance Else (Short): Open Price + Liquidation Price Distance.
For example, let's say that you have opened a long on BTC/USD at 20,000 USD using 100x leverage and 50 USDT collateral, the liquidation threshold would be 67%, the closing fee would be 16 USDT (20,000*(0.08/100) and that you have paid 1 USDT in borrowing fees:
Liquidation Price = 20,000 - 20,000 * (50 * 0.67 - 16 - 1) / 50 / 100 = 19,888 USD.
Liquidation Thresholds
The liquidation threshold depends on asset class and leverage used. The values can be found in the following table, for Cryptocurrencies, Stocks, Forex, Commodities (gold), Commodities (other)
Liquidation Parameters
• startLiqThresholdP: The liquidation threshold percentage when leverage is at the starting point.
• endLiqThresholdP: The liquidation threshold percentage when leverage reaches the maximum (end) value.
• startLeverage: The leverage value where the liquidation threshold starts to decline.
• endLeverage: The leverage value where the liquidation threshold stops declining and stabilizes at its minimum.
• Leverage: The current leverage of the system or user, which influences the liquidation risk.
Examples:
Three Example Scenarios:
1. Leverage Before Start Leverage (e.g., Leverage = 20):
• Since the leverage (20) is below the start leverage (25), the function returns the start liquidation threshold, which is 0.9.
• This means the liquidation threshold remains at 90%, indicating a higher liquidation risk at lower leverage levels.
2. Leverage Between Start and End Leverage (e.g., Leverage = 40):
• In this case, leverage is between 25 and 60. The function performs linear interpolation to calculate the threshold.
• The liquidation threshold will be approximately 0.825 (based on the relative position between 25 and 60).
• This shows that as leverage increases, the liquidation threshold gradually decreases, indicating reduced liquidation risk as leverage moves toward the maximum.
3. Leverage Beyond End Leverage (e.g., Leverage = 70):
• Since the leverage (70) is greater than the end leverage (60), the function returns the end liquidation threshold, which is 0.75.
• This indicates that for very high leverage values, the liquidation threshold plateaus at 75%, meaning no further reduction in liquidation risk occurs beyond this point.
Closing Fee
Let's say ETH/USD went up 1% from the open price, and we close the trade at 3,033.6. The pending profit (PnL) will be 1% of 2480 (our leveraged collateral), which is 24.8 USDT.
Now, we close the trade, and therefore pay the closing fee. Please note that the fees are always applied on the initial position size (without PnL).
2480 * (0.08/100) = 1.984 USDT closing fee
-> 24.8 - 1.984 = 22.816 USDT PnL
Now let's also say that the trade paid 0.5 USDT of borrowing fees:
22.816 - 0.5 = 22.316 USDT final PnL
Therefore, you would receive 270.316 USDT (248 USDT collateral + 22.316 PnL) to your wallet after closing your trade.
Last updated