Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
Flash loan attacker
copy icon
Aave
• version 1.0.0
defi
flashloan
aave
erc20
Deployable

Flash loan attacker

This is a Solidity smart contract that represents an attacker attempting a flash loan attack on a lending protocol. The contract imports various Solidity libraries and interfaces, including SafeMath for safe math operations, IERC20 for interacting with ERC20 tokens, and IPoolAddressesProvider and IPool for interacting with the lending protocol. The main functionality of this contract is to supply an asset to the lending protocol, then execute a flash loan attack by borrowing the same asset from the protocol and immediately returning it with a premium. In the executeOperation function, the attacker also performs a normal borrow in the middle of the flash loan attack. The contract uses the GPv2SafeERC20 library for safe interactions with ERC20 tokens, and the MintableERC20 contract for minting new ERC20 tokens. The contract inherits from FlashLoanSimpleReceiverBase, a base contract for implementing flash loan receivers in the lending protocol.

*Visit desktop site to download or deploy

Version

1.0.0

Creator

Aave

Recent Use

🍞 0xc658 saved
🥐 0xc658 downloaded
🥖 0xc658 downloaded
🥨 0xc658 downloaded
🥯 0xE5a8 downloaded
🥞 0x5ecB downloaded
🧀 0xF880 downloaded
🍖 0x43f0 saved

Last Publish

2/22/2023
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code

Get Cookin'
share iconShare

copy iconNo-Code Deploy
copy iconDownload Source
copy iconnpx cookbookdev i Flash-loan-attacker
copy icon

Bytecode

Download

Verification

Download

Recent Use

🍞 0xc658 saved
🥐 0xc658 downloaded
🥖 0xc658 downloaded
🥨 0xc658 downloaded
🥯 0xE5a8 downloaded
🥞 0x5ecB downloaded
🧀 0xF880 downloaded
🍖 0x43f0 saved

Last Publish

2/22/2023

Solidity Compiler

v0.8.10+commit.fc410830

Version

1.0.0

Creator

Aave

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.