# Funding & Interest Rate

In Perennial, funding and interest rates are key mechanisms for maintaining market balance and compensating liquidity providers (Makers). The funding rate incentivizes Takers to balance long and short open interest, while the interest rate compensates Makers for their delta-neutral capital costs.

### Market Skew

Market `skew` measures the imbalance between aggregate long and short Taker positions. A perfectly balanced market (zero skew) maximizes capital efficiency. When an imbalance exists, Makers take on exposure to the lesser side of the market, ensuring the larger side is always backed. The skew is calculated as:

$$
skew = \frac {long - short} {skewScale}
$$

Where:

* `long`: Aggregate long positions.
* `short`: Aggregate short positions.
* `skewScale`: A parameter determined by the Market Operator.

To reduce skew, a funding rate is introduced to incentivize market participants to adjust their positions.

## Funding Rate

The funding rate, r', adjusts based on the market skew and the time elapsed since a position was opened.

<figure><img src="https://lh4.googleusercontent.com/MqpggtMHq7XldXiFpjLfOXPt6LfpRI9sNsOgRwzhvHdsT0-N3rQW8820Zr2bMXIM0hclBSAsnqwpB1-mQsPqs_OnhBLqTGQJ-ozzZEYfabdrdMNLPKiJpFp6klqX8vpKUZwsFimTA2AutArx-XEY6Q" alt=""><figcaption><p>The figure shows an example of how skew in a market can effect the funding rate. </p></figcaption></figure>

{% hint style="info" %}
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.
{% endhint %}

### Calculating the Funding Rate

$$
r' = max(\dfrac{min(r + (t' - t) \* skew}{k}, rMax), rMin)
$$

Where:<br>

* `r'`: Current funding rate.
* `r`: Funding rate when the position was opened.
* `t'`: Current time.
* `t`: Time when the position was opened.
* `skew`: Current market skew (as calculated in 6.1).
* `k`: A risk parameter (pController.k) influencing the rate of change.
* `rMax, rMin:` Maximum and minimum bounds for the funding rate.

If `skew` is positive (more longs than shorts), longs pay shorts. If `skew` is negative, shorts pay longs. The funding rate r' changes linearly with time based on the `skew/k` factor between oracle updates.

### Makers

When there is a skew, Makers supplement the lesser side of the market. In return, they receive a pro-rata share of the funding based on their exposure. The Maker's utilization for funding, mu, is:

`mu → min((long – short) / maker, 1)`

Absolute value is implied if long-short is negative, as Makers cover the net taker imbalance

<figure><img src="/files/RqU8jm9h5XOFTgxaInzh" alt="" width="342"><figcaption></figcaption></figure>

Makers are compensated for taking on the relatively unfavorable side of the market. For instance, if a market has a 40% skew (e.g., 10 units long, 6 units short, `skewScale=10`) and Makers have 5 units of liquidity, they effectively cover 4 units of the net short exposure. If `mu` determines they cover, for example, 80% of this imbalance, they would receive 80% of the funding that the short side (in this case, the side Makers are backing) would theoretically receive per position.

A funding fee (`ff`) is also applied, calculated as:\
`ff → |r'| * marketParameter.fundingFee`\
This fee is paid by Takers and contributes to what Makers receive

## Interest Rate

To incentivize Makers even when the market is relatively balanced, an interest rate (i) can be charged. This is designed to cover Makers' delta-neutral capital costs, distinct from the funding rate which covers net exposure. Takers pay this interest rate, and Makers receive a portion as interest rate fees (ii).

The interest rate is determined by:

`i = U(u) * min(maker, long + short) / (long + short`<br>

Where:

* `U`: A utilization curve function (e.g., Compound-style or jump-rate model) defined by `riskParameter.utilizationCurve`.
* `u`: The market utilization.
* `maker`: The Maker's total position size.
* `(long + short)`: The sum of absolute long and short Taker positions.

The `min(maker, long + short) / (long + short)` term ensures the interest rate is discounted pro-rata if Maker liquidity exceeds the total Taker open interest, capping the spread.

### &#x20;**Interest Rate Fees**

The interest rate fee (`ii`) that Makers receive is:\
`ii → i * marketParameter.interestFee`

### Utilization (u)

Market utilization u feeds into the interest rate calculation. It is determined by comparing two utilization measures: net utilization (`nu`) and efficiency utilization (`eu`).

**Net utilization (nu):**\
`nu = major / (maker + minor)`\
Where major is the larger of long or short Taker positions, and minor is the smaller.

<figure><img src="/files/9R0XptVjZwPD9X1Pmvkc" alt=""><figcaption><p><br>Example: If longs = 10, shorts = 6, maker = 5, then nu = 10 / (5 + 6) = 10 / 11 ≈ 91%.</p></figcaption></figure>

**Efficiency utilization (eu):**\
`eu = (major * el) / maker`\
Where `el` is the `riskParameter.efficiencyLimit`. This measures how efficiently Maker liquidity offsets demand on the larger side.

The final utilization u used in the interest rate formula is:\
`u = min(1, max(nu, eu))`\
This selects the greater of nu or eu (capped at 100%) to drive the interest rate via the `U(u)` curve.

## **Total Payments and Receipts**

The total funding and interest-related payments for Takers and receipts for Makers are:

**Long Takers Pay:**\
`longPays = r' + ff/2 + i`

* They pay the current funding rate `r'`, half of the funding fee `ff/2`, and the interest rate `i`

**Short Takers Pay (or Receive if r' is positive):**\
`shortPays = -r' + ff/2 + i`

* They pay the negative current funding rate -r' (i.e., receive if r' is positive, pay if r' is negative), half of the funding fee ff/2, and the interest rate i.

**Makers Receive:**\
`makerReceives = mu * r' - |mu| * ff/2 + i - ii`

* They receive their pro-rata share of the funding rate `(mu * r')`.
* They contribute their pro-rata share to the funding fee pool `(-|mu| * ff/2).`
* They receive the gross interest paid by Takers `(i)`.
* A portion of this interest `(ii)`is the net interest fee they retain. The difference `(i - ii)` may go to the protocol or other designated parties.


---

# 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.perennial.finance/protocol/markets/funding-and-interest-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.
