Home

Awesome

A set of challenges to learn offensive security of smart contracts on Starknet.

Featuring flash loans, price oracles, governance, NFTs, lending pools, smart contract wallets, timelocks, and more!

Play

Visit damnvulnerabledefi.xyz.<br> Note that this is an adaptation of the original set of challenges, which were written in Solidity, so you would have to use this repository to complete the challenges in Cairo.

Setup

Install Cairo compiler v2.0.1<br> See https://github.com/franalgaba/cairo-installer<br> <br> Install Scarb version 0.5.1.<br> See https://github.com/software-mansion/asdf-scarb (recommended) and https://docs.swmansion.com/scarb <br> To confirm installation, run $ scarb --version which should output

scarb 0.5.1 (798acce7f 2023-07-05)
cairo: 2.0.1 (https://crates.io/crates/cairo-lang-compiler/2.0.1)

To test your solution, run scarb cairo-test -f <TEST_FILE_NAME>. <br>E.g scarb cairo-test -f side_entrance_lender_pool <br> <br>

Support

For Q&A, support and troubleshooting running Damn Vulnerable DeFi, go here.

Disclaimer

All Cairo code, practices and patterns in this repository are DAMN VULNERABLE and for educational purposes only.

DO NOT USE IN PRODUCTION.