> For the complete documentation index, see [llms.txt](https://whitepaper.after-bell.uk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://whitepaper.after-bell.uk/trading-architecture/order-lifecycle.md).

# Order Lifecycle

Follows an order from submission through matching, cancellation, or settlement.

An AFTERBELL order moves from signed user intent to an outcome-token position, then later to market resolution and redemption.

```
Market selection → Yes / No → EIP-712 signature → CLOB submission
→ matching or USDG-backed minting → settlement → ERC-1155 position
→ resolution → redemption
```

### From selection to settlement

A user selects a defined market, such as “Will NVDA close above $150 on Friday?”, then selects Yes or No. They sign an EIP-712 order without a gas fee for the signature step.

The order enters the off-chain CLOB, which the source associates with Node.js and WebSocket. The CLOB matches compatible orders. The source also permits a path that mints new paired shares from USDG. It does not specify priority, expiration, cancellation, partial-fill, or minting rules.

`CTFExchange` is the identified component for CLOB settlement, signed orders, and batch execution. Smart contracts settle USDG and issue the corresponding ERC-1155 outcome position.

### Resolution follows trading

The position remains tied to the market’s resolution condition. The proposed oracle process checks a Chainlink stock-token feed against the Robinhood REST API. A difference above 5% pauses the market; an administrator may resolve manually using off-chain evidence.

If NVDA closes at $152, Yes wins in the example. A Yes position purchased for $0.72 becomes worth $1.00 and can be redeemed. No becomes worthless. `ConditionalTokens` supports the identified split, merge, and redeem operations.


---

# 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://whitepaper.after-bell.uk/trading-architecture/order-lifecycle.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.
