Security
Most onchain money is lost through keys, not code
- Written by
- Maitreya Kulkarni, Co-Founder and CTO
- Published
- Reading time
- 5 min
Ask an engineer to picture a DeFi exploit and you usually get a clever bug: a reentrancy path, a rounding error, a price that can be pushed for one block. Those bugs are real, and they are still the most common kind of incident. But if you follow the money rather than the incident count, the public record of the last three years tells a different story. Most of the value that leaves the industry leaves through keys, signers and configuration: the parts of a system that decide who is allowed to tell the contracts what to do.
This post is about that layer, and about the controls we now put in by default, before anyone asks.
What the public numbers say
Trackers count differently, so treat any single figure as an estimate. The shape, though, is consistent.
- 2024. Chainalysis counted about $2.2 billion stolen across 303 incidents, and found that private key compromises accounted for the largest share of stolen crypto, at 43.8 percent.
- 2025. Chainalysis counted over $3.4 billion stolen from January to early December, with the February compromise of Bybit alone accounting for $1.5 billion, and attributed at least $2.02 billion to North Korean operators.
Neither of the two biggest line items involved a flaw in contract logic.
Three incidents, one pattern
Bybit, February 2025. Bybit's cold wallet was a Safe multisig that needed several signers. NCC Group's technical analysis describes how malicious JavaScript, planted through a compromised Safe{Wallet} developer machine, changed what the signing interface did for Bybit's wallet only. The signers saw a routine transfer. What they approved was a delegatecall that pointed the wallet's proxy at code the attacker controlled. The multisig's cryptography was never broken. The signers could not read what they signed, so they signed it.
Drift Protocol, April 2026. According to TRM Labs, members of Drift's Security Council multisig were socially engineered into pre-signing transactions that looked routine but carried hidden admin actions. Days earlier the council had moved to a 2-of-5 threshold with no timelock. The attacker listed a token it had minted as collateral, raised withdrawal limits, and drained about $285 million in 31 withdrawal transactions over roughly 12 minutes.
Kelp DAO, April 2026. Kelp's rsETH bridge route on LayerZero was configured with a single verifier. Nexus Mutual's incident report describes attackers poisoning the RPC nodes that verifier relied on, knocking the clean ones offline, and getting one forged message through. The bridge released 116,500 rsETH, roughly $293 million.
In all three, the contracts did exactly what they were told. The failure was in who could tell them, how easily, and how quickly.
Access control is bigger than a modifier
In Solidity, "access control" usually means onlyOwner or a role check. That is the smallest part of it. In practice, access control is the whole chain that turns a human decision into an onchain effect:
- the private keys and the devices they live on;
- the interface signers use, and whether it shows them the truth;
- the multisig threshold, and how independent the signers really are;
- the delay between a decision and its effect;
- the verifiers, oracles and RPC nodes a contract trusts as witnesses;
- the people watching, and whether they can stop anything.
Most audits scope the code. The losses above sat almost entirely outside that scope.
The controls we put in by default
None of these is new. Banks call most of them segregation of duties and limits. What has changed is that we now treat them as part of the build, not as advice in a report.
Make every power small
List the privileged actions (pause, list collateral, change limits, change fees, upgrade, mint) and give them to different roles held by different signer sets. The role that can pause should not be the role that can move funds. A stolen key should open one small door, not every door.
Make every power slow
Anything that increases risk (new collateral, higher limits, an upgrade) waits in a timelock, visible onchain, for long enough that monitors and users can react. Only pausing is instant. Drift's attacker needed no delay at all, and that is the part of the incident a timelock addresses directly.
Make every signature readable
No signer approves data they cannot read. We decode every proposed transaction independently of the interface that produced it, simulate it, and show its effect (balances, roles, implementation addresses) in plain language. For high-value wallets, a second device and a second decoder check the same payload. The Bybit transaction would have announced itself as "change this wallet's implementation", which nobody would have approved.
Make every route need more than one witness
Bridges, oracles and anything else that accepts a message as truth get several independent verifiers, running on independent infrastructure and reading from independent RPC providers, with a value cap per route. A verifier that reads from one provider is one witness, however many signatures it produces.
Make every outflow bounded
Per-asset, per-hour withdrawal limits turn a total loss into a partial one and buy time to pause. They cost honest users very little: a large withdrawal waits an hour, or goes through a slower path.
Make someone watch, with authority to act
Alerts on admin actions, role changes, oracle deviations and unusual outflows go to people who hold a pause key and have rehearsed using it. Time to pause is measured in drills, not assumed.
The one-page test
Before we review code, we ask for one table. Each row is a privileged action, and the columns are:
- Who can take it (which role, which signer set, what threshold);
- Delay before it takes effect;
- Blast radius, the most value it can move or put at risk;
- Watched, whether an alert fires when it is proposed and when it executes.
Teams that cannot fill it in usually find their biggest risk while trying. Teams that can fill it in usually find one row with a large blast radius and a zero in the delay column. That row is where we start.
What to ask before you buy a build or an audit
If you are hiring someone to build or review a protocol, ask them:
- Does your review cover keys, signing, governance and bridge or oracle configuration, or only the code?
- Will you leave us with the admin-powers table, monitoring rules and a pause runbook?
- How do our signers verify what they sign, independently of the interface?
- What is the most value that can leave in one hour, and who can stop it?
Those questions shape how we work. Our security reviews cover the operational layer as well as the code, and new DeFi protocols we build ship with these controls from the first commit. For the full argument and the design, read in 2026, DeFi lost more to keys than to code; for the wallet side of the same problem, the EIP-7702 delegation trap. If you would like us to look at your table, start here.
Sources
- 01Chainalysis: $2.2 billion stolen from crypto platforms in 2024
- 02Chainalysis: North Korea drives record $2 billion crypto theft year
- 03NCC Group: in-depth technical analysis of the Bybit hack
- 04TRM Labs: North Korean hackers attack Drift Protocol in $285 million heist
- 05Nexus Mutual: KelpDAO and LayerZero incident report
Read next
Related pages.
Use case: security and admin-key risk
In 2026, DeFi lost more to keys than to code
Smart contract security audit
- Engineering
What an audit-ready codebase looks like
An audit buys a fixed amount of expert attention. The checklist we use so reviewers spend it on your logic, not on setup, guesswork and stale code.5 min read - Tokenization
Tokenizing real-world assets without a liquidity trap
Many tokenized assets only move through mint and redeem. Seven decisions to make before you choose a chain, so your token can actually trade.5 min read
Start a build
Bring us the contract you're not sure about.
What happens next
- 01Tell us what you are buildingA short note or a 30-minute call: the product, the chain if you know it, and where the money sits.
- 02Hear back within 48 hoursEvery message is read by the team, not a filter.
- 03A first working sessionWe walk through the threat model and the admin powers with you, then propose a scope and a plan.