Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Threat-Model Worksheets

A scalability design distributes work across more roles, queues, contracts, and networks. The threat model should follow those interfaces. This appendix provides reusable worksheets for design reviews and incident exercises.

Start With Assets and Outcomes

List what the system protects. Examples include base-layer escrow, L2 balances, ordering fairness, confidential transaction content, data needed for exit, governance authority, proof-signing keys, and the ability to make progress before a deadline.

For each asset, name an unacceptable outcome:

AssetUnacceptable outcomeDetectionRecovery
Bridge escrowunbacked withdrawalsupply and message reconciliationpause, contain, and repair under published process
Rollup stateinvalid root acceptedindependent execution or proof checkschallenge or reject before finality
Transaction dataaccepted state cannot be reconstructedretrieval and sampling failurereject/halt; repair from independent peers
Channel balanceold state settlesbreach monitor sees revoked commitmentsubmit newer state or penalty before deadline
Orderingcensor or reorder beyond policycompare mempool/inbox and block evidenceforced inclusion, alternate sequencer, penalty
Upgrade authorityunauthorized or immediate rule changekey and timelock monitoringcancel, exit, rotate under governance rules

Do not label every outcome "fund loss." Liveness loss, indefinite lock, privacy disclosure, unfair ordering, and unaffordable recovery are distinct harms with different mitigations.

Role Worksheet

Create one row for every actor and automated service:

RoleInputs observedAction controlledCan violate safety?Can halt progress?Replacement path
Sequenceruser transactions, order flowinclusion and orderingonly if proof/contract permits invalid stateyesL1 inbox or another sequencer
Proverwitness and execution traceproof deliverycannot forge under sound verifieryes, by withholdingredundant permissionless prover
DA operatorbatch sharesstorage and deliverymay break recovery assumptionsyesreconstruction, repair, alternate DA policy
Relayersource events and proofsmessage transportno if destination fully verifiesyes if exclusivepermissionless replacement
Upgrade signerproposed code and parametersverifier/bridge changesoften yesoften yestimelock, cancellation, user exit

A role that cannot forge state may still create a severe user loss by blocking a time-sensitive exit. Evaluate safety, liveness, privacy, and ordering separately.

Trust Boundary Worksheet

For each message crossing a boundary, record:

producer and verifier
source and destination domains
canonical encoding and version
freshness: nonce, height, epoch, or expiry
commitment and inclusion proof
source finality rule
data availability requirement
replay and idempotence key
timeout and recovery
upgrade authority for both ends

Then mutate one field at a time. Try a valid message from the wrong chain, an old epoch, a duplicate nonce, a proof against a reorganized root, an unknown version, an expired promise, and a payload whose bytes do not match the committed hash.

A verifier should reject for a specific reason. "Invalid proof" is too broad for incident response when the real problem is an unavailable header or unsupported version.

Adversary Worksheet

Describe capabilities rather than using only labels such as honest or malicious:

  • controls less than, equal to, or more than a consensus threshold;
  • delays, drops, reorders, duplicates, or selectively reveals network messages;
  • corrupts participants before execution or adaptively after observing state;
  • compromises one key, a signing quorum, a client implementation, or a cloud region;
  • submits valid but expensive transactions to exhaust proving, storage, or retries;
  • observes private order flow and trades before public inclusion;
  • withholds data while answering selected samplers;
  • exploits upgrade, pause, or recovery controls;
  • causes correlated failures through shared libraries, hardware, RPC, or time sources.

For every capability, state which property still holds and which can fail. If safety requires fewer than one-third Byzantine weight and liveness requires eventual synchrony, write both conditions.

Economic Worksheet

Security penalties must exceed plausible gain and remain enforceable. Record:

value at risk
maximum gain from one violation
collateral available for penalty
time until collateral can exit
who proves the violation
who executes the penalty
correlated violator set
cost imposed on honest users during defense

A $1 million bond does not secure $100 million of extractable value when the violator can withdraw the bond before evidence finalizes. A challenge reward does not create an honest challenger when proof generation costs more than the reward or access is permissioned.

Rate limits bound loss per time but can extend honest withdrawals. Emergency pauses contain damage but place power in pause keys. Show both sides of every control.

Availability and Deadline Worksheet

Time-sensitive protocols require explicit clocks and margins:

DeadlineStarts atEvidence of expiryCongestion assumptionMiss consequence
Channel disputecommitment inclusionfinalized block heightremedy fits before window closesoutdated state settles
Forced inclusionL1 inbox acceptanceblock/time ruleL1 has capacity under mass usecensorship continues
Fault proofstate proposalsettlement rulechallenger can retrieve data and submitinvalid state finalizes
Cross-domain refundescrow finalitysource timestamp/heightclaim/refund ordering defineddouble claim or long lock
Preconfirmationsigned promisetarget slot/finality evidencesigner and evidence remain availablepenalty or broken promise

Test deadline paths with fee spikes, reorganization, clock skew, delayed evidence, and many users acting at once. Average inclusion time is not a safe deadline margin.

Upgrade Worksheet

Inventory everything an upgrade can change: VM rules, circuit and verifier, bridge decoder, DA network, sequencer set, fee accounting, message domains, pause behavior, and escape paths.

For each change, record proposer, approver threshold, timelock, cancellation, code hash, audit evidence, activation boundary, in-flight message handling, state migration, old-version exit, and rollback policy.

An upgrade that changes a message format needs compatibility rules for already-open channels, escrows, deposits, and withdrawals. An escape hatch controlled by the same immediate key as the main verifier is not independent protection against that key.

Test-to-Claim Matrix

Connect every external claim to evidence:

ClaimRequired testPassing evidence
Invalid state cannot finalizegenerate invalid roots/proofs and exercise disputeverifier rejection or successful challenge before deadline
Sequencer cannot permanently censorstop sequencer and use forced pathtransaction or exit completes within stated bound
Data is availableshut publisher and selected peersindependent reconstruction from authenticated commitment
Messages execute onceduplicate and reorder valid proofsone state transition and stable consumed identifier
Validator-set transition is safeoverlap epoch change with timeout/restartno conflicting commit; light client authenticates new set
Proving keeps upreplay measured job distribution with worker lossbounded queue and recovery within service-level objective (SLO)
Users can mass exitinvoke recovery at modeled scale under congestionrequired population exits within window and budget

If a test demonstrates only the normal path, narrow the claim. A successful proof verification does not demonstrate prover availability. A successful upload does not demonstrate data reconstruction. One user's exit does not demonstrate mass-exit capacity.

Review Output

A completed threat model should produce:

  1. architecture and trust-boundary diagrams;
  2. asset/outcome and role matrices;
  3. adversary and timing assumptions;
  4. protocol invariants and domain-separated message formats;
  5. economic and key-control analysis;
  6. test-to-claim matrix with reproducible evidence;
  7. residual risks, launch limits, and user-visible statuses;
  8. incident runbooks and reassessment triggers.

Threat modeling is not complete when every risk has a mitigation. It is complete enough to act when assumptions, remaining exposure, detection, recovery, and ownership are explicit and testable.