# Funding Fee

<figure><img src="https://content.gitbook.com/content/YQMiWMjQNj4QgmzaRycI/blobs/qnpqtmkJ1BDEUr6S4ZLv/13.png" alt=""><figcaption></figcaption></figure>

### Funding Fee Formula

1. **Global funding fee APR**

$$
FundingFeeAPR\_{before\_clamp} = \abs(LongOI-ShortOI)^{FundingExponentFactor}\*FundingConstantMultiplier\\/(LongOI +ShortOI + FundingConstantFactor \* TotalVaultBalance) \ Condition:(0\<abs(LongOI-ShortOI)< MaxExposureLimit)
$$

$$
FundingFeeAPR = Clamp(FundingFeeAPR\_{before\_clamp}, L, U)
$$

2. **APR on each side**

$$
abs(APR\_{long\_position}) = FundingFeeAPR  \ abs(APR\_{short\_position}) = FundingFeeAPR
$$

$$
if \ LongOI > ShortOI:APR\_{long\_position} >= 0,APR\_{short\_position} <=0 \ else :APR\_{long\_position} <= 0,APR\_{short\_position} >= 0
$$

i.e. when LongOI > ShortOI, long positions needs to pay funding fee (APR ≥ 0), short positions receives funding fee (APR ≤ 0)

3. **Final pending funding fee of an open position**

$$
funding\ fee = time\_weighted\_average\ APR\_{longORshort\_position} \* seconds\_elasped \ / seconds\_in\_a\_year \ \* position\_size \ \* relative\_price
$$

note: *time weighted average APR* is the average APR value over the duration that this open position existed (since the last time that the funding fee was charged). Notice that the APR is basically a function of LongOI and ShortOI.

Funding Fee APR Clamp Range

<table><thead><tr><th width="241">Currency</th><th width="145">Clamp / L APR</th><th width="147">Clamp / U APR</th><th width="233">FundingConstantMultiplier</th><th width="219">FundingExponentFactor</th><th>FundingConstantFactor</th></tr></thead><tbody><tr><td>Group 1: BTC, ETH</td><td>-150%</td><td>+150%</td><td>3</td><td>1</td><td>70%</td></tr><tr><td>Group 2: ADA, AVAX, BCH, DOT, EOS, ETC, FIL, LINK, LTC, TRX, XRP, ARB</td><td>-300%</td><td>+300%</td><td>5</td><td>1</td><td>20%</td></tr><tr><td>Group 3: Top(50)</td><td>-900%</td><td>+900%</td><td>10</td><td>1</td><td>10%</td></tr></tbody></table>
