> 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/technical-architecture/technology-stack.md).

# Technology Stack

Maps each named technology to its architectural responsibility.

### Stack map

AFTERBELL’s stack maps distinct technologies to distinct responsibilities. It is a hybrid design: off-chain components handle interaction, matching, and verification support; on-chain components handle settlement, outcomes, and protocol state.

| Layer                      | Technology                 | Role                             |
| -------------------------- | -------------------------- | -------------------------------- |
| Frontend                   | React                      | User interface                   |
| EVM interaction            | viem                       | Blockchain interaction           |
| Wallet / React integration | wagmi                      | EVM wallet and React integration |
| Matching                   | Node.js                    | CLOB engine                      |
| Real-time transport        | WebSocket                  | CLOB communication               |
| Blockchain                 | Robinhood Chain            | On-chain settlement              |
| Execution                  | EVM                        | Smart-contract execution         |
| Settlement asset           | USDG                       | Settlement                       |
| Outcome standard           | ERC-1155                   | Yes/No positions                 |
| Outcome framework          | ConditionalTokens          | Split, merge, and redeem         |
| Oracle                     | Chainlink stock token feed | Primary price source             |
| Cross-check                | Robinhood REST API         | Secondary verification           |
| Exchange contract          | CTFExchange                | CLOB settlement                  |
| Market contract            | MarketFactory              | Market creation and fees         |
| Resolution contract        | OracleResolver             | Resolution and circuit breaker   |
| Fee contract               | FeeCollector               | Fee handling                     |

### Presentation, interaction, and matching

React is the user-interface layer for market discovery and Yes/No selection. viem and wagmi connect that experience to the EVM-compatible chain. Their role is interaction; they are not the CLOB, oracle, or settlement system.

Node.js and WebSocket support the off-chain CLOB. WebSocket is the identified real-time transport for communication with the matching environment. The CLOB receives EIP-712 signed orders and matches compatible orders. The source does not identify databases, queues, cloud providers, or matching algorithms.

### On-chain settlement and outcomes

Robinhood Chain provides the EVM execution environment. Its chain ID is `4663`. USDG is the stated settlement asset. CTFExchange is the settlement contract for CLOB activity and supports batch execution.

ERC-1155 provides the outcome-position standard. ConditionalTokens provides the outcome framework for Yes and No positions, including split, merge, and redeem. These components represent and settle conditional outcomes. They do not make the off-chain CLOB itself on-chain.

### Market, oracle, and fee components

MarketFactory creates markets and handles associated fee configuration. OracleResolver connects the primary Chainlink stock token feed with the Robinhood REST API cross-check. A disagreement above 5% pauses the market and opens the manual-resolution evidence path.

FeeCollector handles fee collection and distribution. The stated distribution is 70% to the treasury, 20% to market-maker subsidies, and 10% to the keeper bot. The source does not specify treasury infrastructure or transfer mechanics.

### Why the stack is hybrid

```
Off-chain: React, viem, wagmi, Node.js, WebSocket, Robinhood REST API, keeper
On-chain: Robinhood Chain, USDG settlement, ERC-1155, contracts, Chainlink integration
```

The split is architectural. The off-chain layer handles user interaction, matching, and secondary verification. The on-chain layer records settlement, outcome positions, and protocol contract state. Manual resolution evidence remains an off-chain operational dependency.

This division creates clear responsibility boundaries. It does not provide a guarantee of decentralization, availability, or performance.

### Status and boundaries

The stack is a v0.1 September 2026 design for a project still under development. Smart contracts are unaudited, with an audit planned before mainnet. The source does not identify production infrastructure, deployment topology, monitoring, RPC providers, or security guarantees.


---

# 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/technical-architecture/technology-stack.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.
