In this repository, I try to perform a mainnet fork and then simulate popular smart contract exploits on various DEFI Protocols using Foundry Framework.
forge test --contracts ./test/1_TreasureDAO.sol -vv
Reference - https://slowmist.medium.com/analysis-of-the-treasuredao-zero-fee-exploit-73791f4b9c14
forge test --contracts ./test/2_Cover.sol --match-contract CoverProtocolHack -vv
Reference - https://mudit.blog/cover-protocol-hack-analysis-tokens-minted-exploit/
forge test --contracts ./test/3_ApeAirdrop.sol --match-contract ApeAirdropExploit -vv
Reference - https://medium.com/amber-group/reproducing-the-ape-airdrop-flash-loan-arbitrage-exploit-93f79728fcf5
forge test --contracts ./test/4_RedatedCartel.sol --match-contract RedactedCartelExploit -vv
Reference - https://medium.com/immunefi/redacted-cartel-custom-approval-logic-bugfix-review-9b2d039ca2c5
forge test --contracts ./test/5_VisorFinance.sol --match-contract VisorFinanceExploit -vv
forge test --contracts test/6_ShadowFi.sol --match-contract ShadowFiExploit -vv
Reference - https://medium.com/quillhash/shadowfi-301k-burn-function-exploit-analysis-quillaudits-45a17ce04193
forge test --contracts ./test/7_Discover.sol --match-contract DiscoverExploit -vv
Reference - https://www.twitter.com/BeosinAlert/status/1533734518623899648
https://www.anquanke.com/post/id/274003
forge test --contracts ./test/8_BadGuysbyRPF --match-contract BadGuysbyRPFExploit -vv
Reference - https://twitter.com/RugDoctorApe/status/1565739119606890498
https://etherscan.io/tx/0xb613c68b00c532fe9b28a50a91c021d61a98d907d0217ab9b44cd8d6ae441d9f