# Technical Details

***Premium/discount function***

The architecture outlined in this SIP takes a layered approach to risk management. Rather than leaning exclusively on funding payments to limit LP risk, a skew-dependent premium is applied to prices quoted by the market (premium for long skew, discount for short skew). By storing premium from takers (expanding skew) to adiabatically distribute to makers (compressing skew), this mechanism creates a high frequency rebalancing incentive while also placing soft limits on maximum exposure held by the debt pool (without the need for explicit restrictive OI limit). Simulating price impact in this way also increases compatibility for assets with a wider range of liquidity profiles and protects LPs from market manipulation.

***Funding rate velocity***

This model represents a mathematically minor adjustment to the current system, but with significant implications to the overall mechanism. Put simply, instead of `r = c * skew`, instead we have `dr/dt = c * skew`. In practice, the effect of this change is that funding rates will continuously drift higher/lower in the presence of uncorrected position imbalances, creating a natural price discovery mechanism for funding rates while simultaneously smoothing out funding rate trajectories. Another notable change is that with this mechanism, LPs would no longer exclusively earn funding (e.g. short skew + positive funding, LPs pay funding). Instead, funding flows through LPs without gain or loss over time (i.e. can be mathematically shown that net funding earned by LPs over time is zero). See plots below illustrating debt pool earning funding when `dr/dt > 0` while paying equal and opposite funding when `dr/dt < 0`

<figure><img src="https://user-images.githubusercontent.com/83029531/192562639-ca83bc05-6c32-4910-8536-55af9365a1d8.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://user-images.githubusercontent.com/83029531/192562723-90a548a5-89f2-4ba2-b6a9-f4ae2a68d160.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://user-images.githubusercontent.com/83029531/192562574-2f42c7f9-2ac6-4d2c-94e4-f96be611d945.png" alt=""><figcaption></figcaption></figure>

***Hybrid oracle approach***

This approach creates multiple execution tiers: (1) traditional execution through purely on-chain oracle, (2) asynchronous execution through on-chain oracle, or (3) asynchronous execution using off-chain oracle network whose validity is verified on-chain. Tier (1) is superior in composability, while tier (3) is superior in performance and execution efficiency (tier (2) is somewhere in between). With signed price updates made available off-chain, on-chain costs are only incurred when an exchange is made thus improving cost sustainability while also improving liveliness.

#### Technical Specification <a href="#technical-specification" id="technical-specification"></a>

*Find more details at* [*https://sips.synthetix.io/sips/sip-279/*](https://sips.synthetix.io/sips/sip-279/)


---

# 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/perpetual-futures/funding/futures-funding-rates.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.
