Overview
Safe multi-sig wallets can’t sign messages with a single key. Instead, you need to:- Propose the order and collect the required number of owner signatures
- Submit the signed transaction to register the order on-chain (PreSign) or off-chain (ERC-1271)
Most multi-sig integrations use PreSign because it’s simpler and doesn’t require handling Safe’s internal signature encoding. Use ERC-1271 when gas costs matter (e.g., frequent trading).
Prerequisites
- A Safe deployed with 2+ owners and a threshold ≥ 2
- The sell token approved for the CoW Protocol Vault Relayer from the Safe
- Safe Protocol Kit installed:
npm install @safe-global/protocol-kit
Method 1: PreSign (Recommended)
PreSign is the simplest approach — you create the order, then execute a Safe transaction to callsetPreSignature on the settlement contract.
1
Create the order with PRESIGN signing scheme
presignaturePending.2
Build the PreSign Safe transaction
3
Collect additional owner signatures
Each additional owner signs the same transaction:
In practice, Safe owners typically sign via the Safe Transaction Service or Safe UI rather than sharing private keys. The Safe SDK supports both approaches.
4
Execute the transaction
Once enough signatures are collected (≥ threshold), any owner can execute:
Using Safe Transaction Service
For production multi-sig flows, use the Safe Transaction Service to propose and collect signatures asynchronously:Method 2: ERC-1271 (Gas-Efficient)
ERC-1271 allows off-chain signing — no gas cost for the signature itself. The settlement contract callsisValidSignature on the Safe to verify.
Python SDK
The Python SDK’sswap_tokens function supports Safe multi-sig orders with the safe_address parameter:
Transaction Batching
For efficiency, you can batch the token approval and PreSign into a single Safe transaction usingMultiSend:
Order Lifecycle
Troubleshooting
Next Steps
- Smart Contract Wallets — PreSign details for the TypeScript SDK
- ERC-1271 Signing — off-chain signing for custom contracts
- Token Approvals — managing ERC-20 approvals