A comprehensive collection of Proof-of-Concept (PoC) implementations for various DeFi security incidents, built with Foundry.
| Incident | Vulnerability Type | Loss Amount | Researcher | PoC Link |
|---|---|---|---|---|
| Abracadabra Spell | Logic Bug | $1,700,000 | kyrie | PoC |
| Arcadia V2 | Re-entrancy | $2.5m | kyrie | PoC |
| Astera Fi | Oracle Manipulation | $820,000 | kyrie, castle | PoC |
| Balancer | Logic Bug | $128,000,000 | kyrie | PoC |
| BebopDEX | Access Control | $20,069 | kenny | PoC |
| Bunni V2 | Logic Bug | $8.4m | castle | PoC |
| Coinbase | Misconfiguration | $300k | Muang | PoC |
| Cozy V2 | Logic Bug | $427,000 | kyrie | PoC |
| CreditX | Control Hijacking | $4.5m | kenny | PoC |
| Dexodus Finance | Logic Bug | $300,000 | kyrie | PoC |
| GMX V1 Perps | Re-entrancy | $42m | kyrie | PoC |
| Impermax V3 | Logic Bug | $380,000 | kyrie | PoC |
| Kame Aggregator | Logic Bug | $3M | castle | PoC |
| Kinto Bridge | Backdoor | $1.55m | Muang | PoC |
| MetaPool | Access Control | $25,000 | castle | PoC |
| BigONE (NPM Supply Chain) | Social Engineering | $27m | kyrie | PoC |
| Numa.money | Oracle Manipulation | $320,000 | Sori | PoC |
| Peapods Finance | Oracle Manipulation | $175,000 | kyrie | PoC |
| Resupply | Oracle Manipulation | $9.6M | kyrie | PoC |
| Sharwa Finance | Logic Bug | $146,000 | castle | PoC |
| Silo Finance | Logic Bug | $546,000 | kyrie | PoC |
| SuperRare | Access Control | $730,000 | castle | PoC |
| SWAPP Staking | Logic Bug | $32,196 | kenny | PoC |
| WXC Token | Logic Bug | $39,000 | castle | PoC |
Total Loss Amount: ~$193M+
- Abracadabra Spell, Balancer, Bunni V2, Cozy V2, Dexodus Finance, Impermax V3, Kame Aggregator, Sharwa Finance, Silo Finance, SWAPP Staking, WXC Token
- Astera Fi, Numa.money, Peapods Finance, Resupply
- BebopDEX, MetaPool, SuperRare
- Arcadia V2, GMX V1 Perps
- Coinbase (Misconfiguration), CreditX (Control Hijacking), Kinto Bridge (Backdoor), BigONE (Social Engineering)
Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
Foundry consists of:
- Forge: Ethereum testing framework (like Truffle, Hardhat and DappTools).
- Cast: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- Anvil: Local Ethereum node, akin to Ganache, Hardhat Network.
- Chisel: Fast, utilitarian, and verbose solidity REPL.
$ forge build$ forge test$ forge test --match-path test/pocs/Balancer/*.sol -vvv$ forge fmt$ forge snapshot$ anvil$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>test/pocs/
βββ Abracadabra_V4/ # Logic Bug - $1.7M
βββ Arcadia_V2/ # Re-entrancy - $2.5M
βββ AsteraFi/ # Oracle Manipulation - $820K
βββ Balancer/ # Logic Bug - $128M
βββ Bebop/ # Access Control - $20K
βββ Bunniv2/ # Logic Bug - $8.4M
βββ Coinbase/ # Misconfiguration - $300K
βββ CozyFi_V2/ # Logic Bug - $427K
βββ CrediX/ # Control Hijacking - $4.5M
βββ Dexodus/ # Logic Bug - $300K
βββ GMX_V1/ # Re-entrancy - $42M
βββ Impermax_V3/ # Logic Bug - $380K
βββ Kame_Aggregator/ # Logic Bug - $3M
βββ Kinto_Bridge/ # Backdoor - $1.55M
βββ Metapool/ # Access Control - $25K
βββ NpmSupplyChainAttack/ # Social Engineering - $27M
βββ Numa/ # Oracle Manipulation - $320K
βββ PeapodsFinance/ # Oracle Manipulation - $175K
βββ ResupplyFi/ # Oracle Manipulation - $9.6M
βββ SharwaFinance/ # Logic Bug - $146K
βββ SiloFinance/ # Logic Bug - $546K
βββ SuperRare/ # Access Control - $730K
βββ Swapp/ # Logic Bug - $32K
βββ WXC_Token/ # Logic Bug - $39K
- Always validate input parameters and edge cases
- Implement comprehensive unit tests for all state transitions
- Use formal verification for critical functions
- Use Time-Weighted Average Price (TWAP) oracles
- Implement multiple oracle sources with price deviation checks
- Add delay mechanisms for large price changes
- Use OpenZeppelin's AccessControl or Ownable
- Implement role-based access control (RBAC)
- Always use modifiers for privileged functions
- Follow Checks-Effects-Interactions pattern
- Use ReentrancyGuard from OpenZeppelin
- Update state before external calls
- kyrie: Arcadia V2, Astera Fi, Balancer, Cozy V2, Dexodus, GMX V1, Impermax V3, BigONE, Peapods Finance, Resupply, Silo Finance, Abracadabra Spell
- castle: Astera Fi, Bunni V2, Kame Aggregator, MetaPool, Sharwa Finance, SuperRare, WXC Token
- kenny: BebopDEX, CreditX, SWAPP Staking
- Muang: Coinbase, Kinto Bridge
- Sori: Numa.money
This repository contains Proof-of-Concept code for educational and security research purposes only. The code demonstrates vulnerabilities found in real-world DeFi protocols.
DO NOT use this code for malicious purposes. The authors are not responsible for any misuse of the information or code provided in this repository.
This project is licensed under the MIT License - see the LICENSE file for details.
Last Updated: December 2025