> For the complete documentation index, see [llms.txt](https://funarchy.gitbook.io/funarchy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://funarchy.gitbook.io/funarchy/security-for-prediction-market/trading-mechanism/clob-risks.md).

# CLOB Risks

Platforms adopting CLOB aim to achieve tight spreads and sophisticated price discovery by directly matching limit orders between buyers and sellers, assuming a sufficient user base and trading volume.

However, the CLOB structure of the prediction market may have business flaws different from TradiFi due to issues with signature (authorization) processing, parameter verification, and MarketID design.

### Defi CLOB vs PM CLOB

<table><thead><tr><th width="124.1588134765625">Assortment</th><th>Existing CLOB</th><th>PM CLOB</th></tr></thead><tbody><tr><td>Transaction target</td><td>Digital assets (e.g. BTC)</td><td>Share the outcome of a specific event (e.g. YES share)</td></tr><tr><td>Meaning of price</td><td>Market value of the asset (Value)</td><td>Probability of an event occurring (Probability)</td></tr><tr><td>Price range</td><td>Theoretically unlimited (0 to ∞)</td><td>$0 ~ $1 (or 0% ~ 100%)</td></tr></tbody></table>

### Signature verification method

The order book model of the prediction market uses EIP-712 to manage orders, and order exchange between users is done in a peer-to-peer manner based on signatures.&#x20;

In general asset markets, signature invalidation is mostly managed based on `nonce`, but in PM, since the `marketId` and `tokenId` for each market are different, it is necessary to verify that the combination of `marketId` + `tokenId` as well as `nonce` is correctly included when creating a signature.

If this verification is missing, the signature may be reused on other markets.


---

# 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://funarchy.gitbook.io/funarchy/security-for-prediction-market/trading-mechanism/clob-risks.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.
