Practical overview
When it fits
Use it when you want command-line, test-driven practice with DeFi exploit challenges and already work in a Foundry-oriented development environment.
Who it is for
- Developers learning offensive security for DeFi smart contracts.
- Aspiring bug hunters and security auditors seeking hands-on Solidity challenge practice.
Documented uses
- Write an exploit solution for a DeFi challenge in a Solidity test file.
- Run a selected challenge and use successful execution as the stated pass condition.
- Practice Foundry cheatcodes such as prank or startPrank when using the attacker account.
Requirements & limits
The repository is public and lists an MIT license.
- The workflow requires the Foundry toolchain and command-line use.
- Solutions are written in supplied Solidity test files rather than through a hosted course interface.
- The README lists ds-test, forge-std and OpenZeppelin contracts as preinstalled dependencies.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up and run a Foundry challenge
Prepare the repository, write a Solidity challenge solution and run the selected level.
Before you start
- A terminal environment for Foundry and the repository.
- Foundry, including forge and cast.
Steps
Install Foundry with foundryup, then open a new terminal session or reload PATH and run foundryup.
Clone the repository, change into its directory and install dependencies with forge install.
Write the solution in the matching [NAME_OF_THE_LEVEL].t.sol file in the test folder.
Run the level with make [CONTRACT_LEVEL_NAME] or use ./run.sh with a level folder name, challenge number or four-letter name prefix.
Expected outcome
The selected challenge runs; the README says a successful execution means the challenge is passed.
Guide limitations
- Challenges require use of the attacker account; the README points to Foundry prank or startPrank cheatcodes.
- Some solutions may require coding and deploying custom smart contracts.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- nicolasgarcia214/damn-vulnerable-defi-foundry · Official homepage title · retained in its source language

