# Funding Rate

### <mark style="color:yellow;">**Purpose:**</mark>&#x20;

balance open interest between longs and shorts and compensate the minority side. Funding is **NOT** about pulling a price toward an oracle. It’s a **crowding tax** paid continuously by the dominant side.

**Two-layer design: index vs market**\
Trendle deliberately separates the system into two independent layers.

1. **Index layer** - the Attention Index (DoA) is computed purely from social and engagement data. It is deterministic, non-tradable, and independent of trader positioning.
2. **Market layer** - traders price a perpetual-style derivative *around* that index based on leverage, risk appetite, and positioning.

There is no tradable `spot attention asset` to arbitrage against. The index acts as a reference signal, not a market-clearing price.

### <mark style="color:yellow;">How the mechanism works ?</mark>

1. **Who pays whom**

* Funding accrues per second. The dominant side *(the side with greater open interest)* pays the opposite side. Accrual is proportional to each position’s opening notional = `collateral × leverage`.
* Current P\&L does not matter for how much you pay / receive.

2. **Per market**

* Funding is calculated separately for each token / index pair. No cross-netting between markets.

3. Rate formula (example shown for long-dominant market)

$$
\text{fundingRatePerSecond}
\= \frac{(\mathrm{Long\ OI}-\mathrm{Short\ OI}) \times \mathrm{baseFundingRate}}
{\mathrm{Long\ OI}}
$$

If shorts dominate, swap “Long” and “Short” in the formula.&#x20;

Your per-second charge / credit = `positionOpeningNotional × fundingRatePerSecond`

4. **Percent-in / percent-out; surplus to LPs**

* Funding is charged as a percentage on each side’s opening notional. “Longs pay 1%” means each long pays 1% (annualized to per-second) of *its opening notional* over the interval; “shorts receive 1%” means each short receives 1% of its opening notional.
* Because the dominant side’s notional sum is larger, total paid > total received; the surplus flows to the pool and is distributed to LPs.

5. **One-sided markets**

* If all open interest is on one side (e.g., only longs or only shorts), no funding is charged.

6. **Funding applies to all open positions, even with no boost (1×)**

* With 1×, funding is calculated on your collateral meaning higher boost increases position size and scales the dollar impact of funding proportionally, while the funding rate itself remains the same.

7. **Liquidations from funding**

* Funding can **r**educe collateral over time. A position may be liquidated due to funding even if its mark-to-market P\&L is positive, if equity falls below the maintenance threshold.


---

# 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.trendle.fi/product/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.
