Damn Vulnerable Defi Challenges in Brownie, a Python-based dev framework

Introduction

Hello, happy new year! In the last months of 2021, I’ve been working on this project. Thanks to my friend and colleague Pablo Artuso I started to learn about Blockchain and the challenges and opportunities that this new technology has.

I was quickly interested in the security aspects of smart contracts. As part of my learning process I found damn vulnerable DeFi challenges, created by @tinchoabbate. that seemed a good place to start practicing.

Damn vulnerable DeFi in Brownie

Besides learning about Smart Contract security I also wanted to learn about how to program smart contracts and the development tools that are already available. As I feel comfortable writing Python I quickly found Brownie “A Python-based development and testing framework” for the Ethereum Virtual Machine”.

Brownie has an excellent documentation and after a short time I could use the framework in a solid way without much trouble. My problem was that the challenges wrote by Martin are designed to be solved using other tools and Javascript as the main language. I decided that it could be a good idea to “port” those challenges to Brownie, so anyone has an alternative and can play with them knowing Python as well.

I created the Damn Vulnerable DeFi Brownie version for that purpose. It currently has challenges 1 to 4 and I plan to continue adding the rest in the near future.

I hope that you enjoy this small project and find it useful. All the credits and merit go to Tincho for the challenges and Ben Hauser for the Brownie project.

Written on January 3, 2022