# Fees & Spread

## Introduction

In line with industry standard, **fees are calculated on the value of the total position size** (leverage x collateral).

1. [Fees Breakdown](#fees-breakdown)
   1. [Cryptocurrencies](#cryptocurrencies)
   2. [Forex](#forex-major)
   3. [Commodities](#commodities-tier-1)
   4. [Revenue Distribution](#revenue-distribution)
2. [Lifecycle of a Trade](#undefined)
   1. [Opening Fee](#opening-fee)
   2. [Spread](#spread)
   3. [Price Impact](#price-impact)
   4. [Borrowing Fees](#rollover-and-borrowing-fees)
   5. [Dynamic Liquidation Prices](#dynamic-liquidation-prices)
   6. [Closing Fee](#closing-fee)

## Fees Breakdown

The "Market/Limit" fee below goes to [Buyback & Distribute](/liquidity-farming-pools/gns-staking.md#buyback-and-distribute) if the order is a market order, and to oracle bots if the order is a limit order.

Additionally, the referrer rewards are always taken from the "Governance Fund" fees.

Finally, while all trades are open, they may pay a [borrowing fee](#borrowing-fee), which goes into the overcollateral layer of the corresponding gToken vault.

Gains Network earns revenue from trading fees on gTrade, its decentralized leveraged trading platform. The fees are distributed as follows:

• Governance (DAO): 22% for protocol operations and incentives\
• Vault (Liquidity Providers): 15% for underwriting trades\
• GNS Burn Mechanism: 54% to support token utility\
• Referrals: 5%\
• Trigger Keepers: 4%

### Cryptocurrencies

For BTC and ETH, the spread is 0%. For other cryptocurrencies the spread is dynamic, depending on the [price impact formula](#dynamic-spread).

**Core**

1. **Opening a trade: 0.05%**
2. **Closing a trade: 0.05%**

**Non-core**

1. **Opening a trade: 0.06%**
2. **Closing a trade: 0.06%**

### Forex (Major)

Spreads on all major forex pairs are fixed at 0.01%.

1. **Opening a trade: 0.012%**
2. **Closing a trade: 0.012%**

### Forex (Minor)

Spreads on all minor pairs are fixed at 0.01%.

1. **Opening a trade: 0.016%**
2. **Closing a trade: 0.016%**

### Forex (Exotic)

Spreads on all exotic forex pairs are set per pair depending on their volatility.

1. **Opening a trade: 0.02%**
2. **Closing a trade: 0.02%**

### Commodities (Tier 1)

This category currently only includes XAU/USD (Gold). Spreads on all tier 1 commodities are fixed at 0.01%.

1. **Opening a trade (0.05%)**
2. **Closing a trade (0.05%)**

### Commodities (Tier 2)

This category currently includes XAG/USD (Silver), WTI/USD (Oil), XPD/USD (Palladium), and XPT/USD (Platinum). Spreads on all tier 2 commodities are fixed at 0.04%.

1. **Opening a trade: 0.08%**
2. **Closing a trade: 0.08%**

### Stocks

1. **Opening a trade: 0.07%**
2. **Closing a trade: 0.07%**

### Indices

1. **Opening a trade: 0.05%**
2. **Closing a trade: 0.05%**

## **Lifecycle of a Trade**

### Opening Fee

Let's say we use **250 USDC** at **10x** leverage to long ETH/USD. The fee is applied to leveraged amount: **2,500 USDC**.

2,500 \* (0.06/100) = **1.5 USDC fee**

**248.5 USDC** is the total collateral value of your newly opened trade, and therefore its total position size is **2,485 USDC**.

### **Fixed Spread**

When opening a trade the Chainlink 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 [Pairs Storage](/what-is-gains-network/contract-addresses.md) contract by searching for the relevant [pair index](/gtrade-leveraged-trading/pair-list.md).

### Dynamic Spread&#x20;

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 USDC 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 Fee**s

Borrowing fees are applied to trades while they are open.&#x20;

### Borrowing Fee

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.&#x20;

The fee is charged per block on a trade's total position size and is calculated as follows:

`feePerBlock = baseFeePerBlock * (effectiveOi / maxOi) ^ exponent`

where `effectiveOi` is calculated as follows:

`effectiveOi = Math.min(Math.max(Math.abs(long - short), max * minP), max * maxP)`

`effectiveOi` is calculated by finding the delta between the side that is long and the side that is short. This value is then clamped using `minP` and `maxP` to create a floor and a ceilling, ensuring that both a minimum fee is always paid, and that the fee is never excessive. `exponent` is used to maintain an exponential relationship between the borrowing fee and the current market conditions.

Although outdated, please refer to the [Medium article for further details](https://gainsnetwork-io.medium.com/gtrade-v6-3-2-from-funding-fees-to-borrowing-fees-ee3d747b0b70).

### Liquidation Prices

Trades liquidation prices can **get closer** over time if you **pay borrowing fees**.

***Liquidation Price Distance =** Open Price \* (Collateral \** [*Liquidation Threshold*](#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 USDC collateral, the liquidation threshold would be 67%, the closing fee would be 16 USDC (20,000\*(0.08/100) and that you have paid 1 USDC 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, Forex (major), Forex (minor), Forex (exotic), Commodities (gold), Commodities (other)*

{% tabs %}
{% tab title="Cryptocurrencies" %}
**Cryptocurrencies**

| Leverage     | Liquidation Threshold % |
| ------------ | ----------------------- |
| 2            | 89.84                   |
| 5            | 89.60                   |
| 10           | 89.20                   |
| 15           | 88.80                   |
| 20           | 88.40                   |
| 25           | 88.00                   |
| 30           | 85.46                   |
| 35           | 82.91                   |
| 40           | 80.37                   |
| 45           | 77.83                   |
| 50           | 75.29                   |
| 55           | 72.74                   |
| 60           | 70.20                   |
| 65           | 69.80                   |
| 70           | 69.40                   |
| 75           | 69.00                   |
| 80           | 68.60                   |
| 85           | 68.20                   |
| 90           | 67.80                   |
| 95           | 67.40                   |
| 100          | 67.00                   |
| 105          | 66.60                   |
| 110          | 66.20                   |
| 115          | 65.80                   |
| 120          | 65.40                   |
| 125          | 65.00                   |
| 130          | 64.60                   |
| 135          | 64.20                   |
| 140          | 63.80                   |
| 145          | 63.40                   |
| 150          | 63.00                   |
| {% endtab %} |                         |

{% tab title="Fx (major)" %}
**Forex (major)**

| Leverage     | Liquidation Threshold % |
| ------------ | ----------------------- |
| 2            | 89.98                   |
| 25           | 89.70                   |
| 50           | 89.40                   |
| 75           | 89.10                   |
| 100          | 88.80                   |
| 125          | 86.63                   |
| 150          | 84.45                   |
| 175          | 82.28                   |
| 200          | 80.10                   |
| 225          | 77.93                   |
| 250          | 75.75                   |
| 275          | 73.58                   |
| 300          | 71.40                   |
| 325          | 71.10                   |
| 350          | 70.80                   |
| 375          | 70.50                   |
| 400          | 70.20                   |
| 425          | 69.90                   |
| 450          | 69.60                   |
| 475          | 69.30                   |
| 500          | 69.00                   |
| 525          | 68.70                   |
| 550          | 68.40                   |
| 575          | 68.10                   |
| 600          | 67.80                   |
| 625          | 67.50                   |
| 650          | 67.20                   |
| 675          | 66.90                   |
| 700          | 66.60                   |
| 725          | 66.30                   |
| 750          | 66.00                   |
| 775          | 65.70                   |
| 800          | 65.40                   |
| 825          | 65.10                   |
| 850          | 64.80                   |
| 875          | 64.50                   |
| 900          | 64.20                   |
| 925          | 63.90                   |
| 950          | 63.60                   |
| 975          | 63.30                   |
| 1000         | 63.00                   |
| {% endtab %} |                         |

{% tab title="Fx (minor)" %}
**Forex (minor)**

| Leverage     | Liquidation Threshold % |
| ------------ | ----------------------- |
| 2            | 89.97                   |
| 25           | 89.60                   |
| 50           | 89.20                   |
| 75           | 88.80                   |
| 100          | 85.54                   |
| 125          | 82.29                   |
| 150          | 79.03                   |
| 175          | 75.77                   |
| 200          | 72.51                   |
| 225          | 69.26                   |
| 250          | 66.00                   |
| 275          | 65.60                   |
| 300          | 65.20                   |
| 325          | 64.80                   |
| 350          | 64.40                   |
| 375          | 64.00                   |
| 400          | 63.60                   |
| 425          | 63.20                   |
| 450          | 62.80                   |
| 475          | 62.40                   |
| 500          | 62.00                   |
| 525          | 61.60                   |
| 550          | 61.20                   |
| 575          | 60.80                   |
| 600          | 60.40                   |
| 625          | 60.00                   |
| 650          | 59.60                   |
| 675          | 59.20                   |
| 700          | 58.80                   |
| 725          | 58.40                   |
| 750          | 58.00                   |
| {% endtab %} |                         |

{% tab title="Fx (exotic)" %}
**Forex (exotic)**

| Leverage     | Liquidation Threshold % |
| ------------ | ----------------------- |
| 2            | 89.96                   |
| 25           | 89.50                   |
| 50           | 89.00                   |
| 75           | 84.33                   |
| 100          | 79.67                   |
| 125          | 75.00                   |
| 150          | 70.33                   |
| 175          | 65.67                   |
| 200          | 61.00                   |
| 225          | 60.50                   |
| 250          | 60.00                   |
| 275          | 59.50                   |
| 300          | 59.00                   |
| 325          | 58.50                   |
| 350          | 58.00                   |
| 375          | 57.50                   |
| 400          | 57.00                   |
| 425          | 56.50                   |
| 450          | 56.00                   |
| 475          | 55.50                   |
| 500          | 55.00                   |
| {% endtab %} |                         |

{% tab title="Commodities (gold)" %}
**Commodities (gold)**

| Leverage     | Liquidation Threshold % |
| ------------ | ----------------------- |
| 2            | 89.90                   |
| 10           | 89.50                   |
| 20           | 89.00                   |
| 30           | 87.50                   |
| 40           | 85.00                   |
| 50           | 82.50                   |
| 60           | 80.00                   |
| 70           | 77.50                   |
| 80           | 75.00                   |
| 90           | 72.50                   |
| 100          | 70.00                   |
| 110          | 69.50                   |
| 120          | 69.00                   |
| 130          | 68.50                   |
| 140          | 68.00                   |
| 150          | 67.50                   |
| 160          | 67.00                   |
| 170          | 66.50                   |
| 180          | 66.00                   |
| 190          | 65.50                   |
| 200          | 65.00                   |
| 210          | 64.50                   |
| 220          | 64.00                   |
| 230          | 63.50                   |
| 240          | 63.00                   |
| 250          | 62.50                   |
| {% endtab %} |                         |

{% tab title="Commodities (other)" %}
**Commodities (other)**

| Leverage      | Liquidation Threshold % |
| ------------- | ----------------------- |
| 2             | 89.84                   |
| 5             | 89.60                   |
| 10            | 89.20                   |
| 15            | 88.80                   |
| 20            | 88.40                   |
| 25            | 88.00                   |
| 30            | 84.74                   |
| 35            | 81.49                   |
| 40            | 78.23                   |
| 45            | 74.97                   |
| 50            | 71.71                   |
| 55            | 68.46                   |
| 60            | 65.20                   |
| 65            | 64.80                   |
| 70            | 64.40                   |
| 75            | 64.00                   |
| 80            | 63.60                   |
| 85            | 63.20                   |
| 90            | 62.80                   |
| 95            | 62.40                   |
| 100           | 62.00                   |
| 105           | 61.60                   |
| 110           | 61.20                   |
| 115           | 60.80                   |
| 120           | 60.40                   |
| 125           | 60.00                   |
| 130           | 59.60                   |
| 135           | 59.20                   |
| 140           | 58.80                   |
| 145           | 58.40                   |
| 150           | 58.00                   |
| {% endtab %}  |                         |
| {% endtabs %} |                         |

### 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.85 USDC**.

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).

2485 \* (0.06/100) = 1.988 USDC closing fee

\--> 24.85 - 1.988 = **22.862 USDC PnL**

Now let's also say that the trade **paid 0.5 USDC** of **borrowing fees**:

22.862 - 0.5 = **22.362 USDC final PnL**

Therefore, you would receive **270.862 USDC** (248.5 USDC collateral + 22.362 PnL) to your wallet after closing your trade.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gains.trade/gtrade-leveraged-trading/fees-and-spread.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
