OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Damn Vulnerable DeFi – Foundry Version

Damn Vulnerable DeFi - Foundry Version is a command-line smart-contract security wargame. It provides DeFi challenge levels where learners write Solidity exploit solutions in test files and run them with Foundry.

Independent OpenViST project profile, based on linked sources.

Damn Vulnerable DeFi - Foundry Version — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. Install Foundry with foundryup, then open a new terminal session or reload PATH and run foundryup.

  2. Clone the repository, change into its directory and install dependencies with forge install.

  3. Write the solution in the matching [NAME_OF_THE_LEVEL].t.sol file in the test folder.

  4. 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.
Evidence and transparency

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