Fees
Cost Calculation Formulas for Opening and Closing Positions
This document outlines the cost structure associated with opening and closing positions, including applicable fees.
0. Execution Fee
The system uses order + execution to complete transactions. In this process, the Pyth Oracle service needs to be updated to update the latest market price and the basic fee paid to the blockchain network. Usually, there will be a slight surplus of this fee, which is used as a reserve fund when the gas fee increases rapidly during network congestion. A fee of 0.1Bera will be charged for each order, which will be gradually reduced to 0 as the protocol runs, and all execution fees will be covered by the protocol.
1. Opening Position Cost
Opening Cost = Collateral + Order Execution Fee (0.1bera) There are no position-specific costs associated with opening a new position in this context, but each order execution will incur an order-level fee of 0.1bera.
2. Closing Position Cost
The cost to close a position is calculated as follows: Closing Cost = (Position Size × 0.002) + Execution Fees
Where:
Position Size: The size of the position you are closing (in units or notional amount).
Execution Fees: 0.1 Bera
3. Example Calculation
Suppose you have a position size of $100,000 when closing the position: Closing Cost = ($100,000 × 0.002) + 0.1 Bera
5. Total Cost Summary
The total cost incurred when closing a position includes both the proportional fee based on position size and the fixed execution fee:
Total Closing Cost = (Position Size × 0.002) + (Number of Orders × 0.1bera)
6. Table Example
Position Size ($)
Transaction Fees per Order (bera)
Closing Cost ($)
$50,000
0.1
($50,000 × 0.002) + 0.1 Bera
$100,000
0.1
($100,000 × 0.002) + 0.1 Bera
$200,000
0.1
($200,000 × 0.002) + 0.1 Bera
Last updated