Web3 Liquidity Resolution & CLOB Order Routing
on-chain order execution
Published: 2026-06-20 | Project: Bet Bodhi | Discipline: Web3 Primitives & Cryptographic Routing
Author: Nicholas Alexander MacAskill — Founder & CTO, Flocano Labs | Canonical: https://www.nicholasmacaskill.com/dossier/polymarket-clob-pipeline
Ethers.js v6 Signer Adapter
The @polymarket/clob-client SDK expects an Ethers v5 signer. A custom signature adapter bridges v6 wallet declarations without duplicating dependency weight and handles the SignatureType.POLY_PROXY execution structure for proxy wallets:
const signerAdapter: any = {
getAddress: async () => wallet.address,
signMessage: async (message: string | Uint8Array) => wallet.signMessage(
typeof message === 'string' ? message : ethers.hexlify(message)
),
_signTypedData: async (domain: any, types: any, value: any) => {
const { EIP712Domain, ...restTypes } = types;
return await wallet.signTypedData(domain, restTypes, value);
},
connect: () => signerAdapter
};Execution Flow
Orders are placed as bounded limit orders using resolved contract tokens. To protect against slippage, execution limits are bounded dynamically:
$Execution Price = \min(Target Price + 0.05, 0.99)$
If POLY_PROXY_ADDRESS is specified in the environment, the client routes transactions through the proxy, verifying USDC.e on-chain balances on the Polygon network prior to order submission.