> For the complete documentation index, see [llms.txt](https://docs.euphoria.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.euphoria.finance/euphoria/architecture-and-technology.md).

# Architecture & Technology

#### Built on MegaETH

Euphoria runs on [MegaETH](https://megaeth.com/), a high-performance EVM-compatible blockchain designed for real-time applications.

We chose MegaETH because Tap Trading depends on speed. Squares update continuously, market makers refresh quotes in real time, and trades need to settle in sub-second windows. MegaETH provides:

* 100k TPS with sub 10-ms blocktimes
* Full EVM compatibility, so contracts are auditable with standard tooling
* Low transaction costs, enabling small trade sizes without prohibitive gas

#### How a Trade Flows

A single tap moves through four parties:

1. **Market makers** provide the live quote shown on your square
2. **You** tap on a square to submit a trade from your wallet
3. **The Euphoria smart contracts** record the trade, hold positions, and handle settlement
4. **Redstone oracle** provides external price data used to validate settlement

#### Redstone Oracle

Euphoria uses a custom Redstone oracle for price validation and settlement.

The oracle provides trusted external market data used to:

* Verify reference market prices
* Determine final trade settlement values
* Ensure pricing integrity independent of Euphoria or market makers

Settlement outcomes are based on objective external data, not prices generated internally by the platform.


---

# 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.euphoria.finance/euphoria/architecture-and-technology.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.
