/DApp_Postmortems

DApp_Postmortems is a repository dedicated to the analysis and reproduction of real-world exploits within the Web 3.0 ecosystem, focusing on Solidity-based decentralized applications (DApps).

Primary LanguageSolidityMIT LicenseMIT

DApp Security Incidents Postmortems

Github Actions X Community

Introduction

A curated collection of Proof of Concepts (POCs) demonstrating security incidents in decentralized applications (DApps) on EVM-compatible chains. Each POC recreates real-world smart contract vulnerabilities, providing valuable insights for developers and security researchers.

Credit: DefiHackLabs

Objectives

  • Optimize POC test compilation through modular codebase design
  • Enhance code readability and lower contribution barriers
  • Maintain POCs with latest Foundry testing practices
  • Establish consistent codebase standards

View our DApp Hacks Dashboard

Quick Start

  1. Install Foundry

  2. Clone and setup:

git clone https://github.com/emilesean/DApp_Postmortems.git
forge soldeer init
  1. Run POCs:
forge test --contracts <contract> -vvv
# Example: forge test --contracts ./test/2022-07/Audius.t.sol -vvv

Known Issues

EVM Version Compatibility

Some POCs require specific EVM versions (check @KeyInfo section):

forge test --contracts <contract> --evm-version <evm-version> -vvv
# Example: forge test --contracts ./test/2022-08/LuckyTiger.t.sol --evm-version london -vvv

BSC Network Limitations

  • Slower response times from BSC RPC nodes
  • Limited historical block access on non-archive nodes
  • Common error:
It looks like you're trying to fork from an older block with a non-archive node which is not supported.
Please try to change your RPC url to an archive node if the issue persists.

Performance Note

Higher verbosity levels (-v, -vv, -vvv) will increase test execution time.

Contributing

See our Contributing Guidelines

Disclaimer

This repository contains proof-of-concept demonstrations for educational purposes only. The content should not be used for illegal activities or actual hacking attempts. Users are responsible for ensuring compliance with applicable laws and regulations.