> For the complete documentation index, see [llms.txt](https://shinkalabs.gitbook.io/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shinkalabs.gitbook.io/hub/andromeda/guides/deploy-policy/oracle-conditional.md).

# oracle-conditional

This policy is a price circuit breaker. It reads a Pyth price on-chain and only approves a signature if the price is inside the configured bounds. If the market moves outside the bounds, the dWallet is paused until the price comes back (or the policy is reconfigured).

Program address (Solana devnet): `Wi6x2Y4YTYcv4aMz7AQRF2UELE36fZNKhsAoCFq2ssM`.

## What it enforces

For each signing request, the program reads the configured Pyth price feed (Pyth Pull V2 format), checks the publish time and confidence, and compares the price against the allowed range. Out of range, stale, or low-confidence: the signature is rejected. The program verifies the price account is owned by the Pyth program, so a spoofed account does not pass.

## Configuration

* **Price feed**: the Pyth price account to read.
* **Bounds**: the allowed price range (and any staleness or confidence constraints the template exposes).

Changes follow the [policy lifecycle](/hub/andromeda/guides/deploy-policy.md).

## Combine it

* With [`velocity-guard`](/hub/andromeda/guides/deploy-policy/velocity-guard.md): paused on a price move, and rate-limited otherwise.
* With [`allowlist-destinations`](/hub/andromeda/guides/deploy-policy/allowlist.md): paused on a price move, and only ever touching known programs.

## On-chain guarantees

* The price is read and validated on-chain; the API cannot fake it.
* The Pyth account owner is checked, blocking spoofed price accounts.
* Init-authority-hash seeded PDA (no front-running).
* Replay-nonced configuration changes.

## When to use it

* Collateral or treasury wallets that should freeze if the underlying asset crashes or spikes.
* Strategies that must not execute outside a price band.


---

# 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://shinkalabs.gitbook.io/hub/andromeda/guides/deploy-policy/oracle-conditional.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.
