What should a Base smart contract audit cover?
A Base smart contract audit should check your Solidity against Base as it runs after its own upgrades: sub-second blocks since Denim, a shorter withdrawal window since Beryl, and lending markets whose oracle setup decides who gets liquidated. QuillShield audits the Solidity code of a Foundry project that targets Base and keeps checking pull requests after the audit, so the next oracle or constant change gets reviewed too.
What is different about auditing on Base?
The Base docs call Azul, live on mainnet since 28 May 2026, Base's first independent network upgrade. Check Base behavior in the Base specs rather than assuming it matches another rollup.
- Five blocks per second since Denim. Denim, live on Base mainnet since 5 November 2026 at 18:00 UTC, moved Base from one block every two seconds to five per second (Base docs).
block.timestampstays in whole seconds, the millisecond part comes from the BaseTime predeploy at0x4200000000000000000000000000000000000030, and the docs tell teams to multiply block-count timelocks, deadlines and voting periods by ten or switch them to timestamps. - Withdrawals take 5 days, or 1 day on the fast path. Since Beryl went live on 25 June 2026, the single-proof dispute game finalization window is 5 days instead of 7, and the dual-proof fast path with TEE and ZK proofs, introduced in Azul, stays at 1 day (Beryl docs). Bridges and vaults with a seven-day constant need rechecking.
- Azul changed the proof system and the gas rules. Azul added an AggregateVerifier that can verify one or two proofs for the same proposal, capped each transaction at 16,777,216 gas (EIP-7825) and raised the secp256r1 precompile cost to 6,900 gas to match EIP-7951 on Ethereum (Azul docs).
- B20 tokens run inside the node and enforce policies. B20, the token standard Beryl introduced, implements ERC-20 but runs as Rust precompiles inside the node rather than as a Solidity contract (Beryl docs). Under Denim its
TRANSFER_EXECUTOR_POLICYapplies to every transfer path, and transfers, mints and seizes to the token's own address revert (Denim docs). A vault or market that holds B20 tokens should be tested with a transfer that a policy refuses. - Sequencer downtime has a feed. Chainlink lists a Base L2 sequencer uptime feed at
0xBCF85224fc0756B9Fa45aA7892530B47e10b6433, and its example contract waits a grace period of 3,600 seconds after the sequencer returns before it accepts prices.
Two of these checks belong in every price read on Base: the sequencer status and a bound on the answer. A bound turns a feed in the wrong unit into a revert instead of a liquidation.
Reads a price only when the sequencer is up, the grace period has passed, the answer is fresh and inside bounds (illustrative, not audited code) GuardedPriceReader.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;
interface IAggregatorV3 {
function latestRoundData()
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}
contract GuardedPriceReader {
uint256 public constant GRACE_PERIOD = 3600;
IAggregatorV3 public immutable sequencerUptimeFeed; // Base: 0xBCF85224fc0756B9Fa45aA7892530B47e10b6433
IAggregatorV3 public immutable priceFeed;
uint256 public immutable maxAge;
int256 public immutable minPrice;
int256 public immutable maxPrice;
error SequencerDown();
error GracePeriodNotOver();
error StalePrice();
error PriceOutOfBounds(int256 price);
constructor(IAggregatorV3 uptime, IAggregatorV3 feed, uint256 maxAge_, int256 minPrice_, int256 maxPrice_) {
sequencerUptimeFeed = uptime;
priceFeed = feed;
maxAge = maxAge_;
minPrice = minPrice_;
maxPrice = maxPrice_;
}
function price() external view returns (int256) {
(, int256 status, uint256 startedAt, , ) = sequencerUptimeFeed.latestRoundData();
if (status != 0) revert SequencerDown();
if (block.timestamp - startedAt <= GRACE_PERIOD) revert GracePeriodNotOver();
(, int256 answer, , uint256 updatedAt, ) = priceFeed.latestRoundData();
if (block.timestamp - updatedAt > maxAge) revert StalePrice();
// The bounds come from the protocol's own view of the asset, in the feed's unit.
if (answer < minPrice || answer > maxPrice) revert PriceOutOfBounds(answer);
return answer;
}
}
Which Base assumptions break older code?
- Find every constant that turns blocks into time (blocks per year, block-based vesting, block-number deadlines) and recompute it for 200ms blocks (the Base docs suggest multiplying block-count durations by ten), or move it to timestamps.
- Find logic that expects one action per block or a new
block.timestampin each block, such as per-block rate limits and short TWAP windows. - Read every withdrawal or bridge delay constant against the 5-day window and the 1-day fast path.
- Check that anything proving Base state on Ethereum works with the Azul AggregateVerifier, which can verify one or two proofs per proposal.
- For each Chainlink feed, write down the unit of the answer, the conversion it needs (a cbETH/ETH rate needs ETH/USD), the staleness limit and a sane bound.
- Check that liquidations wait out the sequencer grace period after an outage.
- Test B20 token transfers that an issuer policy rejects, in deposits, withdrawals and liquidations.
What did the Moonwell oracle misconfiguration cost?
| Protocol | Moonwell |
|---|---|
| Date | 15 February 2026 |
| Chain | Base and Optimism |
| Loss | about $1.78M of bad debt |
| What happened | At 18:01 UTC Moonwell executed governance proposal MIP-X43, which enabled Chainlink OEV wrapper contracts across its core markets on Base and Optimism. One configuration priced cbETH from the cbETH/ETH exchange rate alone, without multiplying by the ETH/USD price, so the protocol read cbETH at about $1.12 instead of about $2,200. Liquidators seized 1,096.317 cbETH from borrowers, as The Block and Decrypt reported from Moonwell's post-mortem. |
| Sources | The Block, Decrypt |
The contracts ran exactly as written, and the error was a feed in the wrong unit inside a governance change. On Base, where blocks come five to a second, liquidators can act on a bad price within a second, so an oracle change deserves the same review as new code, with a bound that rejects a cbETH price near $1. The page on AI-generated Solidity covers how this change was written.
What do lending markets and B20 issuers on Base need checked?
Base hosts lending markets such as Moonwell, and since Beryl it issues B20 tokens, an ERC-20 standard that runs inside the node. Both depend on prices and on token transfers that can fail, and bridges and smart wallets add their own checks.
| Protocol type | Base-specific check |
|---|---|
| Lending market | Feed units and bounds, the sequencer grace period, and liquidation incentives at 200ms blocks |
| B20 issuer or integrator | Transfer policy enforcement, and what a vault does when a transfer is refused |
| Bridge or withdrawal product | The 5-day window, the 1-day TEE and ZK fast path, and proofs read from the AggregateVerifier |
| Smart wallet using P-256 signatures | The secp256r1 precompile, plus a nonce and the chain ID in every signed payload |
Which vulnerabilities matter most on Base?
- Oracle price manipulation: lists the checks every feed needs, and Moonwell's loss came from one feed in the wrong unit.
- Stale oracle prices: prices read right after a sequencer restart, or past a feed's heartbeat, look valid and aren't.
- Liquidation logic bugs: Moonwell liquidators seized 1,096.317 cbETH at a wrong price, and the liquidation path accepted it.
- Timestamp dependence: 200ms blocks break block-count clocks and any rule that expects a new timestamp per block.
- Signature replay: P-256 signatures checked through the precompile still need a nonce and the chain ID in what was signed.
How do you run QuillShield on Base contracts?
- Keep the Base contracts in a Foundry project. QuillShield supports Solidity in Foundry projects today.
- Import the repository from GitHub or GitLab.com, since pull request checks need a repo on one of the two.
- Add context before you approve: each oracle feed with its unit and expected bounds, every place the code counts blocks, and the B20 tokens it holds.
- Approve the quote. Sign-up is free, and new accounts get $50 in credit, good for up to half of an order.
- Once the audit is complete, work through the findings. Each one you see held up against a separate reviewer agent and comes with the exact lines, the impact, a fix and, on a full audit, a proof of concept result.
- Make the QuillShield check required on your main branch with branch protection or a ruleset, so a pull request with a High or Critical finding can't merge on GitHub.
Prices start at $49 for a full audit and follow the lines of Solidity in scope, as listed on the pricing page. You see the exact price before anything is charged.
QuillShield doesn't replace a manual audit. Talk to an auditor about a manual review, and see the Solidity page for what QuillShield checks in the language.
Run a full audit of your Base contracts before the next oracle change ships.
FAQ
Is auditing on Base the same as on OP Mainnet?
Not in every detail any more. The Base docs describe Azul as Base's first independent network upgrade, and Base's own upgrades changed its block time and withdrawal window, so check Base contracts against the Base specs.
How fast are blocks on Base?
Since Denim went live on mainnet on 5 November 2026, Base produces five blocks per second. block.timestamp stays in whole seconds, and contracts read milliseconds from the BaseTime predeploy at 0x4200000000000000000000000000000000000030 (Base docs).
Which sequencer uptime feed should a Base contract read?
Chainlink lists the Base mainnet uptime feed at 0xBCF85224fc0756B9Fa45aA7892530B47e10b6433. An answer of 0 means the sequencer is up and 1 means it is down (Chainlink docs).
Can QuillShield check every pull request to a Base repo?
Yes, for a GitHub or GitLab.com repository. Each full audit comes with five pull request checks, and on GitHub a required QuillShield check blocks a merge while the pull request has a High or Critical finding.
Sources
- 200ms blocks, Base docs checked 3 December 2026
- Denim, Base docs checked 3 December 2026
- Beryl, Base docs checked 3 December 2026
- Azul, Base docs checked 3 December 2026
- L2 Sequencer Uptime Feeds, Chainlink docs checked 3 December 2026
- DeFi lending protocol Moonwell hit with $1.8 million bad debt after oracle misconfiguration, The Block checked 3 December 2026
- Oracle error leaves DeFi lender Moonwell with $1.8 million in bad debt, Decrypt checked 3 December 2026