Visit damnvulnerabledefi.xyz
Big thanks to Tincho who created the first version of this game and to all the fellows behind the Foundry Framework
Damn Vulnerable DeFi is the wargame to learn offensive security of DeFi smart contracts.
Throughout numerous challenges you will build the skills to become a bug hunter or security auditor in the space. đĩī¸ââī¸
First run the command below to get foundryup, the Foundry toolchain installer:
curl -L https://foundry.paradigm.xyz | bash
Then, in a new terminal session or after reloading your PATH, run it to get the latest forge and cast binaries:
foundryup
git clone https://github.com/nicolasgarcia214/damn-vulnerable-defi-foundry.git
cd damn-vulnerable-defi-foundry
forge install
[NAME_OF_THE_LEVEL].t.sol
files (inside each level's folder in the test folder)make [CONTRACT_LEVEL_NAME]
or
./run.sh [LEVEL_FOLDER_NAME]
./run.sh [CHALLENGE_NUMBER]
./run.sh [4_FIRST_LETTER_OF_NAME]
If the challenge is executed successfully, you've passed!đđ
prank
or startPrank
.ds-test
for testing, forge-std
for better cheatcode UX, and openzeppelin-contracts
for contract implementations.