# Funding Rate

In Perennial V2, the funding flows from longs to shorts (or vice versa), while being controlled with a P-controller over the skew in long vs short.

#### Market Skew <a href="#market-skew" id="market-skew"></a>

The 𝑠𝑘𝑒𝑤skew is a measure of how imbalanced a given market is. The higher the skew the greater difference in positions from takers on the long & short sides of the market. Ideally, markets are perfectly balanced, this ensures maximum capital efficiency. However, in situations where there is an imbalance, makers will take on exposure to the lesser side of the market to ensure the larger side of the market is always backed.

$$
skew=
max(long,short)
long−short
​
$$

In order to rebalance the market (reduce skew), a funding rate is utilized to incentivize market participants change their positions or enter new ones.

#### Funding Rate <a href="#funding-rate" id="funding-rate"></a>

At each market update, the P-controller recalculates and updates the rate of change of the funding based on the skew and a risk parameter (*k*). The funding rate continues to virtually adjust linearly at its latest updated rate of change in between market updates.

$$
Δ𝑓𝑢𝑛𝑑𝑖𝑛𝑔=𝑠𝑘𝑒𝑤/𝑘Δfunding=skew/k
$$

If the market has a skew, then at each oracle update the P-controller will adjust the funding rate that each side will pay. If the skew is larger than the size of the funding change per update also increases.

The figure shows an example of how skew in a market can effect the funding rate.

<figure><img src="https://docs.perennial.finance/~gitbook/image?url=https%3A%2F%2Flh4.googleusercontent.com%2FMqpggtMHq7XldXiFpjLfOXPt6LfpRI9sNsOgRwzhvHdsT0-N3rQW8820Zr2bMXIM0hclBSAsnqwpB1-mQsPqs_OnhBLqTGQJ-ozzZEYfabdrdMNLPKiJpFp6klqX8vpKUZwsFimTA2AutArx-XEY6Q&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=6e0f45eb&#x26;sv=1" alt=""><figcaption><p>The figure shows an example of how skew in a market can effect the funding rate.</p></figcaption></figure>

The maker side has no ability to effect the pricing of the funding, aside from indirectly through limits on the magnitude of long and short.

#### Makers <a href="#makers" id="makers"></a>

In the event of skew, the maker side will supplement the lesser side of the market to ensure the larger side of the market is matches. In exchange, they receive pro-rata funding for the exposure it is covering. Intuitively, the maker side of the market is being compensated for taking whatever is currently the unfavourable side of the market pro-rata.

<figure><img src="https://docs.perennial.finance/~gitbook/image?url=https%3A%2F%2F2608572446-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FesXIGSYvKcOjqMTCdsjo%252Fuploads%252FpLM20ZCUGJ98ueghEjrf%252FPerennial%2520V2%2520Mechanism%2520Overview%2520%282%29.png%3Falt%3Dmedia%26token%3Dbcb6bfa7-4909-44b9-a98d-2a1b762fef51&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=2447e7fd&#x26;sv=1" alt=""><figcaption></figcaption></figure>

In this example, the skew of the market is (10 - 6) / 10 or 40%. This will cause the funding rate of the market to steadily increase until the skew changes. The maker side of the market is receiving 80% of the funding (per position) that the short side of the market is receiving for the exposure it is taking on.


---

# 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.kwenta.io/using-kwenta/perennial-isolated-margin/perennial-intro/funding-rate.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.
