# Funding Fee

## What is Funding Fee?

Both **Perpetual Futures and Everlasting Options are funding fee based**. Funding fees are periodic payments between traders and or liquidity providers (i.e paid peer-to-peer). Hence, DUET Protocol takes no fees from funding fees as it is done directly between users. \
\
Depending on the derivative type, the direction and the total net position: traders and or liquidity providers will either pay or receive funding fees.

## **Funding Fee of Perpetual Futures**

To balance the two sides of long and short positions, the pool will always apply a funding fee to the majority side. The funding fee mechanism of DUET Perpetual Futures is quite similar to that of the centralized exchanges (e.g. [BitMEX](https://www.bitmex.com/app/perpetualContractsGuide#Funding)). That is, the funding fee is proportional to the spread of the mark price over the index price, i.e. (mark-index). Every second, one long position pays one short position funding fee as below:

$$
F=f\*(P-i)
$$

​where *P* is the mark price, *i* is the index price, and *f* is the funding fee coefficient.

**Note**: given $$(P-i)$$ is determined by the net position, the funding fee is ultimately determined by the net position. Specifically, when $$l>s$$, the funding fee is positive (meaning long positions pay short positions), whereas when $$l\<s$$, the funding fee is negative (short positions pay long positions).&#x20;

## **Funding Fee of Everlasting Options**

For each second, assuming the total number of contracts in a long position is L while that in a short position is S. Then every single long contract will pay a funding fee per the following formula:

&#x20;                                 $$FundingFeefor7Day=OptionMarkPrice-Payoff$$​

where

$$
Payoff = max(spot - strike, 0) for call
$$

$$
Payoff = max(strike - spot, 0) for put
$$

**Please note:** \
1\. the Funding Fee is accrued on a per-second basis. That is, a funding fee of (Funding Fee for 7 Day)/604800 is accrued every second.&#x20;

2\. Unlike Perpetual Futures, theoretically the funding fee for Everlasting Options is always positive (i.e. long positions always pay Funding Fee to short positions).

{% hint style="info" %}
While in theory the Funding Fee for Everlasting Options is always positive, it can be pushed to negative by trading actions in real trading.
{% endhint %}
