# Key Properties of the Price Data Structure

#### 1. **Data Type**

* **UINT 256**:
  * Price values are stored as a **256-bit unsigned integer**, ensuring sufficient precision for complex computations.
  * This representation supports extremely large values while maintaining compatibility with Ethereum’s architecture.
* **Not Scaled Integers**:
  * Prices are expressed as raw integers, avoiding scaling complexities common in floating-point arithmetic.

#### 2. **ERC-20 Scaling Standard**

* **Scale Integer (10¹⁸)**:
  * Prices follow the same scale as ERC-20 tokens (e.g., 1 ETH = 10¹⁸ units). This ensures consistency across decentralized applications and simplifies integration with other DeFi protocols.

#### 3. **Binary Representation**

* **Q128.128 Format**:
  * Prices are stored using a **binary fixed-point representation**:
    * The **first 128 bits** represent the **integer portion** of the price.
    * The **last 128 bits** represent the **fractional (decimal) portion** of the price.
  * This format ensures precision for both whole and fractional values, avoiding rounding errors in calculations.

#### 4. **Optimized Storage**

* **Single-Sided Price Storage**:
  * The protocol only keeps one price (e.g., **X**) instead of storing both sides of a pair (e.g., **X and Y**).
  * Using a single price reduces storage requirements and computational overhead while enabling the calculation of the second value when needed.


---

# 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.ax11.org/price-data-structure/key-properties-of-the-price-data-structure.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.
