> For the complete documentation index, see [llms.txt](https://brownfi.gitbook.io/brownfi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://brownfi.gitbook.io/brownfi-docs/brownfi-v3/architecture-overview/oracle-gateway.md).

# Oracle Gateway

The Oracle Gateway assembles the pre-trade price used by every swap in 03 steps:

* Step 1 - Blend and validate: Off-chain feeds (Pyth, Chainlink, Redstone) and an on-chain AMM TWAP are combined via a configurable weight. If the two sources diverge beyond disThreshold, the gateway halts trading until they reconcile, protecting the pool from contradictory or stale data.
* Step 2 - Apply bounded skewness: If the pool is imbalanced, the price shifts to nudge traders toward rebalancing. This incentive is capped at the fee level (V3 improvement over V2's unbounded skewness).
* Step 3 - Apply bid-ask spread: A fixed spread provides a baseline margin; a dynamic spread widens when oracle sources disagree, automatically increasing LP earnings during volatile periods.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://brownfi.gitbook.io/brownfi-docs/brownfi-v3/architecture-overview/oracle-gateway.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.
