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

# Protocol Architecture

The Heist is built from a handful of small, single-job pieces rather than one giant do-everything contract. Each piece has exactly the power it needs and no more — the part that prints new LOOT can only do that one thing, the treasury's multisig can never touch what users deposit, and nothing anywhere has a switch that freezes a withdrawal.

This page is the map. If a box below looks unfamiliar, click it — every one links to the page that explains it properly, with its own detailed diagram.

## The big picture

Read this top to bottom, roughly in the order things happen:

```mermaid
flowchart TB
    A[Genesis\nOne-time 72h launch window] --> B((LOOT & MERRY\nThe two tokens))
    B --> C[The Printer\nExpands LOOT above peg]
    C --> D[The Floor\nRedemption backstop]
    C --> E[The Hideout\nStake MERRY, earn rewards]
    E --> F[Gauge Farms & Voting\nStake LP, earn MERRY]
    C --> G[Protocol-Owned Liquidity\nGrows on its own]
    F --> G
    D --> H[The Treasury\nCollects & splits revenue]
    E --> H
    H --> D
    H --> E
    G -.optional.-> I[Yield Vaults\nAutomate the above]
```

Everything below expands one box at a time, in the same order, with the exact numbers.

## The pieces, grouped by job

### The two tokens

| Piece     | What it does                                                                                                                                                                                                                                                                                                                                    |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **LOOT**  | The pegged token. A plain, ordinary token underneath — no transfer taxes, no freeze switch. Only one thing is ever allowed to create more of it, and that permission is locked in permanently the moment the protocol launches.                                                                                                                 |
| **MERRY** | The share token. Capped at 100,000, forever — there's no way, ever, to create more than that. 75,000 is earned by farming; the remaining 25,000 is a fixed, transparent team/treasury allocation (vested linearly over 24 months, or released only through a timelocked governance process — see [MERRY](/the-heist-docs/tokenomics/merry.md)). |

### The peg engine — how LOOT stays near its target price

```mermaid
flowchart LR
    A[Trading pool] -->|price data| B[The Printer]
    B -->|above peg| C[Mints new LOOT]
    C -->|half| D[Paid to Hideout stakers]
    C -->|half, sold| E[The Floor]
    A -->|below-peg sell tax| E
```

| Piece                | What it does                                                                                                                                                                                                                                            |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **The trading pool** | Where LOOT and WETH actually trade. Sets the fee on every trade, adds an extra cost to selling LOOT while it's below peg, and keeps a running record of the price that everything else in the protocol reads from.                                      |
| **The Printer**      | Checks that price record every 6 hours. If LOOT is trading meaningfully above its target, it mints new LOOT — half goes to people staking MERRY, half gets sold back into the market to fund the Floor. If LOOT is at or below target, it does nothing. |
| **The Floor**        | Holds WETH that backs every LOOT in existence. Anyone can trade LOOT in here for a guaranteed, ever-rising payout — see [The Floor](/the-heist-docs/how-it-works/the-floor.md).                                                                         |

### Staking & rewards — what you earn for participating

| Piece            | What it does                                                                                                                                  |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **The Hideout**  | Where you stake MERRY. Tracks how long you've stayed staked, what you're owed from new LOOT prints, and your share of the Treasury's revenue. |
| **Gauge Farms**  | Where you stake a liquidity position (see below) to earn MERRY, on a schedule that starts fast and tapers off over about two years.           |
| **Gauge Voting** | A weekly vote — open to anyone staked in the Hideout — that decides how Gauge Farms rewards get split across pools.                           |

See [The Hideout](/the-heist-docs/how-it-works/the-hideout.md) and [Gauge Farms & Voting](/the-heist-docs/how-it-works/gauge-farms-and-voting.md) for the full mechanics, including the two-step "deposit, then stake" flow that actually gets you farming.

### Protocol-owned liquidity — the market growing itself

| Piece                    | What it does                                                                                                                                                                                                                                                                                                                                               |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **The liquidity vaults** | Hold the actual trading liquidity for LOOT/WETH and MERRY/WETH. Anyone can deposit into these (via the Trade page's Create Liquidity tab) and get a share token back — including the treasury multisig, whose resulting shares are an ordinary deposit like anyone else's, kept as protocol-owned liquidity by policy rather than by a code-enforced lock. |
| **The builder process**  | Automatically collects a small trading-fee slice plus part of the Printer's sale proceeds, with no owner path to redirect that money elsewhere. Turning it into a matched pair and depositing it into the vaults above is a separate, permissionless step anyone can trigger.                                                                              |

Full detail: [Protocol-Owned Liquidity](/the-heist-docs/how-it-works/protocol-owned-liquidity.md).

### Revenue — where the money actually goes

```mermaid
flowchart LR
    A[Genesis fees, half share] --> T[The Treasury]
    B[Below-peg sell tax, 25% share] --> T
    T -->|60%| H[Hideout dividends]
    T -->|40%| F[The Floor]
```

| Piece            | What it does                                                                                                                                                                                                                                                                                                                                  |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **The Treasury** | Collects revenue from half of the Genesis deposit fee (the other half goes directly to the dev, never passing through here) and part of the below-peg sell tax, then splits what it collects 60% to Hideout stakers / 40% to the Floor, on a fixed ratio nobody can change on a whim. It also funds a small, public, capped operating budget. |

Full detail: [The Treasury](/the-heist-docs/how-it-works/the-treasury.md).

### Optional yield vaults

| Piece            | What it does                                                                                                                                                                                                                               |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Yield Vaults** | A separate, opt-in family of vaults that automate things you could otherwise do by hand — compounding farm rewards, defending the peg for profit, growing a liquidity position. None of the core protocol above depends on these existing. |

Full detail: [Yield Vaults](/the-heist-docs/yield-vaults/overview.md).

## What holds true everywhere, no exceptions

* **Nothing can mint LOOT except the Printer, and nothing can mint MERRY past 100,000.** These aren't policies — there is no code path that could do otherwise.
* **No admin key can touch what you've deposited.** Administrative roles exist only to curate settings within pre-approved limits (like which pools are eligible for rewards) — never to move user funds.
* **Nothing can be paused.** The Floor's redemption and Genesis's principal withdrawal can never be frozen by anyone.
* **No external price feeds, anywhere.** Every price-sensitive decision reads the trading pool's own on-chain history — there's nothing off-chain to go stale, get delayed, or be fed bad data.

Next: [Genesis](/the-heist-docs/how-it-works/genesis.md), where the protocol's story actually begins.


---

# 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://the-heist-1.gitbook.io/the-heist-docs/architecture/protocol-architecture.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.
