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

# How It Works

Every token on Trench follows the same lifecycle: **curve → graduation → DEX**. This page walks through each stage, explains where the price comes from, and traces the fee flow.

## The two‑stage lifecycle

A token on Trench lives two lives.

{% columns %}
{% column %}

### Stage 1 · Bonding Curve

Only on Trench. Trades price automatically against a constant‑product curve. No order book, no market makers.

The curve is where a token goes from zero holders to its first few hundred.
{% endcolumn %}

{% column %}

### Stage 2 · DEX

Graduation triggers once the curve fills. Liquidity migrates automatically and the token trades like any other ERC‑20.

On **Ethereum**, it graduates to **Uniswap V2** with LP permanently burned. On **MegaETH**, it graduates to **Kumbaya V3** with LP held by the protocol. On **Robinhood**, it graduates to **Uniswap V4** with the LP locked (tokens graduated before the V4 upgrade remain on Uniswap V3).

From here, Trench steps out of the way.
{% endcolumn %}
{% endcolumns %}

{% hint style="info" %}
The curve is closed the instant a token graduates. All trading moves to the DEX, and every aggregator that indexes it will see the token automatically.
{% endhint %}

## Stage 1 · The bonding curve

### What a bonding curve actually does

Think of the curve as a **vending machine with a sliding price**:

* Every token you buy makes the next token slightly more expensive.
* Every token you sell makes the next token slightly cheaper.
* Nobody sets the price — it's a pure function of how much has been bought minus sold.

There's no order book. No market makers. No front‑running your own price discovery.

### The math (for the curious)

Trench uses the classic **constant‑product formula**:

$$
x \cdot y = k
$$

Where `x` is the ETH reserve, `y` is the token reserve, and `k` stays constant. Buying tokens raises `x` and lowers `y` — which means the price `x / y` rises. It's the same math Uniswap V2 uses, tuned for a fair‑launch context.

### Starting parameters

Every token on Trench starts with the same curve shape per chain, so every launch on the same chain is on equal footing.

| Parameter                    | Ethereum Mainnet | MegaETH Mainnet | Robinhood Mainnet | What it means                                                           |
| ---------------------------- | ---------------- | --------------- | ----------------- | ----------------------------------------------------------------------- |
| Total supply                 | 1,000,000,000    | 1,000,000,000   | 1,000,000,000     | Hard cap. Minted once, at deploy.                                       |
| On the curve                 | 80% (800 M)      | 80% (800 M)     | 80% (800 M)       | Real tokens sellable through the curve.                                 |
| Reserved for DEX             | 20% (200 M)      | 20% (200 M)     | 20% (200 M)       | Set aside to seed the DEX pool at graduation.                           |
| Starting virtual ETH reserve | \~2.009 ETH      | \~2.027 ETH     | \~1.712 ETH       | The ETH the curve pretends to start with. Shapes price impact.          |
| **Graduation threshold**     | **\~6 ETH**      | **\~5.5 ETH**   | **\~5 ETH**       | Once this much ETH has been bought into the curve, the token graduates. |

## Stage 2 · Graduation

### What graduation means

When enough ETH has been bought into the curve, the token **graduates**. Three things happen in a single atomic sequence:

{% stepper %}
{% step %}

#### The curve closes

No more buys or sells happen on Trench's AMM. The curve contract is frozen.
{% endstep %}

{% step %}

#### Liquidity migrates to the DEX

The ETH collected by the curve, together with the **20% of supply** reserved at launch, becomes an LP position on the target DEX.
{% endstep %}

{% step %}

#### LP is secured

On **Ethereum**: LP tokens are burned to a dead address — liquidity is permanently locked forever.

On **MegaETH**: the LP NFT (Kumbaya V3 full-range position) is sent to the protocol's LP receiver wallet and held by the protocol.

On **Robinhood**: the LP NFT (Uniswap V4 full-range position) is locked in the TrenchPositionLocker contract (1-year timelock). Tokens graduated before the V4 upgrade hold a Uniswap V3 position instead.
{% endstep %}
{% endstepper %}

From here, the token trades like any ERC‑20 on the DEX. Price discovery continues, arbitrageurs show up, and the token becomes visible on every aggregator that indexes the pool.

### Why LP security matters

There is **no rug path**. The dev doesn't have the keys to pull liquidity. The platform controls the LP only to hold it — not to drain it. The liquidity belongs to the pool, not to any individual.

This is the single most important property of a launchpad. Trench treats it as table stakes.

## Fees

Trench keeps the fee model simple and transparent on the curve. After graduation, the DEX takes over and Trench steps out entirely.

### On the curve

Every trade pays a flat fee, split between the deployer and the protocol. The exact rate and split depend on the chain:

| Chain         | Trade fee | Dev share         | Protocol share     |
| ------------- | --------- | ----------------- | ------------------ |
| **Ethereum**  | 1.25%     | 0.3% (24% of fee) | 0.95% (76% of fee) |
| **MegaETH**   | 1.25%     | 0.3% (24% of fee) | 0.95% (76% of fee) |
| **Robinhood** | 1%        | 0.3% (30% of fee) | 0.7% (70% of fee)  |

No buy tax. No sell tax. No hidden "liquidity fee" coming out of your trade — the trade fee is the whole number.

### At graduation

Graduation costs real ETH. Deploying a DEX pool, seeding initial liquidity, and ensuring the migration succeeds all consume gas. A **listing fee** is deducted from the ETH raised by the curve at the moment of migration — this covers graduation expenses and seeds the initial LP. The rate is **8%** on Ethereum and MegaETH, and **2%** on Robinhood.

The upshot: **no surprise cost after migration**, and no situation where a token gets stuck because graduation couldn't be funded. Every curve that fills up graduates, no friction.

### After graduation

On **Ethereum**, Trench collects no fees after graduation — LP tokens are burned, so no one holds an LP position, and pool fees are effectively unclaimable. Trench is out of the picture.

On **MegaETH**, the Kumbaya V3 LP NFT is held by the protocol's LP receiver wallet. The V3 pool charges a **0.01% fee** on every post-graduation trade, and those fees accrue to the LP position held by the protocol. Trench does not redistribute these fees to token creators or traders.

On **Robinhood**, dev rewards keep flowing after graduation. New tokens graduate to a **Uniswap V4** pool whose LP is locked, and a fee hook charges a **1% fee** on the ETH side of every post-graduation swap, paying **60% to the deployer, 40% to the protocol** — **directly on each swap, with no claim step**. Liquidity still can't be removed — only the swap fees are split. So a Robinhood dev earns twice: the curve fee while trading on Trench, then a share of every DEX swap for the life of the token. (Tokens graduated before the V4 upgrade earn the same 60% split on their Uniswap V3 pool, claimed via the LPFeeSplitter.)

### Dev rewards in detail

If you launched the token, you earn **0.3% of every trade on its curve** for as long as the curve is live.

* **Payout:** Fees are paid in ETH to the **deployer wallet**. There's nothing to configure at launch — the wallet that signed the deploy is the wallet that earns.
* **Where to claim:** The **Fee Vault panel** on the Trench homepage. It's visible to any wallet that has launched at least one token, and it aggregates fees across every token you've ever deployed.
* **One button, one tx:** Claim sweeps all unclaimed fees across all your tokens in a single transaction.
* **After graduation:** Curve fees stop for that token. On Ethereum and MegaETH the DEX takes over and Trench collects nothing for the dev. On **Robinhood**, the dev keeps earning **60% of the Uniswap V4 swap fees**, paid automatically on every swap by the fee hook — no separate claim needed. (Tokens graduated before the V4 upgrade still claim their 60% V3 share via the LPFeeSplitter.)

{% hint style="warning" %}
Dev fees cannot be paid to an X handle, an email, or any off‑chain destination. They always go to the deployer wallet — the one that signed the `launch` transaction.
{% endhint %}

## Next

* [**Getting Started**](/trench-today/getting-started.md) — launch, trade, claim.
* [**API Overview**](/trench-today/for-developers/api.md) — pull curve state, trades, and token metadata into your product.


---

# 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://trench-today.gitbook.io/trench-today/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.
