Cover image
Blog icontanh
Apr 7

Damn Vulnerable Defi #3 : Truster Solution

ProblemA lending pool has 1 million DVT tokens and is offering flash loans. Our task is to drain the pool of all funds. The title of the challenge has a little hint in it, too much trust in the smart contract world is a road to a lot of pain. But I’m getting ahead of myself, let’s take a look at the contract:TrusterLenderPool.solWe see that there is a flash loan function that sends over some tokens to the borrower that gets passed in. After sending tokens in, a functionCall is made to the tar...

Most popular by tanh

Cover image

A case for crypto

tanh

Written by
tanh

Exploring web3 with a focus on security. Currently learning in public, support me by collecting posts!

Subscribe

2025 Paragraph Technologies Inc

PopularTrendingPrivacyTermsHome
Search...Ctrl+K

tanh

Subscribe
Post cover image
Blog icontanh
Mar 29
Damn Vulnerable Defi #2 : Naive Receiver Solution
ProblemThere’s a pool with 1000 ETH in balance, offering flash loans. It has a fixed fee of 1 ETH. A user has deployed a contract with 10 ETH in balance. It’s capable of interacting with the pool and receiving flash loans of ETH. Take all ETH out of the user’s contract. If possible, in a single transaction.ContractsI’ve discussed in detail how flash loans work in my previous article on this series. Check it out here. This challenge also makes use of flash loans being taken out from a vault. L...
Post cover image
Blog icontanh
Mar 28
Damn Vulnerable DeFi #1: Unstoppable Solution
IntroductionHey there, I’m creating a series of my solutions to the Damn Vulnerable DeFi challenges here starting with challenge #1 “Unstoppable”. This challenge looks at a flash loan implementation that contains a vulnerability. But first, what is a flash loan and how is it implemented?Flash Loans and ERC3156Flash Loans were first introduced by Aave as part of Aave V3 which you can learn more about here. They provide a way for users to borrow crypto without needing to put down any collateral...
Post cover image
Blog icontanh
Mar 18
A case for crypto
I’ve been fascinated by crypto for quite a while now due to the real world utility that it brings. However, I often hear the sentiment repeated that crypto does not have any real world use cases. This is surprising to me, so I want to share some of my thoughts on this. In this article, I show that there are already many uses for the technology that often are overlooked.Self custodyThe modern banking system is broken and is designed to steal money from everyday people. Traditionally, banks wer...