Skip to content

yAudit/blockchain_hacks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blockchain Hacks

⚠️ Disclaimer: This repository is strictly for educational and research purposes. It contains Proof of Concept (PoC) implementations of historical blockchain hacks to help developers and auditors understand smart contract security. Unauthorized use of these techniques against live protocols is illegal. Use this information responsibly and at your own risk.

This repository contains proof of concept implementations of historical blockchain hacks. It uses Foundry for mainnet fork testing to simulate attacks in a real-world environment.

1. Prerequisites

Ensure you have Foundry installed. If not, run:

curl -L https://foundry.paradigm.xyz | bash
foundryup

2. Setup

  1. Clone the repository:
git clone https://github.com/yAudit/blockchain_hacks
cd blockchain_hacks
  1. Install dependencies:
forge install
  1. Configure RPC Endpoint: Open foundry.toml in the root directory and add your Ethereum mainnet RPC URL (e.g., from Alchemy or Infura) under the [rpc_endpoints] section:
[rpc_endpoints]
mainnet = "https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY"

3. Exploit Reports

# Project Test File Hacked Date
1 Balancer V2 test/BalancerV2.t.sol November 03, 2025

4. Running the Code

Once your RPC is configured, you can run the exploit simulation:

# Run all tests
forge test

# Run the Balancer V2 exploit
forge test --match-path test/BalancerV2.t.sol

# Run with traces to see the step-by-step exploit logic
forge test --match-path test/BalancerV2.t.sol -vvvv

About

This repository contains proof of concept implementations for historical blockchain hacks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors