> For the complete documentation index, see [llms.txt](https://docs.lighter.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lighter.xyz/trading/guilds/guild-duels.md). Agents can also search and read this documentation through its [MCP server](https://docs.lighter.xyz/~gitbook/mcp).

# Guild Duels

A duel is a head-to-head contest between two guilds on an agreed metric, over an agreed period, for an agreed USDC stake per side. Both stakes are held in a Lighter escrow account; the winning guild receives the whole pot. Only guild leaders act in a duel.

## Terms

Leaders negotiate the terms with a challenge and, optionally, counteroffers:

| Term                | Allowed values                                                                            |
| ------------------- | ----------------------------------------------------------------------------------------- |
| Metric              | Median ROI, Guild ROI, PnL, Volume, ROI × √Volume (see [Scoring](#scoring)). Higher wins. |
| Stake per guild     | 100 – 100,000 USDC                                                                        |
| Start time          | On the hour, more than 24 hours and at most 30 days from now                              |
| Duration            | 24 hours, 3 days, 7 days or 14 days                                                       |
| Minimum roster size | At least 1, at most the member limit (`max_members`) of the smaller guild                 |
| Message             | Optional, up to 280 characters                                                            |

## Lifecycle

1. **Challenge (proposed).** A leader challenges another guild. A guild can have at most 5 open outgoing challenges and one pending challenge per target. The guild that received the offer can decline it or counter; the guild that sent it can cancel. The challenged leader can **counter** with new terms, which replaces the pending offer (previous offers show as *superseded*). An offer expires after 48 hours, or earlier so that accepting it still leaves 24 hours before the start.
2. **Accept (accepted).** Accepting locks the terms and **both rosters**. Each guild can have only one committed duel at a time (accepted, funded or live); accepting a duel declines all other open proposals of both guilds.
3. **Fund (funded).** Each leader sends exactly the stake in USDC from one of their accounts to the Lighter escrow account, with the duel's memo, within **24 hours** of acceptance. If either side misses the funding deadline the duel is **voided** and any stake already sent is refunded. A leader can still cancel an accepted duel until the first stake is confirmed; after that it can only be voided by the deadline.
4. **Live.** The duel starts at the agreed start time (it must be funded by then). Scores update hourly.
5. **Finished → settled.** About 2 hours after the end time (so the last hour of PnL data is complete) the final score is written. The pot is paid to the winning guild's leader account; on a tie each side gets its stake back. Settlement is on-chain and shows on the duel page as payouts/refunds with transaction hashes. No fee is charged on duels.

Duels that reach *funded* and later are public. Proposals and counteroffers are visible only to the two guilds involved.

## Rosters

* While a duel is proposed, each leader can draft a roster from the guild's members (any members, not only those opted in).
* On acceptance both rosters lock. A draft shorter than the minimum roster size is **topped up automatically** to the minimum: members who are *available for guild duels* are picked first, then the rest of the guild. A guild can therefore never dodge a duel it accepted; if the whole guild is smaller than the minimum, the duel is voided.
* Members can toggle **Available for guild duels** on their guild page; it only sets the auto-selection preference (on by default).
* Roster members cannot leave or be removed from the guild while the duel is committed (accepted, funded or live), and leadership cannot be transferred during a duel.

## Scoring

Each roster member is scored over the duel window `[start, end)`:

* **PnL** — change in transfer-adjusted account equity across all the member's accounts (deposits/withdrawals and transfers to or from other owners are netted out, so only trading PnL counts).
* **Capital** — account value at the start plus the highest net external inflow reached during the duel (so a deposit used for trading counts once, withdrawals never shrink it), with a floor of 500 USDC so tiny accounts cannot post huge ROIs.
* **ROI** — PnL / Capital.
* **Volume** — trading volume during the window.

The guild's score under each metric:

| Metric        | Guild score                               |
| ------------- | ----------------------------------------- |
| Median ROI    | Median of roster members' ROI             |
| Guild ROI     | Σ PnL / Σ Capital of the roster           |
| PnL           | Σ PnL                                     |
| Volume        | Σ Volume                                  |
| ROI × √Volume | Σ over members of ROI × √(volume in USDC) |

The guild with the higher score wins; equal scores are a tie.

## Record

Every guild shows a W-L-T record and its last five results on the guild list, ladder and guild page.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lighter.xyz/trading/guilds/guild-duels.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
