Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/credence0x/cairo-damn-vulnerable-defi

Damn Vulnerable Defi for Starknet
https://github.com/credence0x/cairo-damn-vulnerable-defi

cairo cairo-lan starknet

Last synced: 3 months ago
JSON representation

Damn Vulnerable Defi for Starknet

Lists

README

        

![](cover.png)

**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](https://damnvulnerabledefi.xyz).

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`

See https://github.com/franalgaba/cairo-installer



Install Scarb version `0.5.1`.

See https://github.com/software-mansion/asdf-scarb (recommended) and https://docs.swmansion.com/scarb

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 `.
E.g `scarb cairo-test -f side_entrance_lender_pool`



## Support

For Q&A, support and troubleshooting running Damn Vulnerable DeFi, go [here](https://github.com/credence0x/cairo1-damn-vulnerable-defi/discussions/1).

## Disclaimer

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

DO NOT USE IN PRODUCTION.