Skip to content
Access control Write-up Intermediate

How I Found a Critical Vulnerability That Put $64 Million at Risk in a Layer 2 Blockchain

The bridge's upgrade timelock had a minimum delay of zero, so a multisig could replace the bridge implementation in a single block with no warning. If the multisig keys were compromised, an attacker could push a malicious upgrade and drain the roughly $64.57 million in bridged assets before anyone could react.

divakarvasani3938 Follow

Published on medium.com

Cybersecurity

Divakarvasani, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context: what the target, product and feature are, and what the feature normally does

The target was a Layer 2 blockchain's bug bounty program. The asset under review was the bridge: the L1 contract that holds deposited assets while the L2 mints equivalent representations. Users deposit ETH or tokens, the bridge locks them on L1, the L2 mints equivalents, and on exit users burn L2 tokens and unlock their L1 assets. All of that locked value is only as safe as the bridge contract code, because if the code can be changed, the vault can be emptied.

Most modern L2 bridges are deployed as upgradeable proxy contracts, which lets teams fix bugs and add features without migrating to new addresses. Upgradeability is itself a security surface: the question is not whether a bridge can be upgraded, but who controls upgrades, under what conditions, and how much warning users get.

From the original on medium.com

The contracts behind this governance chain included everything that touches bridged funds:

  • The ETH gateway holding deposited Ether
  • The ERC20 gateway holding bridged tokens
  • The cross-domain messenger that relays withdrawal messages
  • The rollup contract that finalizes L2 state on L1
  • The enforced transaction gateway

Total value secured at the time of discovery was $64.57 million.

Setup: accounts, roles, tools, versions and preconditions

The researcher expected to spend most of the time parsing JavaScript bundles, fuzzing API endpoints and diffing custom EVM code. Instead the finding came from governance research in the first thirty minutes, in the upgrade authority chain.

The upgrade authority chain was:

Text
Multisig (4-of-6 threshold)  → TimelockController    → ProxyAdmin      → All bridge proxy contracts

In that chain, a ProxyAdmin is the contract that holds the right to change which implementation a proxy delegates to. The ProxyAdmin is itself owned by something, usually a TimelockController, which is meant to enforce a mandatory waiting period between when an upgrade is proposed and when it executes, so users have time to see what is coming and exit if they disagree.

The tools used were public: on-chain state reads and cast for direct contract calls against a public RPC endpoint. The report also points to L2BEAT, which independently monitors the security posture of major L2s, tracking upgrade delays, multisig thresholds and trust assumptions for dozens of rollups.

Finding it: what the researcher noticed and why it looked wrong

Before touching a single endpoint, the researcher asked three questions:

  1. Who can upgrade the bridge contracts?
  2. What is the process for doing so?
  3. How much time do users have to exit before an upgrade takes effect?

On paper the authority chain looks responsible: there is a multisig and there is a timelock. In practice everything depends on one value, the timelock's minDelay. Querying it directly returned 0.

Zero seconds. No delay. The timelock existed architecturally but provided zero protection functionally.

Exploitation: step by step

Step 1: read the timelock's minimum delay

Bash
cast call [redacted] \  "getMinDelay()(uint256)" \  --rpc-url https://ethereum-rpc.publicnode.com

Output: 0

The call reads getMinDelay() from the timelock at [redacted] over a public Ethereum RPC. The returned value is the enforced waiting period in seconds, and it is zero.

Step 2: work out what zero delay means for the upgrade flow

With minDelay = 0, the upgrade flow collapses:

  1. The multisig proposes an upgrade via TimelockController.schedule() with delay = 0
  2. The multisig immediately executes via TimelockController.execute() in the next block
  3. The new implementation is live

From proposal to execution: one block, approximately 12 seconds on Ethereum. Users have no warning. There are no pending transactions to observe. There is no exit window. The bridge contract simply becomes different code, atomically, with no on-chain signal a typical user would notice.

Step 3: confirm it had been exercised in practice

The researcher did not rely solely on the minDelay value. The upgrade history showed 19 upgrades executed over the contract's lifetime, every single one with zero delay. The most recent was on June 3, 2026, a Rollup implementation change deployed with no waiting period. The implementation address changed from one hash to another with no gap between proposal and execution. This was not a theoretical misconfiguration; it was operational practice, and not a mistake anyone had fixed.

Root cause: the mistake in the code or design, and why existing defences did not stop it

The design put a TimelockController in the authority chain but left its minDelay at zero. The timelock therefore scheduled and executed in the same block, so the waiting period that is supposed to give users an exit window did not exist. The multisig threshold was the only remaining control, and the 4-of-6 threshold can be crossed by compromising four private keys, through phishing, malware, insider action or supply-chain attacks on key management infrastructure.

Most bug bounty findings require an attacker to do something clever: exploit a race condition, craft a malicious payload, chain multiple weaknesses together. This finding requires none of that. The threat model is simply what happens if the upgrade keys are compromised. With a meaningful timelock, say 7 days, a key compromise is recoverable: the team notices, alerts users, users exit, the upgrade is blocked or the protocol is paused. With a zero-second timelock, a key compromise is instantaneous and total, with no recovery path, no warning system and no exit opportunity.

Impact: what an attacker could do, to whom, under which conditions

A malicious upgrade could contain a drain() function, a few lines of Solidity that transfer all contract balances to an attacker address. With zero delay, that drain executes before anyone can react. The contracts protected by this governance chain held $64.57 million in bridged assets at the time of discovery, across the ETH gateway, the ERC20 gateway, the cross-domain messenger, the rollup contract and the enforced transaction gateway.

The condition is compromise of the upgrade keys: four of the six multisig signers. The project has completely ignored the security report despite clear evidence of a zero-delay risk to over $64 million in user funds.

Fix: what was changed, or what should be

The remediation is straightforward: set minDelay to a meaningful duration. Seven days is the standard recommendation for Stage 1 rollups and matches the sequencer censorship window already used elsewhere in the protocol.

Text
timelockController.updateDelay(604800);

A 7-day window means:

  • Users can observe a pending upgrade before it executes
  • Security researchers can audit the new implementation
  • The team can cancel a proposal if keys are compromised after scheduling

This does not make the system trustless: a multisig with meaningful thresholds and delay is still a centralization trust assumption. But it changes the threat model from instant loss to recoverable with user action.

Variants to test: concrete things to try on other targets

  1. Read getMinDelay() on the TimelockController behind any upgradeable bridge proxy. A positive result is a value of 0, or a value far shorter than the exit time users would need.
  2. Walk the full authority chain from ProxyAdmin upward to its owner and confirm what actually controls it. A positive result is a timelock that exists in the chain but is bypassed or owned by a single key.
  3. Pull the upgrade history and check the gap between proposal and execution for each entry. A positive result is a run of upgrades executed with no delay, showing the configuration is operational practice rather than an oversight.
  4. Compare the on-chain delay with what public dashboards such as L2BEAT record for the rollup. A positive result is a documented delay that the live contract does not enforce.
  5. Enumerate which contracts sit behind the same authority chain and total the value they hold. A positive result is fund-holding gateways and the rollup contract all reachable through the same zero-delay path.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 12 min read.

What happened, in plain words

A security researcher spent half an hour looking at how a Layer 2 blockchain is governed, rather than at its code, and found that the people who run it can replace the bridge's code instantly, with no waiting period at all. The bridge is the contract that holds users' money. At the time, it held $64.57 million. If four of the six people who hold the upgrade keys were tricked or compromised, that money could be taken in about twelve seconds, before anyone could react. The project did not respond.

This article walks through the same research from the beginning, explaining every term as it comes up.

From the original on medium.com

The setup: what a Layer 2 bridge actually is

Before the bug, it helps to know what is being protected.

A Layer 2 blockchain (L2) is a faster, cheaper chain that sits on top of Ethereum, which in this context is called Layer 1 (L1). Think of L1 as a slow but very secure bank vault, and the L2 as a quick counter in front of it where everyday transactions happen.

To move money onto the L2, you deposit it on L1. A contract called the bridge takes your ETH or tokens and locks them up. The L2 then creates an equivalent amount of a representation token for you. When you want to leave, you burn the L2 tokens and the bridge unlocks your original L1 assets.

A smart contract is a program that lives on a blockchain. Once deployed, it runs exactly as written, and anyone can read it. The bridge is a smart contract, and it is effectively a vault: it holds everyone's locked deposits.

The key point: all of that locked value is only as safe as the bridge contract code. If the code can be changed, the vault can be emptied.

Most modern L2 bridges are deployed as upgradeable proxy contracts. A proxy is a small contract that forwards every request to a second contract, called the implementation, which contains the actual logic. The proxy keeps the same address and the same stored balances, while the implementation can be swapped out. This is standard practice: it lets teams fix bugs and add features without asking users to move to a new address.

But upgradeability is itself a security surface. The question is not whether a bridge can be upgraded. It is who controls upgrades, under what conditions, and how much warning users get.

The reconnaissance step everyone skips

Most bug hunters go straight to the technical surface: RPC endpoints, JavaScript bundles, smart contract logic. An RPC endpoint is simply a web address that lets a program ask a blockchain questions, like a librarian you phone to read out entries from a public ledger. A JavaScript bundle is the pile of code a website sends to your browser.

The researcher started one layer above all that: governance. Governance means the rules and people who decide how a system changes.

Before touching a single endpoint, the researcher asked three questions:

  1. Who can upgrade the bridge contracts?
  2. What is the process for doing so?
  3. How much time do users have to exit before an upgrade takes effect?

The answers live on-chain and on public dashboards such as L2BEAT, which independently monitors the security posture of every major L2. L2BEAT tracks upgrade delays, multisig thresholds and trust assumptions for dozens of rollups. A rollup is a type of L2 that bundles many transactions together and posts a summary to L1.

Following the authority chain

Upgradeable proxy contracts are controlled by a ProxyAdmin, a contract that holds the right to change which implementation a proxy delegates to. The ProxyAdmin is itself owned by something. That something is usually a TimelockController.

A TimelockController is meant to enforce a mandatory waiting period between when an upgrade is proposed and when it executes. The purpose is exactly what it sounds like: give users time to see what is coming and exit if they disagree. Think of a fire alarm that must ring for a set number of minutes before the building's doors lock, so everyone can leave first.

The upgrade authority chain here was:

Text
Multisig (4-of-6 threshold)  → TimelockController    → ProxyAdmin      → All bridge proxy contracts

Reading that chain from left to right:

  • Multisig (4-of-6 threshold): a multisig (short for multi-signature wallet) is an account that needs several people to approve an action before it happens. Here, six people hold keys, and any four of them must sign. It is like a safe deposit box that opens only when four of six named managers turn their keys.
  • TimelockController: the waiting-period contract described above.
  • ProxyAdmin: the contract allowed to point the proxies at new code.
  • All bridge proxy contracts: the actual vaults that hold user funds.

On paper, this looks responsible. There is a multisig, and there is a timelock. In practice, everything depends on one value: the timelock's minDelay, the minimum number of seconds it must wait before executing anything.

Reading the delay directly

The researcher queried it directly:

Bash
cast call [redacted] \  "getMinDelay()(uint256)" \  --rpc-url https://ethereum-rpc.publicnode.com

Line by line:

  • cast call is a command from cast, a command-line tool that lets you talk to a blockchain from a terminal. call means "read something, do not change anything".
  • [redacted] is the address of the timelock contract. An address is like a street address for a contract on the blockchain; anyone can look it up.
  • "getMinDelay()(uint256)" names the function to call, getMinDelay, and says it returns a uint256, which is a whole number that cannot be negative. In this case the number is a count of seconds.
  • --rpc-url https://ethereum-rpc.publicnode.com tells cast which public server to ask. This is a free, public Ethereum RPC endpoint, so no account or key is needed.

Output: 0

Zero seconds. No delay. The timelock existed architecturally but provided zero protection functionally. It was a fire alarm wired to nothing.

What zero delay actually means

With minDelay = 0, the upgrade flow collapses:

  1. The multisig proposes an upgrade via TimelockController.schedule() with delay = 0
  2. The multisig immediately executes via TimelockController.execute() in the next block
  3. The new implementation is live

A block is a bundle of transactions added to the blockchain at once. On Ethereum, a new block is produced roughly every twelve seconds. schedule() is the function that queues an action for later; execute() is the function that carries it out. With a delay of zero, "later" means "the very next block".

From proposal to execution: one block, approximately 12 seconds on Ethereum.

Users have no warning. There are no pending transactions to observe. There is no exit window. The bridge contract simply becomes different code, atomically, with no on-chain signal a typical user would notice. Atomically means all at once, as a single indivisible step: either the whole change happens or none of it does.

The contracts protected by this governance chain included everything that touches bridged funds:

  • The ETH gateway holding deposited Ether
  • The ERC20 gateway holding bridged tokens
  • The cross-domain messenger that relays withdrawal messages
  • The rollup contract that finalizes L2 state on L1
  • The enforced transaction gateway

A gateway is a contract that handles deposits and withdrawals for one kind of asset. ERC20 is the standard format for tokens on Ethereum. A messenger is a contract that passes messages between L1 and L2. The rollup contract is the one that records the L2's state on L1.

Total value secured at time of discovery: $64.57 million.

A malicious upgrade could contain a drain() function, a few lines of Solidity that transfer all contract balances to an attacker address. Solidity is the programming language smart contracts are written in. With zero delay, that drain executes before anyone can react.

The historical confirmation

The researcher did not rely solely on the minDelay value. So the researcher checked whether the zero delay had actually been used in practice.

The upgrade history showed 19 upgrades executed over the contract's lifetime, every single one with zero delay. The most recent was on June 3, 2026, a Rollup implementation change deployed with no waiting period. The implementation address changed from one hash to another with no gap between proposal and execution. A hash here is a short unique identifier for a piece of code; changing the implementation means pointing the proxy at a different hash.

This was not a theoretical misconfiguration. It was operational practice, and not a mistake anyone had fixed.

Why this is categorically different from most findings

Most bug bounty findings require an attacker to do something clever: exploit a race condition, craft a malicious payload, chain multiple weaknesses together. A race condition is a bug where the timing of two actions matters and an attacker can slip in between them. A payload is the malicious input an attacker sends.

This finding requires none of that. The threat model is simply: what happens if the upgrade keys are compromised? A threat model is a short description of who might attack and how.

With a meaningful timelock, say 7 days, a key compromise is recoverable. The team notices, alerts users, users exit, the upgrade is blocked or the protocol is paused. The system has resilience.

With a zero-second timelock, a key compromise is instantaneous and total. There is no recovery path, no warning system, no exit opportunity.

The 4-of-6 multisig threshold is the only line of defence. That threshold can be crossed by compromising four private keys, through phishing, malware, insider action or supply-chain attacks on key management infrastructure. A private key is the secret code that proves you control an account; whoever has it can sign on that account's behalf. Phishing is tricking someone into handing over credentials. Malware is software that spies or steals on an infected machine. A supply-chain attack means compromising a tool or vendor that the target trusts, rather than the target directly. These are not exotic attack vectors.

The fix

The remediation is straightforward: set minDelay to a meaningful duration.

Seven days is the standard recommendation for Stage 1 rollups and matches the sequencer censorship window already used elsewhere in the protocol. A sequencer is the computer that orders L2 transactions; a censorship window is the period in which users can force a transaction through if the sequencer refuses to include it.

Text
timelockController.updateDelay(604800);

This line calls updateDelay on the timelock with the value 604800. That number is seven days expressed in seconds: 7 days × 24 hours × 60 minutes × 60 seconds = 604,800.

A 7-day window means:

  • Users can observe a pending upgrade before it executes
  • Security researchers can audit the new implementation
  • The team can cancel a proposal if keys are compromised after scheduling

This does not make the system trustless. A trustless system is one where you do not have to trust any particular person or group. A multisig with meaningful thresholds and delay is still a centralisation trust assumption. But it changes the threat model from "instant loss" to "recoverable with user action".

The most frustrating part of this research is not the vulnerability itself, but the response, or lack of one. Despite clear evidence of a zero-delay risk to over $64 million in user funds, the project has completely ignored the security report. Finding critical bugs is only half the battle; the other half relies on teams being serious about securing their protocols. Ignoring responsible disclosures shows a fundamental lack of commitment to protecting the users who trust this network.

Variants to test on other targets

  1. Read getMinDelay() on the TimelockController behind any upgradeable bridge proxy. A positive result is a value of 0, or a value far shorter than the exit time users would need.
  2. Walk the full authority chain from ProxyAdmin upward to its owner and confirm what actually controls it. A positive result is a timelock that exists in the chain but is bypassed or owned by a single key.
  3. Pull the upgrade history and check the gap between proposal and execution for each entry. A positive result is a run of upgrades executed with no delay, showing the configuration is operational practice rather than an oversight.
  4. Compare the on-chain delay with what public dashboards such as L2BEAT record for the rollup. A positive result is a documented delay that the live contract does not enforce.
  5. Enumerate which contracts sit behind the same authority chain and total the value they hold. A positive result is fund-holding gateways and the rollup contract all reachable through the same zero-delay path.

Glossary

  • Address: a unique identifier for a contract or account on a blockchain, like a street address.
  • Atomically: all at once, as a single indivisible step; either everything happens or nothing does.
  • Block: a bundle of transactions added to a blockchain together; on Ethereum roughly every twelve seconds.
  • Bridge: the contract that locks assets on one chain so an equivalent can be issued on another.
  • Cast: a command-line tool for talking to a blockchain from a terminal.
  • Censorship window: the period in which users can force a transaction through if the sequencer refuses to include it.
  • Cross-domain messenger: a contract that passes messages between L1 and L2.
  • ERC20: the standard format for tokens on Ethereum.
  • Gateway: a contract that handles deposits and withdrawals for one kind of asset.
  • Governance: the rules and people who decide how a system changes.
  • Hash: a short unique identifier derived from data; here, one that identifies a piece of code.
  • Implementation: the contract that contains the actual logic a proxy forwards requests to.
  • JavaScript bundle: the pile of code a website sends to your browser.
  • L1 / Layer 1: the base chain, here Ethereum.
  • L2 / Layer 2: a faster, cheaper chain built on top of L1.
  • L2BEAT: a public dashboard that tracks upgrade delays, multisig thresholds and trust assumptions for L2 rollups.
  • Malware: software that spies or steals on an infected machine.
  • Messenger: a contract that relays messages between chains.
  • minDelay: the minimum number of seconds a timelock must wait before executing an action.
  • Multisig: an account that needs several people to approve an action before it happens.
  • Payload: the malicious input an attacker sends.
  • Phishing: tricking someone into handing over credentials.
  • Private key: the secret code that proves you control an account.
  • Proxy / upgradeable proxy contract: a contract that forwards requests to a separate implementation contract, which can be swapped out.
  • ProxyAdmin: the contract that holds the right to change which implementation a proxy points to.
  • Race condition: a bug where the timing of two actions matters and an attacker can slip in between them.
  • Rollup: a type of L2 that bundles many transactions and posts a summary to L1.
  • RPC endpoint: a web address that lets a program ask a blockchain questions.
  • Sequencer: the computer that orders L2 transactions.
  • Smart contract: a program that lives on a blockchain and runs exactly as written.
  • Solidity: the programming language smart contracts are written in.
  • Supply-chain attack: compromising a tool or vendor the target trusts, rather than the target directly.
  • Threat model: a short description of who might attack and how.
  • TimelockController: a contract that enforces a waiting period between proposing and executing an action.
  • Trustless: a system where you do not have to trust any particular person or group.
  • uint256: a whole number that cannot be negative, used in Solidity.

More by divakarvasani3938

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.