Polymarket CLOB V2 EIP-712 Order Signing: Debugging Invalid Signatures
A field-by-field debugging guide for raw Polymarket CLOB V2 order signing, signature types and mismatches between signed data and the POST body.
A field-by-field debugging guide for raw Polymarket CLOB V2 order signing, signature types and mismatches between signed data and the POST body.
Separate API authentication from order signing
ClobAuth credentials authenticate the request, while EIP-712 authorizes the order. A valid API header does not prove the order struct, domain separator or signer is correct.
Use the V2 domain and contract
Raw signers must use the Exchange EIP-712 domain version 2 and the current V2 verifying contract. Log chain ID and verifying contract without logging private material.
Construct the signed struct exactly
V2 uses timestamp, metadata and builder in the signed order data. Field types and order matter. Side is encoded numerically in typed data even when the wire request uses a string representation.
Do not confuse expiration and timestamp
The timestamp is part of the signed V2 struct and provides order creation uniqueness. GTD expiration can remain in the POST body but is not the same signed field.
Validate signer and funding model
EOA, proxy, Safe and deposit-wallet flows use different signature types and funder addresses. Recover the signer from the final typed-data digest and compare all addresses byte-for-byte.
Prefer fixtures over production guessing
Generate one known order with the official V2 SDK, store its typed data and compare each encoded field against the custom implementation. See the official V2 migration guide or hire TierZero for Polymarket integration.
Production checklist
Before launch, define ownership, test fixtures, failure states, alerts and a rollback procedure. For a scoped engineering review, use the TierZero project form.
Building this for production?
We turn this architecture into tested, non-custodial software with monitoring, documentation and deployment support.
Related technical guides
Build a Polymarket Market-Making Bot in Python (2025)
End-to-end tutorial for building an automated market maker on Polymarket using the CLOB API: quoting both sides of a binary market, managing inventory, adjusting spreads on news events, and tracking P&L in USDC.
Read articlePolymarket Market-Making Bots: Quoting Both Sides of YES/NO
A technical breakdown of how market-making bots quote binary outcome shares on Polymarket's CLOB, manage inventory skew, and protect P&L through resolution.
Read articlePolymarket Conditional Token Framework: A Technical Deep Dive
Polymarket's positions are ERC-1155 conditional tokens minted via Gnosis's CTF contract on Polygon. This deep dive explains how conditions, partitions, and the CTF Exchange contract underpin every trade, resolution, and redemption on the platform.
Read article