The honest comparison · local Foundry tests
Four designs, three failures.
The same attacks against designs that each hold a 20 QOR treasury. D is OpenZeppelin 5.6.1’s MultiSignerERC7913, unmodified, holding the same ML-DSA verifier and Bedrock’s LMS verifier. Each cell records what the attacker took, whether the owner still controls the treasury afterwards, and whether a legitimate payout completes.
K
One ML-DSA key stolen
The attacker holds a copy of one ML-DSA key. The verifier works correctly.
F
Every ML-DSA signature forgeable
The ML-DSA verifier accepts forgeries, so the attacker can sign as every ML-DSA key at once.
O
ML-DSA verifier rejects everything
The ML-DSA verifier rejects every signature, valid ones included. Nobody is attacking.
CBedrock
ML-DSA primary, LMS recovery root
- One ML-DSA key stolen
- 2 lostthen recovers
- Every ML-DSA signature forgeable
- 2 lostthen recovers
- ML-DSA verifier rejects everything
- keeps payingLMS root, no pqcVerify call
- Routine payout needs
- ML-DSA alone
ASingle ML-DSA key
one key controls everything and rotates itself
- One ML-DSA key stolen
- 20 lostcontrol lost
- Every ML-DSA signature forgeable
- 20 lostcontrol lost
- ML-DSA verifier rejects everything
- frozenno other root
- Routine payout needs
- ML-DSA alone
BML-DSA + ML-DSA guardian
Bedrock's rules, second root from the same family
- One ML-DSA key stolen
- 2 lostthen recovers
- Every ML-DSA signature forgeable
- 20 lostcontrol lost
- ML-DSA verifier rejects everything
- frozenguardian is ML-DSA too
- Routine payout needs
- ML-DSA alone
D1OpenZeppelin multi-signer, 1-of-2
MultiSignerERC7913 5.6.1 with an ML-DSA and an LMS signer
- One ML-DSA key stolen
- 20 lostcontrol lost
- Every ML-DSA signature forgeable
- 20 lostcontrol lost
- ML-DSA verifier rejects everything
- keeps payingthe LMS signer pays alone
- Routine payout needs
- ML-DSA alone
D2OpenZeppelin multi-signer, 2-of-2
both families sign every operation
- One ML-DSA key stolen
- 0 lostkeeps control
- Every ML-DSA signature forgeable
- 0 lostkeeps control
- ML-DSA verifier rejects everything
- frozenevery payout needs ML-DSA
- Routine payout needs
- ML-DSA + 1 LMS signature
D3OpenZeppelin multi-signer, 2-of-3
one ML-DSA and two LMS signers
- One ML-DSA key stolen
- 0 lostkeeps control
- Every ML-DSA signature forgeable
- 0 lostkeeps control
- ML-DSA verifier rejects everything
- keeps payingtwo LMS keys sign
- Routine payout needs
- ML-DSA + 1 LMS signature
Failures are simulated with mock verifiers and handed-over keys; no algorithm is broken.docs/results/baselines.jsonBaselineComparison.t.sol
Reading the table
Where another design does better, that comes first.
B equals Bedrock under key compromise.
A second root from the same family contains one stolen key just as well. It falls with the family: under forgery, the guardian signs as readily as the primary.
D2 and D3 beat Bedrock under key compromise and forgery: they lose nothing.
They pay for it on every operation, because an ML-DSA signature alone moves nothing. Each payout spends a leaf of a stateful hash-based key (an H10 key has 1,024), so that key must be online and managed for daily use instead of kept offline. D2 also freezes when the ML-DSA verifier fails.
D1 pays with ML-DSA alone, as Bedrock does, and loses everything.
One threshold governs every operation, so a single ML-DSA signature can remove the LMS signer and lift the limit.
Bedrock's contribution is the combination.
Routine payouts need one family, and a failure of that family, key or verifier, still costs at most the budget. The other family can always retire it, and then the contract keeps paying.
Live on diana · repeated across periods
A period limit refills. A cap does not.
The table above runs once. Here, a stolen key keeps coming back, and nobody responds. Two vaults, identical except for the cap, share one ML-DSA-87 key. A test account holding a copy of it took the most each vault allowed, once per period. The periods are three minutes long so that five fit in a quarter of an hour; the contract treats a day the same way.
| QOR taken, period | 1 | 2 | 3 | 4 | 5 | Lost |
|---|---|---|---|---|---|---|
| Period limit only | 0.02 | 0.02 | 0.02 | 0.02 | 0.02 | 0.10 |
| With Bedrock’s cap | 0.02 | 0.02 | 0.01 | refused | refused | 0.05 |
Both started with 0.15 QOR and the same 0.02 QOR limit per 3-minute period. The period-only vault lost 0.10 QOR and keeps paying the copied key every period until its treasury is empty. The capped vault lost 0.05 QOR, its cap, and then refused every payout and every other route the key tried.
Every other route the copied key tried on the capped vault5 refused
- refusedcapped · attacker schedule an obligation of 0.01 QOR to itself
ExposureExceeded - refusedcapped · attacker delegate a 0.01 QOR allowance to itself
ExposureExceeded - refusedcapped · attacker checkpoint, to reset the cap
DualRequired - refusedcapped · attacker set a policy with a 1 QOR cap
DualRequired - refusedcapped · attacker pass a 1 QOR cap off as a tightening
PolicyNotTighter
Then the capped vault’s owner responds.
One LMS signature installs a new ML-DSA key. The new key starts with the cap the copied key spent, so its budget returns only when both roots sign a checkpoint, after the activation delay. The period-only vault is left as it was, with a user withdrawing in full while the copied key is still live there.
The response, transaction by transaction10 events
- sentperiod-only · user deposits 0.1 QOR0xbec62492…
- refusedperiod-only · attacker payout 0.06 QOR to itself, the treasury plus part of the deposit (copied key)
InsufficientTreasury - sentperiod-only · user requests withdrawal of 0.1 QOR0x723497d9…
- sentcapped · relayer submits LMS-signed incident installing a new ML-DSA key0x56bec564…
- refusedcapped · attacker payout 0.01 QOR to itself (copied key)
PrimaryKeyMismatch - refusedcapped · attacker declare an incident reinstating itself (copied key)
PrimaryKeyMismatch - refusedcapped · relayer new key alone: payout 0.01 QOR to the owner
ExposureExceeded - sentperiod-only · user claims the withdrawal0x12e8da14…
- sentcapped · relayer submits a checkpoint signed by the new ML-DSA key and the LMS key0xad782bd3…
- sentcapped · relayer new key alone: payout 0.02 QOR to the owner0x0aec998b…
period-only 0x7ca464…0c59 · capped 0x4b5584…a1darun: 9/9 checks passed · response: 8/8 checks passedg4-exposure-live.jsong4-exposure-response.jsonexposure.ts
With existing tools
What it would take to build Bedrock's guarantees on OpenZeppelin.
Every part can be built on existing frameworks. What Bedrock adds is the five together, as one inheritable contract with tests.
- 01Per-operation thresholdsSigner and module changes need both families while payouts need one. OpenZeppelin 5.6.1 applies one threshold to everything.
- 02A cumulative single-family capA per-period limit lets a stolen key spend its limit every period. The total must also be capped, and only both families may reset it.
- 03An incident operationA recovery-only action that retires the primary and voids every grant it left pending, across every module, in one step.
- 04No call to the failed verifierAfter an incident the primary's verifier is never called, so a reverting or rejecting pqcVerify cannot freeze the account.
- 05User rights outside authorityBalances and withdrawal requests that no root can reach. This is application design, not an account feature.
Reproduce it
make verify runs the comparison with the rest of the suite and rewrites baselines.json. The OpenZeppelin files are an unmodified subset of 5.6.1, with checksums you can compare against the published npm package.