Damn Vulnerable DeFi

Damn Vulnerable DeFi is an amazing set of problems to practice your smart contract security skills. I was able to complete 11/12 challenges on my own. I present to you my solutions with detailed explanations, as well as patched versions of the vulnerable contracts.

Spend at least a few hours hacking on the problems yourself before checking solutions. That’s what I did. If you’re still stuck (like I was on the 12th problem), take a look at the list below.

  1. Unstoppable
  2. Naive receiver
  3. Truster
  4. Side entrance
  5. Rewarder
  6. Selfie
  7. Compromised
  8. Puppet
  9. Puppet v2
  10. Free rider
  11. Backdoor
  12. Climber - I wasn’t able to solve this one on my own. Instead, here’s a link to an explanation of the exploit that helped me when I got stuck. Shoutout to Balázs Kocsis for the great explanation.

The full source code is available here

Written on June 6, 2022