What Your Blockchain Signing System Is Really Approving
Trail of Bits highlights a core issue in blockchain operations: secure key custody does not stop a signer from approving the wrong payload. The real review target is signer scope, policy enforcement, and what human approvers are able to see before they sign.
Trail of Bits recently wrote about a hard lesson from a high-profile exchange incident: the signing path matters as much as the private key. One detail stands out. A signer can protect key material and still approve the wrong payload.
If you build or operate blockchain systems, this issue reaches far beyond exchanges. Treasury flows, validator operations, bridge relays, deployment pipelines, and admin actions on smart contracts all depend on signing. Most teams focus on who holds keys, where keys live, and how many approvals a transaction needs. Fewer teams ask a harder question. What, exactly, is the signing system able to approve?
This gap sits between cryptography and operations. Your HSM, MPC stack, wallet service, or hardware signer might enforce possession and quorum. It might not enforce intent. If the system signs any syntactically valid payload sent by a trusted upstream service, your real control plane lives outside the signer. That is where you should inspect first.
Model approval, not key custody
Many blockchain security reviews begin with key storage. Cold wallets, HSM-backed hot wallets, MPC clusters, air-gapped devices. Those controls matter. They reduce theft risk from raw key extraction.
They do less against bad approvals.
Start by mapping every action your signing system supports:
- L1 and L2 asset transfers
- Contract calls
- Proxy upgrades
- Role grants and revocations
- Validator exits and withdrawals
- Bridge message attestations
- Off-chain authorizations such as EIP-712 typed data
- Batch operations and meta-transactions
For each action, record four things:
- The exact payload shape.
- The human-readable intent shown to the approver.
- The machine policy enforced before signing.
- The blast radius if approved once.
This exercise often exposes a mismatch. The signer enforces a quorum of people, but no constraint on destination, function selector, calldata pattern, or amount range. In effect, multiple humans approve a blob they do not fully parse.
In blockchain systems, this goes wrong in familiar ways:
- An upgrade signer treats all proxy admin calls as equal.
- A treasury signer approves arbitrary calldata to a known router.
- A bridge signer attests to messages from a relayer without validating message class.
- A validator management tool signs withdrawal credentials changes without independent context.
You want signing authority defined in protocol terms, not UI labels or runbook language.
Put policy next to the signature
A common failure mode is split trust. One system builds a transaction. Another system signs it. The builder knows business rules. The signer knows only quorum and key use.
This design creates a thin waist where malformed or hostile payloads pass through if they come from an approved source.
Move policy checks as close to the signing step as possible. In practice, this means your signer or its immediate gatekeeper should verify fields such as:
- Chain ID
- Nonce strategy
- Destination allowlist
- Value limits
- Function selector allowlist
- Calldata schema
- Upgrade target bytecode hash
- Timelock state
- Message domain separator for typed data
- Expiry windows
For contract administration, selector-level checks are a starting point, not the finish line. Many dangerous actions share a known selector but differ by arguments. A signer policy should parse arguments and enforce invariants.
Examples:
upgradeTo(address)should allow only reviewed implementation hashes.grantRole(bytes32,address)should restrict both role ID and grantee set.approve(address,uint256)should cap spender scope and amount.- Router calls should bind path, recipient, slippage bounds, and deadline.
For typed-data signatures, treat the domain separator and struct schema as first-class controls. Teams often review the displayed message text and ignore domain binding. That is risky. A valid signature over the wrong domain, contract, or chain remains valid cryptography.
If your signer cannot express these checks, put a narrow policy engine in front of it. Keep it deterministic. Version it. Test it like protocol code.
Verify what approvers see
Many incidents are enabled by poor transaction rendering. The approver sees a short prompt, a hex blob, or a vague summary such as “contract interaction”. At that point, your process depends on trust in upstream systems and memory of runbooks.
Treat rendering as a security boundary.
A good approval surface should show:
- Chain and environment
- Contract name and verified address
- Function name and decoded arguments
- Token amounts with units and decimals
- Recipient labels from an internal registry
- Upgrade diff, if the action changes implementation
- Time delay, expiry, and replay scope
- The policy rule matched before approval
This matters even for expert teams. Hex review does not scale under pressure. Nor does informal decoding in a separate block explorer tab.
Where teams slip:
- Address book entries drift from current ownership.
- Proxy calls render as harmless admin traffic.
- Batch calls hide one dangerous subcall among routine ones.
- EIP-712 prompts omit domain details.
- Approvers see decoded arguments, but not the policy exception used.
You should test your approval UI with deliberately confusing payloads. Include edge cases such as proxy admin calls, nested multicalls, permit signatures, and chain IDs used in staging versus production. Measure whether an approver can identify the risky field in under a minute.
If they cannot, your control does not hold under live conditions.
Constrain upstream builders and relayers
The signer is the last gate, but upstream systems shape most of the risk. Transaction builders, bots, relayers, CI jobs, and internal APIs often possess broad authority to assemble requests for signing.
Inspect these systems as if they were privileged code, because they are.
Focus on a few concrete controls:
- Immutable build artifacts for deployment and upgrade jobs
- Two-person review on policy or address-book changes
- Strong separation between staging and production sign flows
- Authenticated, append-only audit logs for sign requests
- Idempotent request identifiers to prevent replay
- Distinct credentials for transaction creation versus submission
- Out-of-band confirmation for exceptional actions
For bridge and validator operations, also inspect message provenance. A relayer should not become an oracle of truth by accident. If an attestation service signs whatever a parser emits, a parser bug becomes signing authority.
A useful review pattern is to trace one critical action end to end. Pick something with high impact, such as a proxy upgrade or a treasury transfer. Then answer:
- Which service formed the payload?
- Which code decoded business intent?
- Which system enforced policy?
- Which people saw the decoded action?
- Which key signed?
- Which logs prove each step?
If more than one answer is “an internal service we trust,” you found an area to tighten.
Test signing controls like an attacker would
Security teams often validate happy paths and access control. They spend less time on approval confusion and policy bypass.
You want adversarial tests aimed at signer semantics.
Build a test set with payloads such as:
- A valid destination with unsafe calldata
- A safe selector with hostile arguments
- A permitted batch with one extra subcall
- A typed-data request with altered domain separator
- A proxy upgrade to bytecode with one unreviewed storage write
- A bridge message of the right format but wrong message class
- A replay of an old request under a fresh wrapper
- A transaction routed through the wrong chain ID
Then check three outcomes:
- The policy engine rejects it.
- The UI renders the dangerous field clearly.
- The audit trail records why it was blocked or approved.
Run these tests after every signer integration change, wallet vendor migration, policy update, and major protocol upgrade. Treat them like regression tests, not annual review items.
For smart-contract teams, tie this back to deployment practice. Your contract audit does not cover operational signing policy unless it explicitly says so. A secure contract behind a weak upgrade approval flow still leaves you exposed.
What to watch next
Expect more attention on intent-aware signing. The market already has strong primitives for key custody. The weak spot is policy granularity, payload decoding, and provable operator understanding.
If you run blockchain infrastructure, review your highest-impact signers first. Admin keys, treasury paths, bridge attestations, and validator controls deserve priority. The core question is simple. If an upstream system goes wrong, what harmful action is your signer still able to approve?