Multisig Wallets, Read From the Source: How 2-of-3 Fails and What It Still Buys You

Every signature on Bybit's $1.5 billion transfer in February 2025 was cryptographically valid. OP_CHECKMULTISIG did exactly its job: it counted. Reading the opcode, the tapscript counter and the threat model explains what a threshold really protects.

On 21 February 2025, at around 12:30 UTC, three people sat down to approve a transfer they had approved in one form or another many times before: move funds from a cold wallet to a hot wallet. Three signers. Three screens. Three hardware devices, each held by a different person. On every one of those screens the transaction looked completely normal — the destination they always used, the amounts they expected, the interface they’d used a hundred times. Each of them pressed the button. Over 400,000 ETH and stETH, worth more than $1.5 billion, went to an address none of them had agreed to send it to.

I keep coming back to that scene, because it breaks an intuition I held for years without ever examining.

A multisig threshold counts how many valid signatures a transaction carries. It does not — and cannot — check that the thing those signatures authorize is the thing the human beings believed they were authorizing. 2-of-3 is genuinely good at surviving a lost key, and genuinely good at surviving a stolen key. It is worth approximately nothing against three signers reading the same lying screen. The threshold counted correctly that morning. It just counted the wrong object.

So let’s open the machinery. When you see what OP_CHECKMULTISIG literally does — and what it literally does not do — that transfer stops looking like a freak event and starts looking like the predictable result of a design assumption nobody wrote down.

WHAT A 2-OF-3 THRESHOLD ACTUALLY COUNTS

Two signatures out of three — every one of them cryptographically valid.

Every signature on that transfer was valid, and the threshold accepted them, because counting valid signatures is exactly its job. What no opcode in the script can do is check whether the three people at those screens were reading the truth.

The screen is where the trust actually lives

Let me get the forensics on the table first, because they matter more than my opinions do.

The malicious JavaScript was served from an AWS S3 bucket belonging to Safe{Wallet}, last modified on 19 February 2025 — two days before the heist. It was not blunt: it carried an activation condition, firing only when the transaction source matched one of two contract addresses. One was Bybit’s own. The other is assessed as an attacker address. So the payload sat inert until the routine-looking rebalance it was built for.

Then the detail that tells you who you’re dealing with: roughly two minutes after the malicious transaction hit the chain, a new version of the JavaScript was uploaded with the injection removed. Someone watched the confirmation and cleaned up behind themselves.

As for the origin: Safe Ecosystem Foundation’s own statement is that the attack was carried out through a compromised Safe{Wallet} developer machine used to present a disguised transaction. Reporting, BleepingComputer among others, says that developer’s Mac laptop was compromised as early as 4 February 2025 via a malicious Docker project, and that a hijacked AWS session token let the attacker walk past MFA. Investigators found no evidence that Bybit’s own infrastructure was breached. On 26 February 2025 the FBI attributed the operation to North Korea, under the TraderTraitor label.

Every signature on that transfer was cryptographically valid. That sentence is the whole article; the rest is footnotes.

Multisig Wallets, Read From the Source: How 2-of-3 Fails and What It Still Buys You
The Metropolitan Museum of Art, CC0, via Wikimedia Commons

What OP_CHECKMULTISIG actually does

Here is the thing I want you to read rather than take my word for. Two script shapes, side by side:

# ECDSA multisig, witness script form
witness:  0  ... 
script:   m  ...  n OP_CHECKMULTISIG
# Per-key form, tapscript
witness:   ... 
script:    OP_CHECKSIG  OP_CHECKSIGADD ...  OP_CHECKSIGADD m OP_NUMEQUAL

Read the first one slowly. OP_CHECKMULTISIG pops n public keys, pops m signatures, then does the most literal thing imaginable: it matches signatures against keys, in order, and counts how many matched. Reaches m, success. That’s the entire security model, in one opcode.

What is not in there: any notion of intent. Any notion of “did signer 2 look at the same bytes as signer 1.” Any notion of a display. The opcode receives a byte string and a set of keys; it has no channel to the user’s eyeballs and no way to build one. It verifies a signature over a message. Who showed you that message is outside its model of the world.

Every signature on that transfer was cryptographically valid. The threshold counted correctly. It just counted a different transaction than the three people at those screens believed they were signing — and no opcode in that script could have noticed.
Sygnia / Verichains, forensic findings
Bybit, 21 February 2025

An off-by-one bug everyone agreed to keep

Look at that leading 0 in the witness: 0 <sig_1> ... <sig_m>.

That zero is a dummy element. It exists because of an off-by-one bug in the original OP_CHECKMULTISIG implementation — the opcode pops one more item off the stack than it should. Rather than fix the opcode and invalidate every existing multisig script in circulation, the ecosystem standardized the workaround: always push a junk element first, forever.

I’m not telling you this as trivia. It’s the clearest demonstration of what consensus actually is. A bug was found; the fix was not applied. Instead every wallet, signer and script in the world agreed to encode the workaround, permanently, into every future multisig transaction. Consensus is not “the correct rules.” Consensus is “the rules we can all still agree to run.” If your threat model assumes consensus protects you from mistakes, that assumption has a counterexample sitting inside the opcode you’re relying on.

OP_CHECKSIGADD: a counter that needs no initializer

The tapscript form is more interesting, and it’s the one I’d point at if you want to see how a “counter” gets built out of a stack machine.

Each w_i in the witness is either a signature for that key, or an empty vector. Then:

# OP_CHECKSIGADD is, semantically, this squeezed into one byte:
OP_ROT OP_SWAP OP_CHECKSIG OP_ADD
# and the empty-vector case is why no OP_0 initializer is needed:
if w_i is empty      -> push n          # this vote is skipped, counter unchanged
if signature valid   -> push n + 1
if signature invalid -> abort immediately

Two details I like. First, the skip: an empty vector makes OP_CHECKSIGADD push the running count n straight back unchanged. The counter doesn’t move. That’s how you express “this key abstained” without branching. Second, because the sequence opens with plain OP_CHECKSIG on the first key, there’s no need to prime the stack with OP_0 — the first real check establishes the counter. And OP_CHECKSIGADD itself is OP_ROT OP_SWAP OP_CHECKSIG OP_ADD squeezed into one opcode byte: four operations, one byte, because script weight is consensus-visible and weight costs money.

Notice what it’s still doing, though. Still counting. Just more elegantly. It counts better than OP_CHECKMULTISIG — no dummy element, no quadratic signature matching — but the thing counted is still “how many of you signed these bytes,” never “do these bytes mean what you think.”

Two places to put a threshold

There is a fundamental difference between ECDSA multisig and Schnorr aggregated signatures. With ECDSA, each signer produces an independent signature, and the threshold is decided by consensus while the script executes. With Schnorr aggregation the threshold is already fully determined in the cryptography, before anything reaches the chain — the chain sees one key and one signature.

Script multisig (ECDSA)MuSig2 / FROST (Schnorr)
What’s on chainn public keys, k separate signaturesone aggregated key, one signature
Can an observer read the policy?Yes — anyone can count k-of-nNo — neither threshold nor membership is visible
Signer-to-signer communicationNone requiredRequired (nonce rounds)
Availability requirementSigners can sign at different timesParticipants must be online together
Nonce stateStatelessStateful; reuse is catastrophic
Changing the signer setNew address, move the fundsNew DKG or new aggregation; may be invisible on chain

Read that table as a trade, not a ranking. On-chain transparency of the policy is the same feature as on-chain transparency of your governance. You can’t have “everyone can see this is a 2-of-3” without also having “everyone can see how many people control this money and when it changed.”

Multisig Wallets, Read From the Source: How 2-of-3 Fails and What It Still Buys You
Birmingham Museums Trust, CC BY 2.0, via Wikimedia Commons

The threat model nobody writes down

Here’s the table I wish every treasury doc opened with. Rows are threats, column is whether a conventional script multisig stops them.

ThreatDoes script multisig stop it?Why
One key is lostYesEnough honest signers remain to reach m
One key is stolenYesThe thief still needs a second key
A signer is coerced or social-engineeredPartlyDepends entirely on whether the others verify independently
The signing interface is compromised / blind signingNoValid signatures over attacker-chosen bytes are indistinguishable from valid signatures over intended bytes
Signers at or above threshold colludeNoThat’s the policy saying yes, correctly
All signers share one compromised software supply chainNoCorrelation collapses n independent approvals into one

That last row is the Bybit row. And the row above it is why “just add more signers” is no answer either: if your five signers all run the same app, sourced the same way, on the same platform, you have not built five approvals. You have built one approval with five witnesses.

Read it on the device’s own screen

The browser tab can be swapped out from under you. The hardware wallet’s display is the last surface the attacker doesn’t control — if you don’t read it there, you verified nothing.

Independence is the actual security property

If three signers run the same app on the same machine image, you don’t have three signers. You have one signer wearing three hats.

Plan for absence, not just for theft

People leave, devices die, keys go missing. A recovery path with a time lock turns “we lost a signer” from an incident into a scheduled inconvenience.

That last one deserves expansion, because it’s the failure mode nobody rehearses. Most multisig setups I’ve seen are hardened against adversaries and quietly undefended against ordinary attrition. The mechanisms are the ones that also protect you from theft — a seed phrase you can actually restore from, plus a documented recovery path — but they only work if somebody tested them while nothing was on fire.

MuSig2: the threshold moves off-chain

Now the interesting half.

MuSig2 was merged as BIP-327 in March 2023. The properties, stated plainly:

  • It is n-of-n, not k-of-n. I want to be loud about this because it’s the single most common thing people get wrong. MuSig2 does not give you “2-of-3.” It gives you “all of you, or nothing.” If you want a threshold with MuSig2, you build it out of n-of-n constructions, or you use something else.
  • It takes two rounds of communication. Key aggregation itself is non-interactive — you can compute the aggregated key from the individual public keys without a round trip — but signing needs two.
  • The output is a single 64-byte BIP340 signature, and on chain it is indistinguishable from an ordinary single-key Taproot key-path spend. Not “hard to tell apart.” Indistinguishable.
  • It has no fault tolerance. One participant drops out and the signing session produces nothing.
  • Reusing the same secret nonce leaks the private key. This is not a degraded-security warning. This is full key compromise, and it’s why nonce management is stateful and why you should not hand-roll this.

Why accept all that? Because of point 3. If your policy is publicly readable on chain, an attacker knows exactly how many people to target. If the spend looks like one person walking their own dog, there is no policy to read, no membership to enumerate, no signal that this is institutional money. MuSig2 doesn’t make the cryptography stronger than multisig — it makes the target less legible. Different axis, different threat.

FROST: when “someone is missing” is the normal case

FROST is the answer to MuSig2’s harshest limitation. It is t-of-n — a real threshold, in the cryptography, before anything is broadcast.

The costs are honest ones. You need a distributed key generation ceremony, or you trust a dealer to produce the shares. In exchange you tolerate n−t participants being unavailable — the difference between a protocol that works on a holiday weekend and one that doesn’t. IETF published it as RFC 9591 in June 2024, which is about as close to “this is boring now” as cryptography gets.

The trade-off I’d flag: FROST moves the threshold somewhere you can no longer audit from the chain. With script multisig, a third party reads the script and verifies your policy. With FROST, that verification lives in a DKG transcript and in your key management, and if you botch the ceremony the mistake is invisible to every observer forever. You’re trading public verifiability for privacy and fault tolerance. That can be the right trade. It is a trade, not an upgrade.

And, to be fair to both sides: none of this protects the screen. Aggregation changes who can see your policy; it does not change what your signing device displays. A FROST signer reading a poisoned interface produces a valid share over attacker-chosen bytes, exactly like an ECDSA signer does.

Discharge summary

Diagnosis

The cryptography worked flawlessly that morning, on both sides: the attacker’s signatures were real, and the threshold accepted them, because accepting them is its job. The disease is a correlation failure — three approvals treated as independent because three people made them, when in software terms they all came from one browser, one JavaScript bundle, one S3 bucket, one compromised laptop. Multisig’s promise is independence. The deployment removed the independence and kept the vocabulary.

What I ruled out

I don’t think “add a fourth signer” is the fix, and I don’t think “use a different wallet” is the fix. Both address the number of signers, not the number of independent signing environments — and this incident had three of the former and roughly zero of the latter. I’ve also stopped believing the on-chain policy is the interesting artifact. Reading m <pubkey_1> ... <pubkey_n> n OP_CHECKMULTISIG tells you how many keys must agree. It tells you nothing about whether those keys were ever shown the same truth. The policy was fine; the pipeline into it was not. Nor is this a “Safe problem” or a “Bybit problem” — the bucket and the laptop are incident details, while the structural gap lives in every setup whose signers share a signing stack.

What would change my mind

I’d change my mind about the primacy of interface integrity if a setup where a majority of signers independently verified bytes on devices with genuinely disjoint firmware and display paths still lost funds to a UI-layer attack — that would mean the failure is somewhere I haven’t looked. I’d soften on aggregation if a long-running t-of-n deployment published its DKG and nonce-management incident log and it was boring; my hesitation about FROST is about operational state, not the math, and operational state stops being scary once somebody runs it in public for two years. Until then I’ll keep the boring position: the threshold counts hands; it does not check eyes. The eyes part has to come from somewhere else — and if you’re unsure where your own keys are, start with what a crypto wallet is and why your seed phrase never left the screen. Then physically test your recovery path, on a quiet Tuesday, while it’s still cheap.

(The End)

Blockchain

Six Confirmations Is a Price Tag, Not a Receipt: What a 51% Attack Actually Buys

2026-10-17 13:25:21

Blockchain

Two Signatures, One Nonce, Zero Security: How ECDSA and secp256k1 Actually Work

2026-10-18 5:53:39

❯
Profile
Cart
Coupons
Search