> For the complete documentation index, see [llms.txt](https://countertrade.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://countertrade.gitbook.io/docs/battles/battle-rules-and-scoring.md).

# Battle rules and scoring

How a battle is scored, what happens to your positions and orders at the end, how ties break, and why results are final.

The rules that decide who wins, in one place. Scoring, the end-of-room sequence and the refund path are the same in every room. A room's format decides two things on top of that: whether you are ranked on your own result or as part of a side, and how the prize pool is split.

## What decides your result

You're scored on **ROI** — your percentage return on the paper balance the room started you with. Everyone starts from the same balance, so ROI compares players fairly regardless of how anyone traded. The battle's result is your ROI at the moment the room ends.

## What happens when a room ends

At the room's end time, trading stops and the result is locked in, in this order:

1. **Open orders are cancelled.** Any resting limit orders that haven't filled are cancelled — they don't carry over or fill after the end.
2. **Open positions are force-closed.** Every position still open is closed at the room's closing price for its market, turning its unrealized profit or loss into realized. Nothing is left open to keep moving.
3. **Final equity is set.** Your final balance reflects those closes, and your ROI is computed from it. That number is your standing.

## How closing prices are taken

Each market in a room gets one closing price: the last mark price the room recorded at or before the room's end time. Every position on that market closes at that same price, whoever holds it and whatever its size.

* **The end time decides, not the processing time.** Closing the room's positions can take a few seconds after the end time. A mark price from after the end time is never used, so that delay can't change your result.
* **Liquidations stop at the end time.** A position can still be liquidated on a mark price from before the end time, but never on one from after it.
* **The price is recorded once.** If closing is interrupted and resumes, it uses the same recorded price.
* **One price everywhere.** Your closed position, your final result and the room's settlement all use that same recorded price.

If a position never received a mark price, it closes at its entry price with zero profit or loss. If a market has no mark price recorded at or before the end time, each position on it closes at its own last mark price. Every other position closes at the room's closing price even if the loss is larger than you can cover: an [isolated margin](/docs/trading/isolated-and-cross-margin.md) position loses at most its own margin, and cross margin positions can take your free paper balance down to zero but never below it.

## How ties break

Ranking is by ROI, highest first. Ties break in a fixed order: higher **final equity**, then **smaller maximum drawdown** — the player whose balance dipped less along the way ranks higher — then a fixed internal order that always resolves. Because everyone in a room starts from the same paper balance, equal ROI usually means equal equity too, so drawdown is the step that decides most ties. The chain is deterministic either way, so there's never an ambiguous result.

## Team battles (5v5)

In a 5v5 room, each side's score is the **combined PnL** of its five members, and the side with the higher combined total wins. This is the one format where your own ROI does not decide your outcome — you win or lose with your side. The prize pool is then split **equally** among the five winners; if it doesn't divide evenly, the small remainder goes to the winning side's best-placed member. If the two sides tie exactly, the side of the single top-ranked player wins. See [Room formats](/docs/battles/room-formats.md) for the other formats.

## Cancellation and refunds

A room that doesn't reach its minimum number of players by the join deadline is cancelled and never runs; every entry fee is refundable. Separately, if a room runs but its result can't be settled within the settlement window (about a day after it ends), it can be converted to a cancelled room and refunded. Either way you claim your entry fee back yourself. See [Claims and refunds](/docs/funds-and-settlement/claims-and-refunds.md).

## Results are final

There's no dispute process — once a room settles, you can't file a claim to re-open or re-score it. Results are computed off-chain from the recorded trades, validated, and signed before they're committed on-chain, and you can check your own payout against that committed record (see [Settlement](/docs/funds-and-settlement/settlement.md)). If a room can't be settled at all, the refund path above returns entry fees rather than leaving them stranded.

## Rating

Finishing a **ranked** battle also moves your rating. How much depends on where you place, your ROI, and who you faced; the exact model is versioned and can be tuned, so it isn't part of the fixed battle rules above. See [Rating](/docs/ratings-and-competition/rating.md).

## Related

* [How battles work](/docs/battles/how-battles-work.md)
* [Room formats](/docs/battles/room-formats.md)
* [Leaderboards](/docs/ratings-and-competition/leaderboards.md)
* [Settlement](/docs/funds-and-settlement/settlement.md)
