# 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 is only deducted from profits when you close*

*- It is capped to your profit amount - you can never lose collateral to price impact*

*- If your position is at a loss, the applicable Price Impact is $0*

*- It does not affect your liquidation price or margin requirements*

*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 $0 ($30 - $30, capped)*

*- If you close with $100 loss → you lose $100 (Price Impact = $0)*

**FAQs**

**Q1: Can Price Impact make me lose money?**

*No. Price Impact is only deducted from profits. If your trade is at a loss, Price Impact is $0. If your profit is smaller than the Price Impact, it's capped to your profit - you receive $0 profit but don't lose any collateral.*

**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 settles it against profits only.*

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

*No. Price Impact only applies when closing at a profit. Your liquidation price and margin calculations remain unaffected.*

**Q4: What does ($20/$50) mean in the Price Impact display?**

*This shows (applicable / total). In this example, your total Price Impact is $50, but only $20 is being applied because your profit is $20. The fee is capped to your profit amount.*

**Q5: 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: 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.flash.trade/flash-trade/~/revisions/xKAncpdYLJG7bPOyq6YW/flash-trade-protocol/technical-architecture/pricing-engine/price-impact-fee.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.
