A question regarding AVEE flash loan code

This page summarizes the projects mentioned and recommended in the original post on /r/ethdev

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • flashloan-box

    A box containing all you need to get started with developing Aave v1 flash loans

  • ``` pragma solidity 0.6.12; import { FlashLoanReceiverBase } from "https://github.com/aave/flashloan-box/blob/Remix/contracts/aave/FlashLoanReceiverBase.sol"; import { ILendingPool } from "https://github.com/aave/flashloan-box/blob/Remix/contracts/aave/ILendingPool.sol"; import { ILendingPoolAddressesProvider } from "https://github.com/aave/flashloan-box/blob/Remix/contracts/aave/ILendingPoolAddressesProvider.sol"; import { IERC20 } from "https://github.com/alcueca/ERC3156/blob/main/contracts/ERC20.sol"; /** !!! Never keep funds permanently on your FlashLoanReceiverBase contract as they could be exposed to a 'griefing' attack, where the stored funds are used by an attacker. !!! */ contract MyV2FlashLoan is FlashLoanReceiverBase { /** This function is called after your contract has received the flash loaned amount */ function executeOperation( address[] calldata assets, uint256[] calldata amounts, uint256[] calldata premiums, address initiator, bytes calldata params ) external override returns (bool) { // // This contract now has the funds requested. // Your logic goes here. //

  • ERC3156

    Reference implementations for ERC20 Flash Loans and Flash Mints

  • ``` pragma solidity 0.6.12; import { FlashLoanReceiverBase } from "https://github.com/aave/flashloan-box/blob/Remix/contracts/aave/FlashLoanReceiverBase.sol"; import { ILendingPool } from "https://github.com/aave/flashloan-box/blob/Remix/contracts/aave/ILendingPool.sol"; import { ILendingPoolAddressesProvider } from "https://github.com/aave/flashloan-box/blob/Remix/contracts/aave/ILendingPoolAddressesProvider.sol"; import { IERC20 } from "https://github.com/alcueca/ERC3156/blob/main/contracts/ERC20.sol"; /** !!! Never keep funds permanently on your FlashLoanReceiverBase contract as they could be exposed to a 'griefing' attack, where the stored funds are used by an attacker. !!! */ contract MyV2FlashLoan is FlashLoanReceiverBase { /** This function is called after your contract has received the flash loaned amount */ function executeOperation( address[] calldata assets, uint256[] calldata amounts, uint256[] calldata premiums, address initiator, bytes calldata params ) external override returns (bool) { // // This contract now has the funds requested. // Your logic goes here. //

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • not found https://github.com/OpenZeppelin/openzeppelincontracts/blob/master/contracts/token/ERC20/SafeERC20.sol

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts