Web3 Security Mastery — 16-Week Roadmap

Instructor stance: Principal Web3 Security Engineer & Auditor Target learner: Developer with 1+ year of general programming experience → professional Web3 auditor Method: Primary sources (Ethereum/Solidity docs, EIPs) + audit firm research (Trail of Bits, ConsenSys Diligence, OpenZeppelin, Spearbit, ChainSecurity, Sigma Prime) + real post-mortems (Rekt, Immunefi, Code4rena, Sherlock) + hands-on Foundry labs that reproduce the exploit Output goal: After 16 weeks you can pick up an unknown protocol, scope it, threat-model it, find real bugs in it, write a professional report, and verify remediation.


Philosophy

"Auditors don't read code looking for bugs. They build a mental model of what the
 system is supposed to do, then look for the cases the developer didn't model.
 The exploit is always where the developer's mental model and the EVM's actual
 behavior diverge."

This course rejects three common bad habits:

  1. “Tool-driven auditing” — running Slither and reporting whatever it says. Tools find low-hanging fruit; auditors find high-impact bugs that tools cannot reason about (economic, accounting, cross-protocol, design-level).
  2. “Vulnerability checklist auditing” — scanning a known list of patterns. New protocols invent new bug classes faster than checklists are updated. A list is a floor, not a method.
  3. “Read post-mortem, feel smart” — exploits are obvious in hindsight. Real skill is finding them before forge run says PASS. Every case study in this course is reproduced as a PoC you write yourself.

What we train instead:

  1. System-level reasoning — read a protocol top-down, map trust boundaries, identify invariants, then look for state transitions that break them.
  2. Tool fluency — Foundry, Slither, Echidna, Medusa, Halmos, Certora, Tenderly — each has a use case and a limit. Know both.
  3. Economic + adversarial thinking — model the attacker’s capital, time, and access. A bug exploitable only with $1B of flash-loan liquidity that exists on mainnet is exploitable.
  4. Professional output — scoping doc, threat model, finding write-ups, severity rationale, remediation review. Auditing is a service, not a hobby.

16-Week Overview

gantt
    title Web3 Security Mastery — 16 Weeks
    dateFormat  YYYY-MM-DD
    axisFormat  %b %d

    section Phase 1: Foundations
    Week 01 - Blockchain & Crypto Fundamentals  :d1, 2026-05-25, 7d
    Week 02 - Ethereum & EVM Deep Dive          :d2, after d1, 7d
    Week 03 - Solidity & Foundry Workflow       :d3, after d2, 7d

    section Phase 2: SC Security Core
    Week 04 - Security Foundations CEI/AC       :d4, after d3, 7d
    Week 05 - Vulnerability Classes Part 1      :d5, after d4, 7d
    Week 06 - Vulnerability Classes Part 2      :d6, after d5, 7d
    Week 07 - Token Standards Integration       :d7, after d6, 7d

    section Phase 3: Protocol & Economic
    Week 08 - DeFi Security                     :d8, after d7, 7d
    Week 09 - Oracle, MEV, Economic Attack      :d9, after d8, 7d
    Week 10 - Bridges & Cross-Chain             :d10, after d9, 7d
    Week 11 - L2, Rollups, Modular              :d11, after d10, 7d

    section Phase 4: Adjacent Surfaces
    Week 12 - Wallets & Account Abstraction     :d12, after d11, 7d
    Week 13 - Frontend, dApp, Infrastructure    :d13, after d12, 7d
    Week 14 - Governance & DAO                  :d14, after d13, 7d

    section Phase 5: Professional Practice
    Week 15 - Audit Methodology & Tooling       :d15, after d14, 7d
    Week 16 - Report Writing & Capstone         :d16, after d15, 7d

Phase 1: Foundations (Weeks 1–3)

You cannot audit what you cannot read at the byte and opcode level. These three weeks build the substrate.

WeekTopicGoalLesson
01Blockchain & Crypto FundamentalsDistributed-ledger model, consensus (PoW/PoS), probabilistic vs deterministic finality, hash/signature/Merkle, ZK at conceptual level. Articulate which trust assumption underlies every Web3 component.Tuan-01-Web3-Blockchain-Crypto-Fundamentals
02Ethereum & EVM Deep DiveAccount model, transaction lifecycle (mempool → block → receipt), gas mechanics post-EIP-1559 & EIP-4844, EVM opcodes you’ll see in audits (CALL/STATICCALL/DELEGATECALL/CREATE2/SELFDESTRUCT), storage layout (slot math), calldata vs memory, ABI encoding, EIP roadmap awarenessTuan-02-Ethereum-EVM-Deep-Dive
03Solidity & Foundry WorkflowSolidity idioms (modifiers, custom errors, immutables, transient storage post-Cancun), inheritance, libraries, Foundry (forge test, forge coverage, cast, anvil, mainnet fork), CI for contractsTuan-03-Solidity-Foundry-Workflow

Phase 1 exit skills

  • Read a transaction trace and explain every CALL/SSTORE/LOG.
  • Compute the storage slot of any state variable (mapping included) by hand.
  • Write a Foundry test that forks mainnet, impersonates a whale, and asserts an invariant.
  • Explain why tx.origin is unsafe and what AA (ERC-4337) changes about that assumption.

Phase 2: Smart Contract Security Core (Weeks 4–7)

Every auditor builds a ‘mental vocabulary’ of vulnerability classes. The faster the pattern fires, the more bugs you find.

WeekTopicGoalLesson
04Security Foundations — CEI & ACChecks-Effects-Interactions, access-control patterns (Ownable, AccessControl, role granularity), pull-over-push payment, input validation, custom-error gas/UX, storage-layout hazards in inheritanceTuan-04-Security-Foundations-CEI-AC
05Vulnerability Classes Part 1Reentrancy (single / cross-function / cross-contract / read-only), unsafe external call (success not checked, return-data forge), delegatecall hazards, storage collision, uninitialized proxies, signature replay (cross-chain + cross-contract)Tuan-05-Vulnerability-Classes-Part-1
06Vulnerability Classes Part 2Oracle manipulation (spot vs TWAP), MEV/front-running, insecure randomness (blockhash, Chainlink VRF correct usage), flash-loan attack flow, integer/rounding bugs (precision loss, off-by-one in conversion), DoS patterns, gas griefingTuan-06-Vulnerability-Classes-Part-2
07Token Standards & Integration RiskERC-20 (approve race, transfer return-value differences), ERC-721/1155 callbacks, ERC-4626 inflation/donation attack, ERC-777 hook reentrancy, EIP-2612 permit & Permit2, weird tokens (fee-on-transfer, rebasing, deflationary, blacklist, multi-address)Tuan-07-Token-Standards-Integration-Risk

Phase 2 exit skills

  • Given a contract, identify all external-call boundaries and apply CEI mentally.
  • Write reentrancy PoCs for all four reentrancy variants in Foundry.
  • Calculate storage slot collisions in an upgradeable proxy.
  • Build an ERC-4626 vault inflation-attack PoC and explain the donation invariant.

Phase 3: Protocol & Economic Security (Weeks 8–11)

This is where high-paying audits live. Bugs here are rarely a single line — they emerge from interaction between modules under adversarial economic conditions.

WeekTopicGoalLesson
08DeFi SecurityConstant-product AMM math, concentrated-liquidity (Uniswap V3 math edges), lending protocol invariants (collateral factor, liquidation), liquidation incentive design, ERC-4626 vault accounting, stablecoin design (CDP / fractional / algorithmic), staking/restaking, perp funding-rate exploitsTuan-08-DeFi-Security-AMM-Lending-Vault
09Oracle, MEV & Economic AttackOracle architectures (push vs pull, on-chain vs off-chain), Chainlink Data Feed trust model, TWAP design and its manipulation cost, sandwich/back-run, MEV-Boost & PBS, private order flow (Flashbots Protect, MEV-Share), flash-loan-driven economic attack modelingTuan-09-Oracle-MEV-Economic-Attack
10Bridges & Cross-Chain SecurityBridge taxonomy (lock-mint / burn-mint / liquidity / native asset), trust models (multisig / MPC / light client / ZK), message-layer protocols (LayerZero, Wormhole, CCIP, Hyperlane, Axelar) and their attestation models, finality assumption, replay protection, reorg handlingTuan-10-Bridge-Cross-Chain-Security
11L2, Rollups & Modular BlockchainOptimistic rollups (OP Stack, Arbitrum Nitro), ZK rollups (zkSync Era, Scroll, Linea, Starknet, Polygon zkEVM), sequencer trust, fraud/validity proofs, data availability (calldata vs blob vs alt-DA), escape hatches, L1↔L2 messaging risk, shared sequencers (Espresso, Astria)Tuan-11-L2-Rollup-Modular-Security

Phase 3 exit skills

  • Audit a constant-product AMM for reserve drainage and rounding bugs.
  • Model a flash-loan + oracle-manipulation attack on a lending protocol with numbers.
  • Critique a bridge design for trust assumption, replay, and finality risk.
  • Explain how an optimistic rollup’s fraud-proof window affects an auditor’s threat model.

Phase 4: Adjacent Attack Surfaces (Weeks 12–14)

The contract is one mile of the supply chain. The wallet, the frontend, the indexer, the governance multisig — all are in scope for a real audit.

WeekTopicGoalLesson
12Wallet, AA & Key ManagementEOA vs smart wallet, Safe multisig (modules, guards, signing flow), MPC wallets, hardware wallet limits, session keys, ERC-4337 stack (UserOp, Bundler, EntryPoint, Paymaster), EIP-7702 set-code-tx implications, signature phishing, transaction simulationTuan-12-Wallet-AA-Key-Management
13Frontend, dApp & InfrastructureWallet connection flow (EIP-1193, WalletConnect), approval drainer patterns, frontend supply-chain (npm, CDN, DNS, IPFS pinning), RPC trust (Infura/Alchemy/QuickNode public RPC), indexer/relayer/keeper risk, monitoring (Forta, Tenderly Alerts)Tuan-13-Frontend-dApp-Infrastructure
14Governance & DAO SecurityToken-voting design, delegation, Compound Governor, OpenZeppelin Governor, Snapshot off-chain voting, timelocks, flash-loan governance attacks, multisig governance, emergency-pause patterns, parameter risk (oracle, fee, collateral factor)Tuan-14-Governance-DAO-Security

Phase 4 exit skills

  • Review a Safe multisig configuration and identify weak threshold / signer hygiene issues.
  • Trace a wallet-drainer attack from phishing link → signed permit2 → drained tokens.
  • Critique a Governor + Timelock setup for flash-loan resilience and emergency response.

Phase 5: Professional Practice (Weeks 15–16)

Bugs found in private are worth zero. This phase converts your skill into deliverables clients pay for.

WeekTopicGoalLesson
15Audit Methodology & ToolingScoping, threat modeling (STRIDE adapted to Web3), trust-boundary mapping, invariant identification, Slither / Echidna / Medusa / Halmos / Certora workflows, manual review checklist, severity classification (Immunefi vs C4 vs Sherlock conventions), remediation review processTuan-15-Audit-Methodology-Tooling
16Report Writing & CapstoneAudit report structure (Exec summary, Scope, Methodology, System overview, Findings, Severity matrix, Appendix), finding template (Description, Impact, PoC, Recommendation, Status), capstone audit project (~40h) on a multi-module protocolTuan-16-Report-Writing-Capstone

Phase 5 exit skills

  • Run a full audit workflow on an unknown codebase end-to-end.
  • Produce a polished audit report indistinguishable from a junior auditor at a top firm.
  • Defend severity assignments under push-back from the client.

Bonus Chapters (read when ready)

Deep dives and emerging-tech topics. No fixed order.

#TopicGoalLesson
Bonus-1Non-EVM: Solana / AnchorAccount model, signer/owner checks, account confusion, Cross-Program Invocation (CPI) security, Anchor constraint patterns, sealevel runtimeTuan-Bonus-Non-EVM-Solana
Bonus-2Non-EVM: CosmWasm / MoveCosmWasm message passing, reply mechanics, Move resource model, Sui object ownership, Aptos verifierTuan-Bonus-Non-EVM-CosmWasm-Move
Bonus-3Formal Verification Deep DiveCertora CVL spec language, Halmos symbolic execution, K framework, hyper-properties, when formal verification beats fuzzingTuan-Bonus-Formal-Verification-Deep
Bonus-4Fuzzing & Invariant Testing AdvancedEchidna config patterns, Medusa, Foundry invariant patterns (handler-based stateful fuzzing), shrinking, corpus managementTuan-Bonus-Fuzzing-Invariant-Advanced
Bonus-5ZK Circuit SecurityUnder-constrained bugs, soundness vs completeness, circom/halo2/noir, trusted setup risk, recursive proof composition, witness manipulationTuan-Bonus-ZK-Circuit-Security
Bonus-6Stablecoin Economic ModelingCDP (MakerDAO), algorithmic (failed UST), hybrid, depeg dynamics, liquidation cascades, oracle dependency, peg-defense mechanismsTuan-Bonus-Stablecoin-Economic-Modeling
Bonus-7Liquid Staking & RestakingLST design (Lido stETH, Rocket Pool rETH), EigenLayer restaking, AVS slashing, operator selection, dependency-tree risk for restakersTuan-Bonus-Liquid-Staking-Restaking
Bonus-8Audit Competition PlaybookCode4rena / Sherlock / Cantina strategy, time allocation, finding write-up style that ranks, judging culture, leaderboard ROI mathTuan-Bonus-Audit-Competition-Playbook
Bonus-9Bug Bounty (Immunefi)Severity scoring rubric, PoC packaging, responsible disclosure timeline, what protocols triage vs ignore, KYC / payout mechanicsTuan-Bonus-Bug-Bounty-Immunefi

Case Studies (after Phase 3)

Every case study = a Foundry repo where you reproduce the exploit, then write the audit finding as if you caught it pre-exploit.

#CaseClassLesson
01The DAO (2016)Reentrancy (original)Case-The-DAO-Reentrancy-2016
02Parity Multisig (2017)Uninitialized contract + delegatecallCase-Parity-Multisig-2017
03bZx (2020)Oracle manipulation + flash loanCase-bZx-Price-Manipulation-2020
04Harvest Finance (2020)Curve pool manipulationCase-Harvest-Finance-2020
05Cream / Iron Bank (2021)ERC-777 reentrancyCase-Cream-Iron-Bank-2021
06Poly Network (2021)Cross-chain access controlCase-Poly-Network-2021
07BadgerDAO (2021)Frontend injection (Cloudflare Worker)Case-BadgerDAO-Frontend-2021
08Wormhole (2022)Signature verification bypassCase-Wormhole-2022
09Ronin (2022)Validator key compromiseCase-Ronin-Bridge-2022
10Nomad (2022)Initial-message replayCase-Nomad-Bridge-2022
11Beanstalk (2022)Flash-loan governanceCase-Beanstalk-Governance-2022
12Euler (2023)Donation attack on accountingCase-Euler-Finance-2023
13Curve / Vyper (2023)Compiler-level reentrancy lock bugCase-Curve-Vyper-Compiler-2023
14KyberSwap Elastic (2023)Concentrated-liquidity math edge caseCase-KyberSwap-Elastic-2023
15Mixin Network (2023)Cloud key-storage compromiseCase-Mixin-Network-2023
16Galxe (2023)DNS hijack of frontendCase-Galxe-Frontend-Hijack-2023
17Radiant Capital (2024)Owner key compromise via malwareCase-Radiant-Capital-2024
18Penpie / Pendle (2024)Reentrancy in reward accountingCase-Penpie-Pendle-2024

Dependency Map between Weeks

graph LR
    W01[Wk 01<br>Crypto+Chain] --> W02[Wk 02<br>EVM]
    W02 --> W03[Wk 03<br>Solidity+Foundry]
    W03 --> W04[Wk 04<br>CEI/AC]
    W04 --> W05[Wk 05<br>Vuln 1]
    W05 --> W06[Wk 06<br>Vuln 2]
    W06 --> W07[Wk 07<br>Tokens]

    W07 --> W08[Wk 08<br>DeFi]
    W08 --> W09[Wk 09<br>Oracle/MEV]
    W08 --> W10[Wk 10<br>Bridges]
    W08 --> W11[Wk 11<br>L2]

    W05 --> W12[Wk 12<br>Wallet/AA]
    W12 --> W13[Wk 13<br>Frontend/Infra]
    W08 --> W14[Wk 14<br>Governance]

    W09 --> W15[Wk 15<br>Methodology]
    W10 --> W15
    W11 --> W15
    W13 --> W15
    W14 --> W15
    W15 --> W16[Wk 16<br>Report+Capstone]

    style W05 fill:#f9a825,stroke:#333,stroke-width:2px
    style W06 fill:#f9a825,stroke:#333,stroke-width:2px
    style W08 fill:#f9a825,stroke:#333,stroke-width:2px
    style W15 fill:#66bb6a,stroke:#333
    style W16 fill:#66bb6a,stroke:#333

Critical path: Weeks 05, 06, 08 (yellow) — the vulnerability backbone. Without these, the rest is theory. Weeks 15–16 (green) are deliverable training; everything before is input.


Alternative Study Plans

8-Week Intensive (40h/week, full-time)

Compress Phase 1 to 1 week (skip if you have EVM experience), pair Phase 2 weeks (2 per actual week), spend 2 weeks on Phase 3, 1 on Phase 4, 1 on Phase 5 + capstone. Recommended only for learners who already write Solidity.

12-Week Standard (25h/week)

The default plan above compressed by merging Wk 02+03 and Wk 13+14.

24-Week Part-Time (10h/week)

The 16-week plan extended: one lesson per 1.5 weeks, with the second half of the slow week dedicated to additional labs and one case-study reproduction.


Weekly Workflow

  1. Read the lessonTuan-XX.md plus the linked primary sources. No skipping reading.
  2. Set up the lab — Foundry repo, fork-mainnet config, mocked dependencies, etc.
  3. Reproduce the vulnerability — write the PoC test that demonstrates the bug. forge test -vvvv until trace is intuitive.
  4. Write a finding — pretend you caught the bug pre-exploit; write the audit finding into your finding journal.
  5. Review against checklist — apply the master checklist; what would you have missed?
  6. Optional: post the finding write-up to a personal blog or audit portfolio. Auditing is a portfolio profession.

Assessment System

ComponentWeightForm
Weekly quizzes (16 × 10 Qs)15%Multiple choice + short answer, ≥80% to pass each
Lab PoCs (one per week, ~32 total)35%Foundry test that demonstrates the vulnerability + passes forge test
Case-study reproductions (5 required)15%Full reproduction of historical exploit with finding write-up
Mid-course audit (after Week 8)10%20-hour mini-audit of a provided protocol; report graded against rubric
Capstone audit25%40-hour audit of a multi-module protocol (DeFi + governance + oracle); full report deliverable

Capstone rubric:

  • Coverage: every external function reviewed, every storage variable mapped (30%)
  • Findings: at least 3 valid Med+ findings (judged blind by reviewer with answer key) (30%)
  • Report quality: writing, formatting, severity rationale, PoCs (25%)
  • Threat model + invariant list quality (15%)

Commitment

The point of this course is not to make you a “Solidity expert” — that’s a developer goal, not an auditor goal. The point is to make you the engineer the protocol team trusts to sign off on a deploy.

When a $200M TVL launch is six weeks out, when the team’s lead dev is too close to the code to see the cliff, when the timelock is being set up for the first time — that’s when this skill cashes in.

16 weeks. One brick at a time. Built on EVM traces and PoCs, not vibes.


Last updated: 2026-05-16 See also: MOC-Web3-Security-Mastery · References