> For the complete documentation index, see [llms.txt](https://docs.flash.trade/flash-trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flash.trade/flash-trade/flash-trade-protocol/technical-architecture/pricing-engine/price-impact-fee.md).

# Price Impact Fee

Price Impact is an adjustment based on a function of deviation in entry price from actual price reported by Pyth oracle feed corresponding to the asset at the instant when you open a position. It accounts for potential latency in landing oracle update transactions and the discrete nature of sampling frequency used in recording the price published by the oracle, preventing misuse of the implicit latency by malicious actors.

### Key Points

* Price Impact Fee is recorded at position opening based on the deviation between your execution price and the oracle price
* **The fee is charged when you close your position, irrespective of whether you are in profit or loss**
* It is deducted from your available margin upon closing
* It affects your effective PnL in all scenarios

### Example

* You open a position with $50 Price Impact recorded
* If you close with $200 profit → you receive $150 ($200 - $50)
* If you close with $30 profit → you receive -$20 ($30 - $50)
* If you close with $100 loss → you lose $150 ($100 loss + $50 Price Impact)

### FAQs

**Q1: Is Price Impact Fee always charged?**

Yes. Price Impact Fee is charged irrespective of profit or loss when you close your position. It is deducted from your available margin at the time of closing.

**Q2: Why does my position have Price Impact?**

Latency in oracle updates at entry may result in execution that differs from the ideal price. Price Impact captures this difference and is settled when the position is closed.

**Q3: Does Price Impact affect my liquidation price?**

No. Maintenance margin calculation is exempt from Price Impact when computing liquidation price, which remains unaffected.

**Q4: Does Price Impact reduce on partial close?**

Yes. If you close 50% of your position, the remaining Price Impact also reduces by 50%.


---

# 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.flash.trade/flash-trade/flash-trade-protocol/technical-architecture/pricing-engine/price-impact-fee.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.
