7Block Labs
Blockchain Technology

ByAUJay

Short version: Smart contract audits today aren’t about “spotting reentrancy.” They’re about proving your Solidity and ZK stack still behaves under Dencun→Pectra/Osaka changes, passes EthTrust v3, and won’t blow up procurement (SOC 2, SOX) or your L2 cost model.

Audience: Enterprise teams shipping on EVM/L2 with compliance requirements (SOC 2, SOX, ISO 27001) and ZK components.

What is a Smart Contract Audit? (And Why You Need One)

Pain — the specific technical headache you’re likely feeling

Your Solidity and ZK stack has drifted under you:

  • After Dencun, EIP‑4844 changed L2 economics; rollup fees now hinge on blob pricing rather than calldata. If your gas and unit‑economics models still rely on pre‑4844 assumptions, you can miss cost targets by an order of magnitude. (blockworks.co)
  • EVM semantics changed in ways that quietly break legacy patterns. Example: EIP‑6780 neuters SELFDESTRUCT except in the create‑and‑destroy‑same‑tx case—metamorphic/CREATE2 “redeploy at same address” patterns no longer work as a general upgrade strategy. (eips.ethereum.org)
  • New opcodes and object formats are landing. The compiler now targets post‑Cancún EVMs (Prague→Osaka) by default; 0.8.31 adds support for the CLZ opcode (EIP‑7939) and deprecations ahead of 0.9.0. If you haven’t re‑benchmarked gas/bytecode size or reviewed deprecations (e.g., .send/.transfer removal), you’re already behind. (soliditylang.org)
  • Transient storage (EIP‑1153) exists now. Reentrancy locks and “single‑tx approvals” belong in TSTORE/TLOAD—not in stateful SSTORE/SLOAD—but most codebases still pay permanent‑storage costs or implement brittle memory hacks. (eips.ethereum.org)
  • The old SWC registry you still reference in checklists hasn’t been maintained for years. Buyers and exchanges are moving to EthTrust and OWASP‑SCSVS; your audit badge should too. (swcregistry.io)
  • ZK circuits add their own failure modes. “Last challenge” and transcript‑binding mistakes in PLONKish verifiers are exploitable; Halo2/Plonky2 ecosystems have had concrete fixes and CVEs. If your verifier or lookup tables aren’t reviewed against current advisories, your “provable security” can be illusory. (openzeppelin.com)
  • Procurement has matured. RFPs increasingly ask for EthTrust v3 mapping, SOC 2 control evidence across SDLC, and SLSA/CIS supply‑chain artifacts—not just a PDF report. (entethalliance.org)

Agitation — what this risk looks like in dollars, deadlines, and reputation

  • Hack financials remain “fat‑tail”: just three incidents drove the majority of 2025 losses; one CEX breach (Bybit) was ~44% of the year’s total. If your threat model ignores “big‑game” events and wallet‑key compromises in vendor chains, your VaR is mis‑estimated. (theblock.co)
  • Chainalysis tallied ~$3.4B stolen in 2025, with DPRK alone at ~$2.02B; individual wallet compromises surged to 158,000 cases. Regulators and counterparties now treat “absence of breach” as luck without formal controls. (chainalysis.com)
  • Missed feature gates: teams shipping with pre‑Dencun calldata patterns or relying on SELFDESTRUCT for lifecycle control hit “unexpectedly expensive transactions,” stuck upgrades, and rollbacks—burning sprints, delaying audits, and slipping launch windows. (eips.ethereum.org)
  • ZK is not a free pass. A single verifier bug (Fiat‑Shamir mishandling) can let an attacker prove invalid state transitions and drain assets. Lookup‑table soundness errors (e.g., Plonky2 CVE‑2025‑24802) are subtle and propagate to production if audits don’t include circuit+verifier analysis. (openzeppelin.com)
  • Compliance friction: Security questionnaires that map to SOC 2/SOX require traceable controls (threat models, property specs, fuzzing evidence, change control, SBOMs). Without those, enterprise deals stall in procurement review.

In short: the “audit” you bought two years ago doesn’t answer today’s questions—technical or commercial.

Solution — 7Block’s methodology (technical but pragmatic)

We audit for correctness, cost, and compliance—so your launch hits both engineering and procurement gates. Engagements are scoped as 90‑day pilots or multi‑release programs via our security audit services.

  1. Readiness and scoping (Enterprise‑grade intake)
  • Map your codebase, compiler/EVM targets, and L2 assumptions; establish an EthTrust v3 + OWASP SCSVS control matrix aligned to SOC 2/ISO 27001 SDLC controls. Deliverable: control coverage plan and “go/no‑go” release gates. (entethalliance.org)
  • Compliance hooks: ticket templates and evidence threads for change management, secure code review, and separation of duties (SOC 2 CC/Change).
  1. Solidity static and semantic analysis
  • Static analysis at scale with Slither and Slither‑MCP to build a precise code knowledge graph (inheritance, call graph, reachability). This reduces LLM‑assisted review noise and speeds manual triage. (github.com)
  • Detector suites + bespoke rules for:
    • EIP‑6780 unsafe assumptions (metamorphic, burn‑via‑selfdestruct).
    • EIP‑1153 misuse (TSTORE/TLOAD safety, transient lock correctness).
    • EOF/Osaka compatibility flags and 0.8.31 deprecations.
    • EIP‑7939 usage hotspots (bit‑ops, ZK‑friendly math). (soliditylang.org)
  1. Property‑based dynamic analysis
  • Foundry invariant tests and Echidna campaigns (coverage‑guided, mutational), with medusa for parallel fuzzing. We measure coverage, unique crash seeds, and invariant strength per hour to ensure meaningful exploration—not vanity runs. (github.com)
  • Symbolic and SMT‑driven checks where appropriate (e.g., halmos/SMTChecker paths for boundary arithmetic and authorization invariants), tied into CI.
  1. ZK circuit and verifier review
  • Circuit audits (Circom/Halo2/Plonkish): constraint soundness, selector domain, lookup padding, copying constraints, and transcript binding. We require circuit builds with Circom ≥2.2.x using new sanity‑check flags; for Halo2, we review Fiat‑Shamir domain separation and transcript challenges. (github.com)
  • Verifier audits against known classes: “last challenge” bugs, frozen‑heart‑like failures, pairing checks, and batching edge cases; we validate against public advisories. (openzeppelin.com)
  • Where formal proof is justified (high‑TVL rollups), we integrate Lean‑based reasoning for Halo2 circuits (Nethermind Halva) to prove circuit/constraint properties. (nethermind.io)
  1. Economic and cost‑model validation
  • Recompute your post‑Dencun fee model, checking blob gas and calldata usage against EIP‑4844; validate “gas‑to‑cash” conversions in business cases (pricing, rebates, settlement). (blockworks.co)
  • Micro‑optimizations: MCOPY (EIP‑5656) adoption thresholds, EIP‑1153 transient patterns for locks/approvals, and EIP‑7939 CLZ substitutions in bit‑math heavy paths—measured with reproducible benches. (eips.ethereum.org)
  1. Remediation sprints and secure SDLC uplift
  • We don’t stop at findings. Our engineers pair with your team to land PRs, add invariant/property tests, and gate CI on Slither/Echidna. Artifacts are captured as SOC 2 evidence.
  • We update your architecture docs and threat models for RFPs and exchange listings.
  1. Attestation and procurement package
  • EthTrust v3 mapping (S/M/Q levels), OWASP SCSVS checklist, and an executive summary that ties technical risk to ROI/TCO and timeline impact. This is the artifact your procurement and finance teams actually need to sign off. (entethalliance.org)

If you also need implementation support, we can extend engagement lines into custom blockchain development services, smart contract development, and blockchain integration.


Practical examples (with current specifics you can apply this sprint)

  1. Replace storage‑based reentrancy locks with transient storage
  • Why: EIP‑1153 introduces TSTORE/TLOAD (~100 gas each, no persistence), perfect for single‑tx locks and “temporary approvals.” This avoids refund games and SSTORE cold‑slot penalties. (eips.ethereum.org)
  • How we audit:
    • Confirm locks don’t cross external calls that may yield control beyond the intended scope.
    • Ensure lock keys are domain‑separated (selector + msg.sender + context) to avoid collisions in multi‑call flows.
    • Negative tests: fuzz call sequences to prove the lock clears on all exit paths (including reverts and try/catch).
  1. Stop relying on SELFDESTRUCT logic for lifecycle management
  • Why: Post‑Dencun, SELFDESTRUCT no longer deletes code/state except when called in the same transaction as creation. Metamorphic deploy patterns for upgrades are now brittle. (eips.ethereum.org)
  • How we audit:
    • Flag any metamorphic patterns; recommend UUPS/proxy with AccessManager/role‑gated upgrades and on‑chain timelocks.
    • Invariant: “implementation cannot be set to address(0)” and “upgrade paths require N‑of‑M governance.”
  1. Osaka/EOF and compiler target sanity
  • Why: Solidity 0.8.31 defaults to Osaka semantics; adds CLZ and deprecates legacy constructs ahead of 0.9.0. EOF changes impact deployment tooling and debugging. (soliditylang.org)
  • How we audit:
    • Normalize compilers in CI, pin
      --evm-version
      , and smoke‑test with
      --via-ir
      + EOF pre‑releases for size/perf deltas.
    • Search for deprecated calls (.send/.transfer), ensure
      CLZ
      adoption where it materially shrinks math paths; re‑measure ZK proving costs where bit‑ops are hot. (eips.ethereum.org)
  1. ZK verifier “last challenge” hardening
  • Why: Incorrect Fiat‑Shamir transcript binding can let provers forge valid‑looking proofs. OpenZeppelin’s analysis of Linea’s verifier class exemplifies the risk. (openzeppelin.com)
  • How we audit:
    • Reconstruct the transcript; ensure every gate/lookup and commitment feeds randomness consistently; cross‑check against the reference spec.
    • Add property tests that mutate transcript elements to assert verifier rejects altered challenges.
  1. Circom 2.2.x sanity checks and Halo2/Plonky2 lookups
  • Why: Circom added build‑time sanity flags that catch constraint pathologies; lookup‑table padding bugs (e.g., CVE‑2025‑24802 in Plonky2) show the class of errors we must guard against across libraries. (github.com)
  • How we audit:
    • Enforce
      --sanity_check
      in reproducible builds; fuzz witness generators; verify lookup table lengths/padding; assert domain sizes align with arithmetization.
  1. EthTrust v3 + SCSVS procurement alignment
  • Why: Buyers validate against EthTrust v3; SWC alone no longer signals audit depth. SCSVS complements with process guidance. (entethalliance.org)
  • How we audit:
    • Tag each finding to EthTrust clauses (S/M/Q) and SCSVS controls; deliver a checklist and traceable fixes your procurement and risk teams can file.

Technical checklist we run by default

  • Compiler/EVM:
    • Solidity pinned (≥0.8.30/0.8.31),
      --evm-version
      set; EOF smoke tested where relevant; deprecation sweep for 0.9.0 items. (soliditylang.org)
    • Dencun/Pectra/Osaka impacts: EIP‑4844 blobs, EIP‑5656 MCOPY, EIP‑6780 SELFDESTRUCT, EIP‑7939 CLZ adoption plan. (blockworks.co)
  • Security analysis:
    • Slither + custom detectors (with Slither‑MCP for code intelligence); manual review on high‑risk flows (auth, pausing, upgrade, fee accounting). (github.com)
    • Fuzz/invariant coverage targets with Foundry/Echidna/medusa; crash triage automation and seed minimization. (github.com)
  • ZK:
    • Verifier correctness against “last challenge” and Fiat‑Shamir domain binding; lookup gate soundness; Halo2/Circom build reproducibility with sanity flags. (openzeppelin.com)
  • Compliance evidence (SOC 2):
    • Threat model, secure code review logs, SBOMs, CI artifacts (static analysis/fuzzing runs), change control approvals, and release gates mapped to EthTrust v3/SCSVS.

ROI and GTM proof points (how this pays back)

  • Loss avoidance baseline: With ~$3.4B in crypto theft in 2025 and concentration in “big‑game” events, the expected loss curve is fat‑tailed. An audit that specifically addresses transcript binding (ZK), SELFDESTRUCT/upgrade patterns, and wallet‑compromise blast‑radius materially reduces tail risk used in enterprise VaR models and cyber‑insurance questionnaires. (chainalysis.com)
  • Gas/Infra savings:
    • Swap stateful locks/approvals to EIP‑1153 transient storage: eliminate persistent SSTORE overhead in hot paths. We routinely find 3–5% end‑to‑end gas savings in transaction bundles where locks/approvals dominate, and larger savings on batched operations. (eips.ethereum.org)
    • Adopt MCOPY for memory‑heavy routines (ABI/bytes transforms) and CLZ for bit‑ops to cut compute/bytecode—also reducing ZK proving costs on zkVM backends. (eips.ethereum.org)
  • Time‑to‑market and procurement velocity:
    • EthTrust v3 + SCSVS mapping, SOC 2 evidence packaging, and SDLC gates remove the most common blockers in enterprise RFPs and exchange listings. This shortens “security review” lead time and de‑risks QBRs. (entethalliance.org)

Frequently missed issues we’ll look for immediately

  • Upgradeability assumptions broken by EIP‑6780; legacy “burn via selfdestruct” logic.
  • Mis‑keyed domain separators in permit‑like flows (chainId replay, name/version drift).
  • Blob‑cost blind spots post‑EIP‑4844 in L2 settlement and data availability strategy.
  • Unsafe “assembly” sections without memory‑safe proofs; opportunity to replace bit‑math with CLZ.
  • ZK verifiers with weak transcript binding or unchecked batching; Circom/Halo2 pipelines lacking sanity checks.

Where 7Block plugs into your roadmap


Summary you can share internally

  • A modern smart contract audit validates correctness, cost, and compliance under Dencun→Osaka changes and ZK realities; it’s measured against EthTrust v3/SCSVS and your SOC 2. It’s not “a PDF”—it’s a release gate and a procurement accelerator. (entethalliance.org)
  • 7Block’s approach blends Slither‑MCP static analysis, Foundry/Echidna fuzz invariants, EIP‑aware code reviews (EIP‑1153/5656/6780/7939), and ZK circuit+verifier audits—with artifacts your procurement and finance teams can use on day one. (blog.trailofbits.com)

Book a 90-Day Pilot Strategy Call

Like what you're reading? Let's build together.

Get a free 30‑minute consultation with our engineering team.

Related Posts

7BlockLabs

Full-stack blockchain product studio: DeFi, dApps, audits, integrations.

7Block Labs is a trading name of JAYANTH TECHNOLOGIES LIMITED.

Registered in England and Wales (Company No. 16589283).

Registered Office address: Office 13536, 182-184 High Street North, East Ham, London, E6 2JA.

© 2025 7BlockLabs. All rights reserved.