> For the complete documentation index, see [llms.txt](https://docs.orriss.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.orriss.xyz/bin-pricing/reference-price.md). Agents can also search and read this documentation through its [MCP server](https://docs.orriss.xyz/~gitbook/mcp).

# Reference prices

Price provenance, fixed-point units and the conditions under which an Orriss trade or deposit can settle.

The external price anchors every bin. The two pool types obtain it differently. An integrator needs the pool’s quote mint, source address and publisher to interpret a stored price correctly.

|                               | SOL/USDC                                                                          | Funded SPL/SOL market                                                                           |
| ----------------------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| Economic source               | A specific Orca WSOL/USDC Whirlpool on Solana                                     | The eligible external token/SOL market recorded when the pool was created                       |
| Who supplies the observation? | The Orriss instruction reads the Whirlpool account directly                       | The Orriss price service checks the selected market off-chain and signs an observation          |
| During a pool swap            | The program reads the source at execution and commits the reference with the fill | The program uses the stored signed price within its freshness window                            |
| Dependency                    | Availability and spot price of that single Whirlpool                              | External market, service signer, publication cadence and an active service term for new updates |

## Direct SOL/USDC price

The fixed source is Whirlpool `Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE`. The program verifies the Orca program owner, account layout, discriminator and mint order. The direct source must be read-only for the transaction, and the Orriss refresh or swap must execute as a top-level instruction. [Whirlpool source account](https://solscan.io/account/Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE)

Let S be the unsigned `sqrtPriceX64` read from the Whirlpool. Orriss drops 16 low bits before squaring. With U = floor(S / 2¹⁶), the stored reference in micro-USDC per whole SOL is

**R = floor(U² × 10⁹ / 2⁹⁶).**

Divide R by 10⁶ for USDC per SOL. A standalone refresh writes the reference and its observation slot and time. A direct swap reads the source even if the stored observation is recent. The timestamp records when Orriss read the account. The time of the most recent external trade can be earlier.

## One day of SOL/USDC prices

The 24 hourly candles for 24 November 2026 UTC come from the external Orca SOL/USDC market via GeckoTerminal. To show how the grid responds to a trading day, use each hourly close as a proxy for the reference and multiply it by 0.995 and 1.005. The chart connects those hourly values. In the program, each direct swap reads the Whirlpool at execution time.

<figure><img src="https://2901705416-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwgb6N4AUimhmgBryw2j4%2Fuploads%2FaEGwIqqcPOwI72pNmmjU%2Fmarket-day.png?alt=media" alt="Observed hourly SOL/USDC closes on November 24 with modeled midpoints half a percent above and below them. The close falls from 72.1330 to 69.6463."><figcaption><p>Observed hourly Orca closes and illustrative execution midpoints for bins 9 and 10 on 24 November 2026 UTC</p></figcaption></figure>

The candle beginning at 00:00 UTC closed at 72.133023 USDC/SOL. Its two modeled midpoints were 71.772358 and 72.493688. For the 23:00 candle the close was 69.646309, moving the midpoints to 69.298077 and 69.994541. Values here are rounded to six decimals for display. The CSV retains the observed precision and the decimal calculations before program rounding. [Download the 24 hourly candles and calculated levels (CSV)](https://2901705416-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwgb6N4AUimhmgBryw2j4%2Fuploads%2FEnsoqcLDKrzuOzqaVM8w%2Fmarket-day.csv?alt=media) · [External market](https://www.geckoterminal.com/solana/pools/Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE)

## Signed SPL market prices

The launch planner displays P in SOL per whole token. If the mint has d decimals, the publisher expresses the reference as **R = floor(10ᵈ / P)** token atoms per SOL. For a six-decimal token at 0.002 SOL per token, R is 500,000,000 atoms per SOL, or 500 whole tokens per SOL.

A signed update must identify the configured publisher, carry a strictly increasing source slot and preserve or advance the observation time. The program verifies the service term and the signed values. Reconstructing the economic price from the selected external market is the service’s responsibility.

## Conditions for settlement

* **Freshness.** Deposits in either pool and swaps using a stored observation require the observation to be at most 30 seconds old. The program allows up to 3 seconds of positive clock skew. It also checks that the encoded price is in the supported range, 2 through 10¹², when updating a reference.
* **Price agreement.** With an expected reference E greater than zero, the instruction requires `10,000 × |R − E| ≤ 50 × E`. If E is 100 USDC per SOL, 100.50 is exactly within the limit. 100.51 requires a new quote.
* **Output and shares.** A swap also has a positive minimum total output. A deposit has a minimum share count per funded bin. Both protect against changes in inventory between quote and execution. [Swap mathematics](https://docs.orriss.xyz/bin-pricing/swap-math.md)
* **Withdrawal.** Closing a position uses the inventory and share counts in pool state. It is independent of price freshness and the service term. [LP accounting](https://docs.orriss.xyz/bin-pricing/lp-accounting.md)

A recent spot observation can still differ from the broader market, especially on a shallow source. Moving the bins changes where the next order executes. It neither replenishes sold inventory nor guarantees that traders will route to the pool.


---

# 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.orriss.xyz/bin-pricing/reference-price.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.
