# What should a Scroll smart contract audit check?

URL: https://shield.quillaudits.com/chains/scroll/

A Scroll smart contract audit covers the same Solidity bugs as an Ethereum audit, then the ones that come from Scroll being a zk rollup: how messages from Ethereum pay for gas and get retried, the L1 data fee every transaction pays, and when a block is final. QuillShield audits the Solidity code of a Foundry project that targets Scroll, with the L1 and L2 contracts of a cross-chain app in one scope.

Last updated 3 December 2026. 7 minute read. By the QuillAudits Team.

## What is different about auditing on Scroll?

[Immunefi](https://immunefi.com/bug-bounty/scroll/) describes Scroll as an EVM-compatible zk rollup built to scale Ethereum. Reviews of the Scroll protocol by OpenZeppelin and Trail of Bits show where its design reaches into application code.

- **Opcodes that return something else.** On Scroll, `block.coinbase` returns the address of a predeployed fee vault, `PREVRANDAO` (the old `DIFFICULTY`) always returns 0, and `SELFDESTRUCT` is disabled, so a transaction that reaches it reverts ([EVM differences](https://docs.scroll.io/en/technology/chain/differences)). The blob opcodes `BLOBHASH` and `BLOBBASEFEE` are not available yet, the EIP-4788 beacon root is not supported, and the [developer docs](https://docs.scroll.io/en/developers/ethereum-and-scroll-differences) say most precompiles are supported while calls to the unsupported ones revert. Randomness taken from the block is a constant on Scroll, and a tip sent to `block.coinbase` lands in the fee vault.
- **Messages from Ethereum pay up front, with no refund.** For an L1 to L2 message the sender sets a gas limit for the L2 transaction and pays for it on L1. In its [phase 1 audit](https://www.openzeppelin.com/news/scroll-phase-1-audit) (May to June 2023), OpenZeppelin found that any gas limit above what the L2 transaction needs goes to the fee vault as an extra fee. Nothing is refunded when a message reverts on L2, and the reverted message does not stop the batch from finalizing.
- **Failed messages can run again later.** A message that failed on L2 can be retried with a storage proof, according to the same audit. Reviewing the Feynman upgrade in July 2025, [Trail of Bits](https://trailofbits.com/library/scroll-feynman-upgrade-smart-contract-changes/) reported that old failed L1 to L2 messages could be executed by anyone on behalf of a user. A receiver on Scroll has to stay correct when a stale message is executed at a time someone else picks.
- **Every transaction pays for its data on Ethereum.** Scroll charges an L1 fee on top of L2 gas, and the [2023 l2geth review](https://trailofbits.com/library/scroll-l2geth-initial/) by Trail of Bits includes a finding on the pool keeping transactions that cannot afford it. Since the upgrade OpenZeppelin audited in [March and April 2024](https://www.openzeppelin.com/news/scroll-eip-4844-support-audit), Scroll can post that data as EIP-4844 blobs. `gasleft()` and `tx.gasprice` only see the L2 part, so a contract that refunds relayers or pays keepers from measured gas underpays them. The developer docs add that messages from L1 do not pay the L1 data fee, only transactions that start on L2.
- **Final means proven on Ethereum.** The rollup contract finalizes Scroll blocks once their validity is established ([OpenZeppelin](https://www.openzeppelin.com/news/scroll-phase-1-audit)), and in August 2023 Trail of Bits rated the single-node Clique consensus of the L2 node, which had no finality API, a medium double-spend risk ([l2geth review](https://trailofbits.com/library/scroll-l2geth-initial/)). The [developer docs](https://docs.scroll.io/en/developers/ethereum-and-scroll-differences) put the maximum reorg depth at 17 blocks since the DarwinV2 upgrade. A bridge, exchange or keeper that acts on Scroll deposits should wait for finalization on Ethereum, not for an L2 block.

## What happened at Rho Markets on Scroll?

In July 2024 one configuration transaction, with no bug in the code, left a lending market on Scroll with bad debt.

| Protocol | Rho Markets |
| --- | --- |
| Date | 19 July 2024 |
| Chain | Scroll |
| Loss | about $7.5M of bad debt, later returned |
| What happened | A configuration transaction pointed the price oracle for ETH, which the protocol keys as address(0), at the WBTC/USD feed, so ETH collateral was valued at the price of bitcoin, about 20 times too high. An MEV bot minted about 84 rETH and borrowed about 942 wstETH against it, repeating the move across several transactions and leaving about $7.5M of bad debt. Dedaub, which had audited Rho Markets, says no contract code was broken because the oracle setter worked as intended. The bot operator returned the funds after Rho Markets and SEAL 911 moved quickly, and rekt.news reports that Scroll moved to halt the chain temporarily. |
| Sources | [Dedaub](https://dedaub.com/blog/rho-markets-incident/), [rekt.news](https://rekt.news/rho-market-rekt) |

Every oracle assignment in a deployment script or governance transaction needs the same review as the code, because a wrong feed address passes every unit test of the contract that reads it.

## Which protocol types need the most care on Scroll?

The differences above land on some kinds of code much harder than others.

- Bridges, token gateways and cross-chain governance, which send and receive messages through the Scroll messengers and inherit the refund and replay rules.
- Relayers, meta-transaction forwarders and keeper networks that pay or refund gas, because the L1 data fee sits outside what a contract can measure.
- Exchanges, payment apps and bridges that credit deposits, because a Scroll block is final only when its batch is proven on Ethereum.

Lending markets and AMMs ported from Ethereum keep their usual risks, and the vulnerability pages below cover those.

## Which vulnerabilities matter most on Scroll?

- **Cross-chain message validation.** An L2 receiver must accept calls only from the Scroll messenger and only for the expected sender on Ethereum, and must stay safe when an old failed message is executed later.
- **Weak randomness.** `PREVRANDAO` always returns 0 on Scroll, so any number drawn from the block is a constant.
- **Oracle price manipulation.** Rho Markets ran up about $7.5M of bad debt on Scroll because ETH read its price from the WBTC feed, and the oracle page covers the other ways a price goes wrong ([oracle price manipulation](https://shield.quillaudits.com/learn/vulnerabilities/oracle-price-manipulation/)).
- **Denial of service.** A message sent with too little L2 gas fails with no refund, and code that still calls `SELFDESTRUCT` reverts on Scroll.
- **Access control.** The roles behind messengers, gateways and oracle setters decide who can mint, release or reprice funds, and the access control page shows what a cross-chain manager with too much power cost Poly Network ([access control](https://shield.quillaudits.com/learn/vulnerabilities/access-control/)).

## What should a reviewer check on Scroll?

- Every L1 to L2 message: the gas limit it sets, who pays for it, and what the L2 receiver does if it reverts.
- Every L2 receiver: it accepts calls only from the Scroll messenger with the expected sender on Ethereum, and stays correct if an old message runs late.
- Every gas refund or keeper payment, with the L1 data fee counted.
- Every place that credits a deposit or releases funds on another chain, and whether it waits for finalization on Ethereum.
- Signed L1 to L2 transactions, each with a deadline, a nonce and a chain ID, as the Scroll enforced transaction gateway does after OpenZeppelin found replay issues in its first design.
- Every use of `block.prevrandao`, `block.difficulty`, `block.coinbase`, `SELFDESTRUCT`, blob opcodes and precompiles, against the Scroll differences page.
- Every oracle assignment in deployment and governance transactions.

## How do you run QuillShield on a Scroll project?

QuillShield audits Solidity in Foundry projects. For a Scroll app that talks to Ethereum, the useful scope is both ends of every message.

1. Put the L1 and L2 contracts of each message flow in one Foundry project, or one audit scope, so the security graph and the invariants cover both ends.
2. In the audit context, describe each message: who sends it on Ethereum, which contract receives it on Scroll, and what the receiver must do if it fails or arrives late.
3. Read the findings on messaging, refunds and payouts first, since a local Foundry test does not run the Scroll messenger. Each finding that holds up comes with its exact lines, impact and fix.
4. Keep [pull request checks](https://www.quillaudits.com/quillshield/guides/guides/ci-cd-checks) on after launch, so a new message type or a changed gas limit is reviewed against the audit.

A single 100-line receiver contract costs $79 to audit as of November 2026, and full audits start at $49 ([pricing](https://shield.quillaudits.com/pricing/)). New accounts get $50 in credit, good for up to half of an order.

QuillShield does not replace a manual audit. [Request a manual audit from QuillAudits](https://www.quillaudits.com/smart-contract-audit) for bridge and messaging code, [talk to an auditor](https://calendly.com/akshadh-a-quillaudits/30min), or [start free](https://shield.quillaudits.com/register).

## FAQ

### Are unused L2 gas fees refunded on Scroll deposits?

No, OpenZeppelin found that a gas limit above what the L2 transaction needs is paid into the fee vault as an extra fee, and that nothing is refunded when the message reverts on L2. Set the limit from a measured estimate.

### Can a failed L1 to L2 message on Scroll run again?

Yes, it can be retried with a proof, and Trail of Bits reported in July 2025 that old failed messages could be executed by anyone on behalf of a user. Write receivers that stay correct when a message runs late.

### When is a Scroll transaction final?

When the batch that holds it is proven and finalized on Ethereum. Code that credits deposits or releases funds on another chain should wait for that, not for the L2 block.

### Can a contract use block.prevrandao for randomness on Scroll?

No, the Scroll docs say PREVRANDAO always returns 0, so the value never changes. Use a randomness oracle instead, and check any code ported from Ethereum that reads it.

### Can QuillShield audit contracts for Scroll?

Yes, when they are Solidity in a Foundry project, and the L1 side of a message flow can sit in the same scope. QuillShield doesn't replace a manual audit, which QuillAudits offers for bridge and messaging code.

## Sources

- [Scroll bug bounty, Immunefi](https://immunefi.com/bug-bounty/scroll/) · checked 3 December 2026
- [Scroll phase 1 audit, OpenZeppelin](https://www.openzeppelin.com/news/scroll-phase-1-audit) · checked 3 December 2026
- [Scroll Feynman upgrade smart contract changes, Trail of Bits](https://trailofbits.com/library/scroll-feynman-upgrade-smart-contract-changes/) · checked 3 December 2026
- [Scroll l2geth (initial review), Trail of Bits](https://trailofbits.com/library/scroll-l2geth-initial/) · checked 3 December 2026
- [Scroll EIP-4844 support audit, OpenZeppelin](https://www.openzeppelin.com/news/scroll-eip-4844-support-audit) · checked 3 December 2026
- [EVM differences from Ethereum, Scroll docs](https://docs.scroll.io/en/technology/chain/differences) · checked 3 December 2026
- [Ethereum and Scroll differences, Scroll docs](https://docs.scroll.io/en/developers/ethereum-and-scroll-differences) · checked 3 December 2026
- [Rho Markets incident, Dedaub](https://dedaub.com/blog/rho-markets-incident/) · checked 3 December 2026
- [Rho Market rekt report, rekt.news](https://rekt.news/rho-market-rekt) · checked 3 December 2026
