Web3 Hunt Zksync Era logo

Web3 Hunt Zksync Era

CommunityPopular
tradecatlabs
web3-hunt-zksync-era

ZKsync Era (Immunefi) completed hunt — 0 findings after exhaustive 5-session audit. Use as a DEFENSE STUDY — learn what makes a protocol unhuntable, which patterns block all 10 bug classes, and when to abandon a target. Contains architecture breakdown, 25 tested attack vectors, and pre-dive scoring refinements for large L1 bridge protocols.

Overview

Publishertradecatlabs
Repositoryvibe-coding-cn
Skill nameweb3-hunt-zksync-era
Stars
16.3K
Forks
1.6K
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by tradecatlabs on GitHub. Read the source before you install it.

Installation

Install the Web3 Hunt Zksync Era AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tradecatlabs/vibe-coding-cn.git /tmp/vibe-coding-cn
mkdir -p .claude/skills
cp -r /tmp/vibe-coding-cn/research/vibe-cybersecurity-cn/skills/web3-bug-bounty-hunting/web3-hunt-zksync-era .claude/skills/web3-hunt-zksync-era
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Web3 Hunt Zksync Era in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Web3 Hunt Zksync Era on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Web3 Hunt Zksync Era is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

LIVE HUNT: ZKsync Era (Immunefi) — COMPLETED, 0 FINDINGS

Outcome: 0 submittable findings after 5+ sessions, 22+ agents, 25+ contracts, 25+ attack vectors Lesson: This file exists as a DEFENSE STUDY — what a hardened protocol looks like, and when to stop hunting.


TARGET PROFILE

FieldValue
ProtocolZKsync Era (L2 rollup)
PlatformImmunefi
TVL$322M (L2BEAT Total Value Secured)
Bounty$100K minimum Critical, $1.1M max
Codebase750K LOC (Solidity + Rust + Yul)
AuditsOpenZeppelin V29 (June 2025), multiple prior audits
VersionProtocol V29.4
Repogithub.com/matter-labs/era-contracts
PrimacyPrimacy of Impact — even out-of-scope assets qualify
Prior payouts$50K (ChainLight ZK circuit bug)

Pre-Dive Scorecard

CheckResultScore
TVL > $500K$322MPASS
Max payout > $10K$100K minimumPASS
Simple protocol?750K LOC, L1↔L2 bridge + ZK + governancePASS (complex)
< 500 lines?750K LOCPASS
Audit qualityOpenZeppelin (top-tier) on ALL critical pathsWARNING

REFINEMENT: Pre-dive should weight audit quality MORE for large protocols. A protocol passing TVL/LOC/payout checks can still be unhuntable if OZ/ToB audited the exact code you'd hunt. Add "audit firm tier" as a SOFT kill signal for 500K+ LOC protocols.


ARCHITECTURE (What Makes It Hardened)

L1 Bridge Stack

Bridgehub (router)
  ├── L1AssetRouter (token routing)
  │     ├── L1Nullifier (deposit/withdrawal state)
  │     └── L1NativeTokenVault (token custody)
  ├── ChainTypeManager (chain registration)
  └── ValidatorTimelock (RBAC execution delay)

L2 System Contracts (kernel space 0x8000-0xFFFF)

Bootloader (0x8001) → AccountCodeStorage, NonceHolder, KnownCodeStorage,
ImmutableSimulator, ContractDeployer, L1Messenger (0x8008),
MsgValueSimulator, L2BaseToken (0x800a), SystemContext (0x800b),
BootloaderUtilities, Compressor, ComplexUpgrader

L2 User Space Contracts (0x10000+)

Create2Factory, Bridgehub, AssetRouter, NativeTokenVault, MessageRoot

Diamond Proxy Pattern (EIP-2535)

  • All facets (Admin, Executor, Mailbox, Getters) share single ZKChainStorage struct
  • No storage collision possible between facets
  • Function selectors explicitly mapped in DiamondCut

ALL 25 ATTACK VECTORS TESTED

Critical Path (Vectors 1-8)

#VectorTargetWhy It Failed
1UnsafeBytes offset miscalculationL1Nullifier _parseL2WithdrawalMessageAll callers pre-validate message length before UnsafeBytes calls
2Legacy/new boundary double-withdrawalL1Nullifier_isLegacyTxDataHash try/catch returns false on decode failure; encoding prefix discriminator prevents collision
3secondBridgeAddress return value manipulationBridgehub requestL2TransactionTwoBridges>0xFFFF check blocks system contracts; L2-side msg.sender auth makes crafted returns useless
4Failed deposit claim wrong amount (legacy encoding)L1Nullifier claimFailedDepositLegacy hash uses try/catch; depositHappened correctly tracks per-encoding-version
5V29 interop root forgeryExecutoraddChainBatchRoot requires onlyChain + onlyL2; historical roots verified via Merkle
6Missing access control on sibling functionAll bridge contractsEvery external function has appropriate modifier; checked all 50+ external functions
7Fee-on-transfer token accounting desyncNativeTokenVaultL1ERC20Bridge: if (amount != _amount) revert TokensWithFeesNotSupported()
8Governance timelock bypassValidatorTimelock5-role RBAC via AccessControlEnumerable; block.timestamp >= commitTimestamp + delay

Extended Surface (Vectors 9-25)

#VectorWhy It Failed
9GatewayTransactionFilterer bypassEra mainnet: transactionFilterer == address(0), not used
10Precommitment sentinel collision_revertBatches properly resets precommitment; sentinel values don't collide
11L2→L1 message forgery via sendToL1Anyone can call sendToL1, but L1 verifies sender=0x8008 in log — can't forge system log sender
12Compressor state diff manipulationpublishCompressedBytecode called only from bootloader context
13Admin privilege escalationDiamond proxy admin is governance; no facet can self-modify
14Fee calculation overflowAll fee math uses SafeMath or checked arithmetic
15Free L2 transaction abusereservedDynamic field properly handled; bootloader validates gas
16DataEncoding L1/L2 mismatchAll 10 encode/decode pairs verified consistent across L1↔L2
17NTV token registration race_ensureTokenRegistered is idempotent; double registration returns same assetId
18Asset ID collisionkeccak256(chainId, ntvAddress, tokenAddress) — no collision possible
19Beacon proxy CREATE2 collisionStandard CREATE2; address determined by deployer+salt+bytecodeHash
20Cross-contract reentrancyEach contract has independent ReentrancyGuard AND follows CEI
21Address aliasing collisionBijective mapping (add/subtract offset mod 2^160)
22Diamond proxy selector clashExplicit selector mapping in DiamondCut; duplicates would revert
23Priority tree manipulationMerkle range proofs; unprocessedIndex only moves forward
24Chain migration state corruptionforwardedBridgeMint validates consistency; atomic revert on mismatch
25Cross-chain message replayisWithdrawalFinalized[chainId][batch][index] prevents replay

WHY THIS PROTOCOL IS UNHUNTABLE (Solidity Surface)

Defense Pattern 1: CEI Everywhere

solidity
// L1Nullifier._finalizeDeposit (line 411)
isWithdrawalFinalized[chainId][l2BatchNumber][l2MessageIndex] = true; // EFFECT first
// ... then external call to NTV

Every single withdrawal/claim/deposit path follows Check-Effect-Interact.

Defense Pattern 2: Independent Access Control on L2

Each L2 system contract independently enforces access:

  • L2BaseToken.transferFromTo: checks msg.sender against 3 allowed callers
  • L1Messenger.sendToL1: open to anyone, but L1 verifies sender field in log
  • SystemContext: onlyCallFromBootloader on all state-changing functions
  • No single RBAC failure cascades

Defense Pattern 3: Encoding Collision Resistance

LEGACY_ENCODING_VERSION = 0x00  (first byte)
NEW_ENCODING_VERSION    = 0x01  (first byte)

Different first byte = impossible to confuse one format for another.

Defense Pattern 4: Mature Legacy Boundary Handling

Three bridge generations coexist cleanly:

  1. L1ERC20Bridge (legacy wrapper → delegates to AssetRouter)
  2. L1SharedBridge (previous → absorbed into AssetRouter/Nullifier)
  3. L1AssetRouter + L1Nullifier (current)

Each boundary has explicit version checks, try/catch decoding, and fallback paths.

Defense Pattern 5: Audit Fix Quality

V29 OZ audit found 3 HIGHs. All fixes were thorough — not just patches but architectural improvements. The "least audited code" assumption (that fixes are hastily applied) did NOT hold here.


STRATEGIC TAKEAWAYS

When to Abandon a Large L1 Bridge Target

  1. After systematically testing top 8 attack vectors (Days 1-2): if all blocked, ROI drops exponentially
  2. If OZ/ToB audited the EXACT codebase version you're reviewing (not an older version)
  3. If 22+ automated agents all return clean across all contracts
  4. If encoding, access control, and CEI are all consistently applied with zero exceptions

What Could Still Work on ZKsync

  1. ZK circuits (Rust/RISC-V) — different skillset, different attack surface, prior $50K payout proves bugs exist there
  2. Bootloader assembly (Yul) — 5000+ lines of hand-written Yul, complex gas accounting, less audited
  3. New code drops (V30+) — fresh code = fresh bugs. Monitor era-contracts releases
  4. EVM emulation edge casesEvmGasManager, EVM opcode compatibility gaps
  5. Interop protocol (when launched) — L2InteropRootStorage is minimal now, but interop = massive new surface

Pre-Dive Scoring Refinement

Add to the scorecard:

SOFT KILL: If protocol has OZ/ToB/Cyfrin audit on current version AND codebase > 500K LOC
           → expect 40+ hours for MAYBE 1 finding
           → only proceed if bounty floor > $50K AND you have protocol-specific expertise

NEXT: 08-ai-tools.md

Frequently asked questions

What does the Web3 Hunt Zksync Era AI skill do?

ZKsync Era (Immunefi) completed hunt — 0 findings after exhaustive 5-session audit. Use as a DEFENSE STUDY — learn what makes a protocol unhuntable, which patterns block all 10 bug classes, and when to abandon a target. Contains architecture breakdown, 25 tested attack vectors, and pre-dive scoring refinements for large L1 bridge protocols.

Why use Web3 Hunt Zksync Era on TypingMind?

Because you install it once and use it with any model. Web3 Hunt Zksync Era is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Web3 Hunt Zksync Era in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/tradecatlabs/vibe-coding-cn/tree/develop/research/vibe-cybersecurity-cn/skills/web3-bug-bounty-hunting/web3-hunt-zksync-era. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Web3 Hunt Zksync Era?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Web3 Hunt Zksync Era?

As many as you like. As long as a model supports skills, you can use Web3 Hunt Zksync Era with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Web3 Hunt Zksync Era AI skill free?

Yes. It is published on GitHub by tradecatlabs under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇