0. 合约-Contracts

Challenges from: https://www.damnvulnerabledefi.xyz/challenges/1.html

Challenge #1 - Unstoppable

There's a lending pool with a million DVT tokens in balance, offering flash loans for free.

If only there was a way to attack and stop the pool from offering flash loans ...

You start with 100 DVT tokens in balance.

合约介绍:

TestingToken是创建代币的合约,这个挑战中代币是完全安全的,问题出现在闪电贷上。

UnstoppableLender是创建闪电贷的智能合约,创建需要代币的合约地址。里面有两个函数**depositTokens()** 存款和**flashLoan()** 闪电贷。

ReceiverUnstoppable有两个函数**receiveTokens()接受代币和executeFlashLoan()**执行闪电贷。