> For the complete documentation index, see [llms.txt](https://docs.synfutures.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.synfutures.com/perp-trading/security/dynamic-penalty-fees.md).

# Dynamic Penalty Fees

{% hint style="warning" %}
Under the current contract settings, triggering a penalty fee will result in the transaction being reverted.
{% endhint %}

In a functional derivatives market, it is common for Pfair to deviate from Pspot depending on the liquidity and market situation. However, excessive deviation and unreasonable trading behavior should be discouraged through economic means. The definition of Pmark reflects this principle.

**To protect our LPs and limit order makers while not impacting normal trading behavior,** Oyster AMM employs a stability penalty mechanism. When a trade results in a **higher deviation of fair price to mark price than before the trade,** a stability penalty will be charged based on the following, in addition to the normal trading fees paid to **LPs or limit order makers.**

$$
D(P\_{\text{fair}}, P\_{\text{mark}}) = \frac{\max(P\_{\text{fair}}, P\_{\text{mark}})}{\min(P\_{\text{fair}}, P\_{\text{mark}})} - 1
$$

$$
StabilityPenaltyRatio(P\_{\text{fair}}) = a \cdot D^3 + b \cdot D^2 + c \cdot D + d
$$

Trades that result in deviation less than MMR would have no stability penalty. Trades that result in deviation above MMR would have an increasing stability penalty ratio.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.synfutures.com/perp-trading/security/dynamic-penalty-fees.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
