Skip to main content

Overview

CoW Protocol supports multiple signing schemes to accommodate different wallet types and use cases:
  • EIP-712 — Standard wallet signatures with structured data
  • ETHSIGN — Legacy eth_sign RPC method
  • EIP-1271 — Smart contract wallet signatures
  • PRESIGN — On-chain pre-authorized orders

SigningScheme Enum

EIP-712 Signatures

EIP-712 is the recommended signing scheme for standard wallets (MetaMask, Ledger, etc.). It provides human-readable structured data in wallet prompts, type-safe signing with domain separation, and the best user experience and security.

EcdsaSignature Structure

ETHSIGN Signatures

ETHSIGN is deprecated and should only be used for compatibility with older systems. Always prefer EIP-712 when possible.

EIP-1271 Signatures

EIP-1271 enables smart contract wallets (Gnosis Safe, Argent, etc.) to sign orders.

EIP-1271 Magic Value

PreSign Signatures

PRESIGN allows orders to be authorized on-chain before submission. Useful for smart contracts that need to place orders, pre-authorized trading strategies, and orders that don’t require immediate signing.

Signing Order Cancellations

Signature Union Type

Choosing the Right Signing Scheme

Required for Gnosis Safe, Argent, and other smart contract wallets. The contract must implement isValidSignature().
Best for contracts that need to place orders automatically or for pre-authorizing orders before submission.
Avoid using ETHSIGN. Only include for backward compatibility with old systems.

Best Practices

  • Always Use EIP-712: For standard wallets, consistently apply EIP-712 for enhanced security and UX
  • Validate Signatures: Always verify signatures before submitting orders to the API
  • Handle All Schemes: Support multiple schemes to work with different wallet types
  • Test Thoroughly: Test signature creation and validation on testnets first
Last modified on March 12, 2026