> For the complete documentation index, see [llms.txt](https://learn.trovemarkets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.trovemarkets.com/trove-x-polymarkets/settlement-and-resolution.md).

# Settlement & Resolution

This is done with the `haltTrading` action:

* cancels open orders
* settles positions to the current mark price
* can later resume trading (recycle the asset)

***

### How Trove defines “resolution”

For prediction-style perps, Trove must define a public rule for settlement.

Recommended design:

1. **Resolution source:** Polymarket resolution (onchain events)
2. **Final outcome value:**
   * YES → `p_final = 1`
   * NO → `p_final = 0`
3. **Finalization window:** wait for resolution to be confirmed/finalized (dispute window / confirmation period)
4. **Convergence:** drive oracle/index + mark inputs toward `p_final`
5. **Settlement trigger:** when mark is sufficiently close to `p_final`, execute `haltTrading`

***

### Why a finalization window matters

Even if the final outcome is known, market prices may move fast.

HIP-3 mark updates are rate-limited (mark moves are clamped), so Trove may need a short window to converge mark toward the final value before settlement.

A transparent “finalization window” prevents confusion and keeps settlement fair.

***

### Emergency halts

Trove should be prepared to halt trading if:

* the Polymarket feed is unavailable beyond a threshold
* abnormal data suggests manipulation or corruption
* there is uncertainty about the event’s resolution

When halted:

* oracle updates should continue (if required) using the best available fallback
* trading remains paused until safety conditions are met

***

### Post-settlement

Once halted and positions are settled:

* Trove can leave the asset halted permanently, or
* recycle the asset (e.g., for a new dated contract)


---

# 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:

```
GET https://learn.trovemarkets.com/trove-x-polymarkets/settlement-and-resolution.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
