# 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="/files/p7oG8Lm840AablauZof5" 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="/files/GYQSy5XASmxVKUNcb3zK" 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 %}

##


---

# 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.yfx.com/yfx-v4/trading/fees.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.
