> For the complete documentation index, see [llms.txt](https://docs.takapu.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.takapu.org/discover/introduction/how-it-works.md).

# How It Works

Follow a quote from the market-making engine to direct settlement.

1. **Price.** A Market Maker's engine produces bid and ask prices with available depth.
2. **Sign.** Its authorized signer signs a Market Frame containing that quote and its version and validity information.
3. **Distribute.** Takapu Protocol distributes signed Market Frames to subscribers as Market Streams.
4. **Select and submit.** An Execution Router selects a quote, simulates execution, and submits the transaction with the selected Frame and execution limits.
5. **Validate and match.** The on-chain protocol checks the executable state and matches the request against the selected Maker's depth.
6. **Settle.** The Maker's settlement handshake completes direct transfers atomically within the transaction.

## From selection to execution

Quote generation, signing, distribution, and Router selection happen off-chain. The submitted transaction performs on-chain validation, matching, and settlement.

A protocol swap explicitly selects one Market Maker. Subscribing to several PropAMMs does not imply that a single protocol swap automatically splits a trade across them.

Explore [Market Frames and Market Streams](https://github.com/Takapu-Labs/takapu-docsite/tree/main/discover/market-frames-and-streams.md) or continue to [execution and settlement](https://github.com/Takapu-Labs/takapu-docsite/tree/main/discover/execution-and-settlement.md).


---

# 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.takapu.org/discover/introduction/how-it-works.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.
