Skip to main content
DEX aggregator using batch auctions and Coincidence of Wants (CoW) to match overlapping orders.

What it offers

  • preSignOrder: Pre-sign an order on-chain for execution by solvers
  • invalidateOrder: Cancel/invalidate a pending order

Notes

  • Batch auctions match Coincidence of Wants (overlapping orders) first
  • Orders are typically signed off-chain and submitted to CoW Protocol API
  • setPreSignature is for smart contracts/multisigs that cannot produce ECDSA signatures
  • orderUid encodes: order hash + owner address + validTo timestamp
  • Same settlement contract on both Ethereum and Arbitrum
  • Approve tokens to the GPv2VaultRelayer (not settlement contract) before trading

Its names in a program

On Ethereum, Cowswap is a namespace: its contracts need no import.

Deployments

ABI

GPv2SettlementABI

import GPv2SettlementABI from "./protocols/cowswap/GPv2SettlementABI.json"; Speaks for: gpv2Settlement.
  • setPreSignature(bytes orderUid, bool signed)
  • invalidateOrder(bytes orderUid)

Next steps