> For the complete documentation index, see [llms.txt](https://docs.yfx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yfx.com/yfx-v4/trading/fees.md).

# Fees

## Transaction Fees

The fee for opening and closing positions is currently set at **0.03% for 200x leverage，0.05% for 100x  or lower leverage.**

{% hint style="info" %}
Transaction Fee = Transaction Value x **fee rate**
{% endhint %}

## Funding Fees

YFX V4 implements the funding fee mechanism to balance the aggregated long and short positions. The funding fee is settled between traders and fund pools.

{% hint style="warning" %}
The funding fee is not settled every 8 hours, but the previous funding fees will be settled every time a transaction is made.
{% endhint %}

**The funding fees on YFX are calculated in seconds on the blockchain, and the 1-hour estimated funding fee displayed on the trading page is the estimated 1-hour funding fee calculated using the real-time funding fees.**

### The 8 hours funding fee formula:

> **F:** Funding Rate
>
> **P:** Premium Index
>
> **I:** Default Interest

$$
F = P + clamp(I - P, -0.05%, 0.05%)\\
I = 0.01% \\
$$

$$
F = \begin{cases}\\
\begin{aligned}
P + 0.05% ;;; & \text{When } P \le -0.04%\\
0.01% ;;; & \text{When }-0.04% \le P \le 0.06% \\
P - 0.05% ;;; &\text{When }P \gt 0.06%\\
\end{aligned}
\end{cases}
$$

<figure><img src="https://3229423702-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAipGkPqnkOuKcSYSDJU3%2Fuploads%2FKsmSbiWed3bRNwe7J7kG%2Fimage.png?alt=media&amp;token=82ee79bd-ed60-41bd-bf8a-d1498b0917c5" alt=""><figcaption></figcaption></figure>

Users can find real-time funding rates in their positions, and they can view the funding profit and loss for a particular trade in their trade history. A positive funding rate means the user earned funding, while a negative funding rate means the user paid funding.

<figure><img src="https://3229423702-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAipGkPqnkOuKcSYSDJU3%2Fuploads%2FFyLXwAnjxjmq3QuRPzFF%2Fimage.png?alt=media&amp;token=04fde265-1671-4218-90b7-2d857e2e5b52" alt=""><figcaption></figcaption></figure>

## Execution Fees

There are two steps involved in opening/closing/editing a position: The first step is that the user sends a transaction request to the blockchain, including parameters like margin amount and leverage.&#x20;

The second step is that **Keepers** observe the blockchain for the request, retrieve the price feed from the oracles, then execute the request. After the second step, the transaction is considered to be completely on-chain.

Therefore, when each transaction request is sent to the blockchain, an additional execution fee is required and paid to the blockchain network.

{% hint style="info" %}
Currently, the execution fee on the Arbitrum blockchain is **0.0001** ETH per time.

Execution fees will be adjusted based on the gas fees for each blockchain over certain time periods.
{% endhint %}

##
