← ClaudeAtlas

web3-poc-foundrylisted

Complete Foundry PoC writing guide + all cheatcodes + DeFiHackLabs reproduction patterns. Use this when building a proof of concept exploit, setting up a fork test, using Foundry cheatcodes, or reproducing a known DeFi hack for learning.
Olaradiallysymmetrical491/web3-bug-bounty-hunting-ai-skills · ★ 0 · Web & Frontend · score 72
Install: claude install-skill Olaradiallysymmetrical491/web3-bug-bounty-hunting-ai-skills
# PoC WRITING + FOUNDRY COMPLETE REFERENCE Immunefi requires RUNNABLE code. Not pseudocode. Not steps. Running Foundry tests with before/after logs and a passing assert. --- ## QUICK START ```bash # Immunefi official templates (preferred for submissions) forge init my-poc --template immunefi-team/forge-poc-templates --branch default forge init my-poc --template immunefi-team/forge-poc-templates --branch reentrancy forge init my-poc --template immunefi-team/forge-poc-templates --branch flash_loan forge init my-poc --template immunefi-team/forge-poc-templates --branch price_manipulation # Or blank Foundry project forge init my-poc cd my-poc # Setup .env echo "MAINNET_RPC_URL=https://eth.llamarpc.com" > .env echo "BASE_RPC_URL=https://base.llamarpc.com" >> .env echo "ARB_RPC_URL=https://arb1.arbitrum.io/rpc" >> .env # Run exploit source .env forge test --match-test testExploit -vvvv --fork-url $MAINNET_RPC_URL ``` --- ## STANDARD PoC TEMPLATE (Production Quality for Immunefi) ```solidity // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; import "forge-std/Test.sol"; import "forge-std/console.sol"; /** * @title [Protocol Name] - [Bug Description] * @notice PoC for Immunefi submission * @dev Demonstrates [impact] by exploiting [root cause] * * Vulnerable contract: [address] ([name]) * Vulnerable function: [functionName] * Immunefi program: [URL] * Severity: [Critical/High/Medium/Low] */ // Minimal interfaces — only what you need interface IVulnPr