> For the complete documentation index, see [llms.txt](https://tetrics.gitbook.io/x/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tetrics.gitbook.io/x/architecture/privacy-preservation/sealed-bid-batch-auction.md).

# Sealed-Bid Batch Auction

A **sealed-bid batch auction** is an on-chain settlement process in which multiple trades or intents are collected within a fixed time window (“batch”). Each solver submits a commit (i.e., a hash of their proposed solution) off-chain or on-chain, then later reveals the full details of their bid. The system picks the best solution and settles it atomically, ensuring fair competition and minimal front-running.

<figure><img src="/files/GDqqoxp5czUCgc2tfBeI" alt=""><figcaption></figcaption></figure>

### Transaction Settlement Process

#### 1. Intent Submission & Batch Window Collection

* **Intent Submission:** Users sign and submit requests, such as trades or yield flows, within a predetermined batch window (e.g., N blocks).
* **Visibility:** Solvers can see user intents within the batch but not the specific solutions proposed by others.
* **Storage:** Intents are stored either off-chain or in a minimal on-chain structure for reference.

#### 2. Commit Phase

* **Hashing & Commitment:** Solvers compute and hash details about the routes, fees, and constraints.
* **No Copying:** Only the hash is submitted, ensuring competitors cannot see specific fees or routes.
* **Storage of Minimal Data:** Ensures reduced on-chain data usage.

#### 3. Reveal Phase

* **Disclosure:** After the commit deadline, solvers reveal the details of their solutions previously committed.
* **Comparison:** Solutions are evaluated based on fees, slippage, and yield outcomes.
* **Best Bid Selection:** Routes with the lowest fee or highest user value are chosen.

#### 4. Atomic On-Chain Execution & Settlement

* **Transaction Finalization:** The entire batch is finalized in one transaction.
* **Atomicity:** If any step fails, such as a loss of liquidity, the transaction reverts entirely.
* **Batch Settlement:** Aggregation of multiple trades reduces on-chain interactions, optimizing gas costs.

### Optimized Blockchain Operations

#### Security & Front-Running Mitigation

* **No Early Reveal:** The commit-reveal process prevents solvers from front-running or copying others' solutions, ensuring fairness.
* **Gas & Cost Efficiency:** The transaction either succeeds or reverts entirely, eliminating partial executions.

#### Fee Distribution

* **Reward for Winning Solver:** The selected solver collects a fee, and users benefit from minimized gas fees, as settlement covers multiple trades.

By adhering to these structured phases, the system ensures efficient, secure, and cost-effective transaction settlement on the blockchain.


---

# 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://tetrics.gitbook.io/x/architecture/privacy-preservation/sealed-bid-batch-auction.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.
