From d873b630829e97ba63b0afc18fb0d0e157197477 Mon Sep 17 00:00:00 2001 From: The3D Date: Tue, 15 Sep 2020 18:54:59 +0200 Subject: [PATCH] Removed unused flashloan vars --- contracts/lendingpool/LendingPool.sol | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/contracts/lendingpool/LendingPool.sol b/contracts/lendingpool/LendingPool.sol index 2c9ad98a..36335e94 100644 --- a/contracts/lendingpool/LendingPool.sol +++ b/contracts/lendingpool/LendingPool.sol @@ -453,19 +453,6 @@ contract LendingPool is VersionedInitializable, ILendingPool { } } - struct FlashLoanLocalVars { - uint256 premium; - uint256 amountPlusPremium; - uint256 amountPlusPremiumInETH; - uint256 receiverBalance; - uint256 receiverAllowance; - uint256 availableBalance; - uint256 assetPrice; - IFlashLoanReceiver receiver; - address aTokenAddress; - address oracle; - } - /** * @dev flashes the underlying collateral on an user to swap for the owed asset and repay * - Both the owner of the position and other liquidators can execute it @@ -514,6 +501,14 @@ contract LendingPool is VersionedInitializable, ILendingPool { _flashLiquidationLocked = false; } + struct FlashLoanLocalVars { + uint256 premium; + uint256 amountPlusPremium; + IFlashLoanReceiver receiver; + address aTokenAddress; + address oracle; + } + /** * @dev allows smartcontracts to access the liquidity of the pool within one transaction, * as long as the amount taken plus a fee is returned. NOTE There are security concerns for developers of flashloan receiver contracts @@ -569,7 +564,7 @@ contract LendingPool is VersionedInitializable, ILendingPool { asset, msg.sender, msg.sender, - vars.amountPlusPremium.sub(vars.availableBalance), + vars.amountPlusPremium, mode, vars.aTokenAddress, referralCode,