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

# Oracle Integration

### Oracle Integration

The Symmio Options Protocol uses secure, decentralized price feeds to power settlement, liquidation, and real-time solvency checks. Its oracle system is built on the **Muon Network**, which provides cryptographically verified price data using a distributed validator set.

## Muon Network

* **Threshold Signature Scheme (TSS):** Prevents single points of failure.
* **Schnorr Signatures:** Enables efficient multi-party signature verification.
* **Gateway Validation Layer:** Adds an off-chain signature from a trusted gateway.
* **Decentralized Validation:** Multiple validators must agree on price updates.

## Oracle Architecture

| Component              | Purpose                                           |
| ---------------------- | ------------------------------------------------- |
| **MuonOracle**         | Main on-chain oracle contract for price delivery  |
| **Schnorr Verifier**   | Performs cryptographic verification of signatures |
| **Gateway Signature**  | Ensures a second, trusted source signs data       |
| **SettlementPriceSig** | Encapsulates verified price + metadata for trades |

## Verification Process

```solidity
function verifyTSSAndGW(
    bytes32 _data,
    bytes calldata _reqId,
    SchnorrSign calldata _signature,
    bytes calldata _gatewaySignature
) external view;
```

1. **TSS Verification:**

   Uses Schnorr signatures and public key matching to validate data from Muon.
2. **Gateway Signature:**

   Validates an additional ECDSA signature from a trusted gateway signer.
3. **Integrity Checks:**

   Confirms request freshness, symbol correctness, and data authenticity.

#### Key Integration Points

**1. Trade Settlement**

* Prices are verified during trade execution.
* Verified price is used to calculate PnL and finalize trades.

**2. Liquidation Triggers**

* Collateral prices and unrealized PnL are validated before liquidation.
* Oracle data ensures fair execution and risk isolation.

**3. Real-Time Risk Monitoring**

* Party-level PnL is updated using oracle-verified snapshots.
* Enables automated flagging of risky accounts.

## Role in Liquidation Lifecycle

| Phase     | Oracle Role                                             |
| --------- | ------------------------------------------------------- |
| Flagging  | Real-time collateral valuation for solvency checks      |
| Execution | Provides final settlement prices and deficit validation |
| Closure   | Supports asset redistribution based on verified values  |

## Oracle Data Flow

<figure><img src="/files/1XXkk8nTSjKdD0mr6IQh" alt=""><figcaption></figcaption></figure>


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.symm.io/options-protocol-architecture/technical-architecture/oracle-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
