# SunWeb3Sec/DeFiHackLabs

Reproduce DeFi hacked incidents using Foundry.

Repository: https://github.com/SunWeb3Sec/DeFiHackLabs
Canonical: https://ross.abutalabs.com/products/defihacklabs
Language: Solidity
License: Apache-2.0
License Family: permissive
Topics: defi, ethereum, foundry, solidity, web3
Last push: 2026-08-24T03:06:00+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 1545, "days_push": 9, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6759, forks 1470 (observed 2026-08-28T04:09:48.344421+00:00)

## What it is
A curated collection of 859+ DeFi hack incidents reproduced as Foundry proof-of-concept tests in Solidity, for studying how real exploits worked. It also includes a Web3 cybersecurity academy with on-chain transaction debugging lessons and root cause analyses.

## Use cases
- learn how past DeFi hacks happened
- reproduce blockchain exploit incidents in Foundry tests
- study smart contract vulnerability root causes
- practice on-chain transaction debugging
- train for smart contract security auditing
- find proof-of-concept code for historical DeFi attacks

## When to choose
- you want hands-on, executable reproductions of real DeFi exploits
- you are learning Solidity security auditing or on-chain debugging
- you need a large, actively updated corpus of hack case studies

## When to avoid
- you need a production security scanning or auditing tool rather than educational PoCs
- you want a general-purpose Solidity testing framework (use Foundry directly)
- you are looking for defensive tooling like automated vulnerability detection

## Facets
- artifact type: learning-resource
- maturity: active
- function: testing, security, developer-tools
- domain: blockchain, security, education, fintech
- platform: cli
- tags: defi, smart-contract-security, hack-reproduction, proof-of-concept, web3, exploit-analysis, foundry-tests, ethereum, solidity, foundry

## Member repositories
- SunWeb3Sec/DeFiHackLabs (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:48.344421+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:42:34.335611+00:00, confidence not recorded.
  - readme: https://github.com/SunWeb3Sec/DeFiHackLabs (fetched 2026-08-28T04:09:48.344421+00:00, sha cc62e46d7ac0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
