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
Polymarket API Authentication in Python: Wallet and CLOB Setup
Configure Polymarket CLOB authentication in Python: signer types, API credentials, EIP-712 signatures and a safe first order using py-clob-client.
Read articlePolymarket Arbitrage: Where the Edge Actually Is
Prediction markets misprice constantly. Here's where the real arbitrage lives on Polymarket — complementary outcomes, cross-market relationships and resolution mechanics.
Read articleSplitting & Merging Polymarket CTF Positions Programmatically
A working guide to Polymarket conditional tokens split merge calls on the Gnosis CTF, and how bots trade the 1.00-sum invariant across binary outcomes.
Read article