Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.1 Upgrade #701

Merged
merged 114 commits into from
Dec 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
8500e58
fix comments in IACLManager
aaafsfefgdd May 4, 2022
526a1e6
fix: Return real backing amount when backUnbacked
miguelmtzinf Jun 3, 2022
a818243
Merge pull request #683 from aave/fix/675-return-backing-amount
The-3D Aug 8, 2022
e8c5b64
Merge branch 'master' into feat/3.0.1
The-3D Aug 8, 2022
cd508a7
fix: reentrancy in liquidationCall
The-3D Aug 8, 2022
e497caf
Revert "fix: reentrancy in liquidationCall"
The-3D Aug 8, 2022
45f47b4
a liquidation fail case.
zhoujia6139 Aug 26, 2022
623730b
fix: solution to fix liquidation failed case.
zhoujia6139 Aug 26, 2022
bb62572
feat: enable and disable flashloans
Aug 29, 2022
d7aa26a
fix: remove gitignore update
Aug 29, 2022
348ce20
feat: bump to beta version
Aug 29, 2022
8b9221b
feat: remove borrow enabled requirement
Aug 29, 2022
8d12d79
feat: updates and tests
Aug 29, 2022
a5ce86a
fix: remove unrelated change
Aug 29, 2022
4c2cda0
fix: remove formatting conflicts
Aug 29, 2022
2710b9c
Update contracts/protocol/pool/PoolConfigurator.sol
Oct 18, 2022
c3c6e75
Update contracts/protocol/libraries/configuration/ReserveConfiguratio…
Oct 18, 2022
6f5d692
Update contracts/protocol/libraries/configuration/ReserveConfiguratio…
Oct 18, 2022
4fb58e8
Update contracts/protocol/libraries/configuration/ReserveConfiguratio…
Oct 18, 2022
a5d188c
Update contracts/protocol/libraries/configuration/ReserveConfiguratio…
Oct 18, 2022
c646e35
Update contracts/misc/AaveProtocolDataProvider.sol
Oct 18, 2022
7d3bedd
Update contracts/interfaces/IPoolConfigurator.sol
Oct 18, 2022
c17c5a8
Update contracts/interfaces/IPoolConfigurator.sol comments
Oct 18, 2022
2f2e18e
Update contracts/interfaces/IPoolConfigurator.sol comments
Oct 18, 2022
9d84549
fix: update comment for setReserveFlashLoaning
Oct 18, 2022
284b492
fix: check revert msg and event emission
Oct 18, 2022
8888093
feat: add additional flashloan scenario
Oct 18, 2022
748818f
feat: switch bit used for flashloan enabled
Oct 25, 2022
7bd04e7
Update test-suites/pool-flashloan.spec.ts - move await
Oct 25, 2022
49d0f4e
feat: add unit test for reserve configuration
Oct 25, 2022
516e0e8
fix: streamline test
Oct 25, 2022
81b9cb9
Merge branch 'feat/enable-disable-flashloan-config' of github.com:aav…
Oct 25, 2022
9e95439
fix: modify interface versions to support all minor 0.8.x vers
miguelmtzinf Oct 28, 2022
d06f8f2
fix: make InterestRateStrategy contract inheritable
miguelmtzinf Oct 28, 2022
0457e71
feat: updated price oracle sentinel interface
miguelmtzinf Oct 28, 2022
8079e49
Merge pull request #722 from aave/feat/658-sequencer-interface
miguelmtzinf Oct 28, 2022
226639b
Merge pull request #721 from aave/fix/711-ir-inheritable
miguelmtzinf Oct 28, 2022
c35c46d
Merge pull request #720 from aave/fix/697-soft-interface-version
miguelmtzinf Oct 28, 2022
d87efa6
Merge branch 'feat/3.0.1' into feat/enable-disable-flashloan-config
Oct 28, 2022
b1d94da
Borrow/repay check removal (#705)
The-3D Oct 28, 2022
ddbf22b
WIP Fix of 100% RF for #718
eboadom Oct 31, 2022
8c6b9ea
Remove condition to skip based on timestamp, as it belong to another …
eboadom Nov 1, 2022
e835e1f
Change to reduce diff
eboadom Nov 1, 2022
9a68e2a
Fix of previous diff reduction
eboadom Nov 1, 2022
885b03f
- Added optimization to skip updateState() on same timestamp.
eboadom Nov 1, 2022
bb8e2ac
Formatting fix
eboadom Nov 2, 2022
e513b7d
Make mintToTreasury virtual so it can be overridden
davidlaprade Nov 2, 2022
6b504d4
fix: Fix docs param in burnScaled
miguelmtzinf Nov 2, 2022
997032f
Merge pull request #727 from aave/docx/fix-param-doc-scaled-token
miguelmtzinf Nov 2, 2022
f94aac9
Merge pull request #677 from aaafsfefgdd/nian
miguelmtzinf Nov 2, 2022
7fbdc6e
Fix: CEI to fix reentrancy risk with reentrant tokens (eg ERC777) (#704)
The-3D Nov 2, 2022
86f0984
Merge branch 'master' into feat/3.0.1
The-3D Nov 3, 2022
9666e99
fix: typo (#717)
Bojidar00 Nov 3, 2022
c9654cd
docs: Fix aToken docs related to eip712 (#719)
miguelmtzinf Nov 3, 2022
7dd869f
Fix: typos (#715)
omahs Nov 3, 2022
005b3ec
Merge pull request #726 from davidlaprade/make-mint-to-treasury-virtual
miguelmtzinf Nov 3, 2022
6968062
fix: Make transferOnLiq() virtual
miguelmtzinf Nov 3, 2022
02fbbd4
Merge pull request #729 from aave/fix/aToken-virtual
miguelmtzinf Nov 3, 2022
efdaf63
Make more precise comment on _updateIndexes()
eboadom Nov 4, 2022
94f0843
Improved comment on _updateIndexes()
eboadom Nov 9, 2022
1820962
Merge branch 'feat/3.0.1' into feat/enable-disable-flashloan-config
Nov 10, 2022
e99112c
Update contracts/protocol/libraries/logic/LiquidationLogic.sol
zhoujia6139 Nov 11, 2022
bb00525
Fixes #730. Not including yet all the required tests, only for the fl…
eboadom Nov 11, 2022
5d0a1aa
Update test-suites/pool-edge.spec.ts
eboadom Nov 14, 2022
cac49b4
Merge pull request #724 from bgd-labs/fix/100-rf
miguelmtzinf Nov 14, 2022
bab0eab
Merge remote-tracking branch 'origin/feat/3.0.1' into feat/723-optimi…
eboadom Nov 14, 2022
72e0425
Merge pull request #725 from bgd-labs/feat/723-optimization
miguelmtzinf Nov 14, 2022
078fa28
fix: update deploy and periphery dependencies
Nov 15, 2022
bf652c2
fix: add validation to simpleFlashLoan
Nov 15, 2022
3925b24
Merge pull request #728 from aave/feat/3.0.1-typos
miguelmtzinf Nov 15, 2022
12263d2
Merge pull request #709 from zhoujia6139/master
miguelmtzinf Nov 15, 2022
7f6ec74
Solidity:
eboadom Nov 15, 2022
4cd7703
Merge remote-tracking branch origin/feat/3.0.1 into fix/730-precision…
eboadom Nov 15, 2022
fcc7901
Update helpers/types.ts
eboadom Nov 15, 2022
7cd9557
Merge branch 'fix/730-precision-liquidity-index' of github.com:bgd-la…
eboadom Nov 15, 2022
7d8b7bf
fix: Fix test of inaccuracy when liquidationProtocolFee is on
miguelmtzinf Nov 15, 2022
3ebe5d5
Merge remote-tracking branch 'origin/feat/3.0.1' into fix/730-precisi…
eboadom Nov 15, 2022
1b950ab
Merge pull request #733 from bgd-labs/fix/730-precision-liquidity-index
miguelmtzinf Nov 15, 2022
c18e3c4
Merge pull request #710 from aave/feat/enable-disable-flashloan-config
miguelmtzinf Nov 15, 2022
f6817ff
ci: Fix coverage task of ci
miguelmtzinf Nov 15, 2022
ab07a4e
Fix event emission of AToken and DebtToken events (#682)
miguelmtzinf Nov 15, 2022
84b900c
fix: Reformat code
miguelmtzinf Nov 15, 2022
a54692a
fix: update hardhat dependencies and fix test-suite error codes (#739)
kartojal Nov 25, 2022
23b3aa3
chore: use fixed @aave/deploy-v3 package
kartojal Nov 25, 2022
678151d
chore: remove ganache dependency from solcover
kartojal Nov 25, 2022
ee931c4
Add onBehalfOf parameter to AToken handleRepayment function (#743)
kartojal Dec 5, 2022
f8825f8
Fix condition of unsetting asset as collateral if its fully liquidate…
miguelmtzinf Dec 5, 2022
43f34c9
fix: Avoid emitting events when balanceIncrease is zero (#745)
miguelmtzinf Dec 6, 2022
6c3154e
fix: Optimize logic for atoken self-transfers
miguelmtzinf Dec 7, 2022
56bcf5d
fix: Fix condition of full liquidation of collateral (#753)
miguelmtzinf Dec 7, 2022
d7d9e30
docs: Fix docs of Mint and Burn events (#751)
miguelmtzinf Dec 7, 2022
4449676
Merge pull request #759 from aave/fix/757-self-transfer-improve
miguelmtzinf Dec 7, 2022
a33f931
fix: Minimize the IAaveIncentivesController with only the handleAction
miguelmtzinf Dec 7, 2022
066259a
fix: Install the last package of periphery for the rewards contract u…
miguelmtzinf Dec 7, 2022
8149720
Merge pull request #761 from aave/fix/760-update-rewards-interface
miguelmtzinf Dec 7, 2022
518d1f0
chore: bump beta package
kartojal Dec 9, 2022
2b1354b
Soften solidity version of Datatypes libraries (#762)
miguelmtzinf Dec 12, 2022
9ccb1ab
fix: Fix typo in docs (#752)
miguelmtzinf Dec 12, 2022
a00dda8
fix: Complete interfaces of IReserveInterestRateStrategy and IPoolDat…
miguelmtzinf Dec 14, 2022
56fd7ba
fix: Add license to L2Pool contract (#765)
miguelmtzinf Dec 14, 2022
32f0e72
docs: Fix typo in the closing part of multiline natspec docs (#764)
miguelmtzinf Dec 14, 2022
fba69f0
fix: Capitalize license name of contracts
miguelmtzinf Dec 14, 2022
386abd4
Merge pull request #769 from aave/fix/capitalize-contracts-licenses
miguelmtzinf Dec 14, 2022
94fd3c7
chore: Bump package version
miguelmtzinf Dec 14, 2022
1cb9ba1
fix: Fix param of IAToken function
miguelmtzinf Dec 14, 2022
de66eec
chore: Bump package version
miguelmtzinf Dec 14, 2022
0963501
Merge pull request #771 from aave/fix/770-fix-iatoken-params
miguelmtzinf Dec 14, 2022
b3abe17
Fix calculation of IRs with non-zero unbacked and zero unbackedMintCa…
miguelmtzinf Dec 19, 2022
428e258
Clarify inconsistency between `getReserveNormalizedVariableDebt()` an…
eboadom Dec 19, 2022
c0c00dd
chore: bump to 1.16.2-beta.5 version
kartojal Dec 20, 2022
b34d6a4
chore: remove github registry login
kartojal Dec 20, 2022
3e1c3c2
Add PeckShield audit report on 3.0.1 (#776)
miguelmtzinf Dec 22, 2022
c38c627
Make AToken's initialize and _transfer functions virtual so they can …
davidlaprade Dec 23, 2022
ee7d556
Add sigmaprime audit report for v3.0.1 (#755)
kirk-baird Dec 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@aave:registry=https://npm.pkg.github.com
engine-strict=true
engine-strict=true
save-exact=true
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"singleQuote": true,
"tabWidth": 2,
"overrides": [
{
"files": "*.ts",
"options": {
"bracketSpacing": true
}
},
{
"files": "*.sol",
"options": {
Expand Down
4 changes: 2 additions & 2 deletions .solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const accounts = require(`./test-wallets.js`).accounts;
const cp = require('child_process');

module.exports = {
client: require('ganache-cli'),
configureYulOptimizer: true,
skipFiles: ['./mocks', './interfaces', './dependencies'],
mocha: {
enableTimeouts: false,
Expand All @@ -12,6 +12,6 @@ module.exports = {
},
onCompileComplete: function () {
console.log('onCompileComplete hook');
cp.execSync('. ./setup-test-env.sh', { stdio: 'inherit' });
cp.execSync('. ./setup-test-env.sh', {stdio: 'inherit'});
},
};
4 changes: 2 additions & 2 deletions Certora/certora/harness/ATokenHarness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ contract ATokenHarness is AToken {
/**
* @dev Calls burn with index == 1 RAY
* @param amount the amount being burned
**/
*/
function burn(
address user,
address receiverOfUnderlying,
Expand All @@ -37,7 +37,7 @@ contract ATokenHarness is AToken {
/**
* @dev Calls mint with index == 1 RAY
* @param amount the amount of tokens to mint
**/
*/
function mint(
address user,
address onBehalfOf,
Expand Down
4 changes: 2 additions & 2 deletions Certora/certora/harness/GenericLogicHarness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ contract GenericLogic {
* @return The average liquidation threshold of the user
* @return The health factor of the user
* @return True if the ltv is zero, false otherwise
**/
*/
function calculateUserAccountData()
public
returns (
Expand Down Expand Up @@ -226,7 +226,7 @@ contract GenericLogic {
* @param totalDebtInBaseCurrency The total borrow balance in the base currency used by the price feed
* @param ltv The average loan to value
* @return The amount available to borrow in the base currency of the used by the price feed
**/
*/
function calculateAvailableBorrows(
uint256 totalCollateralInBaseCurrency,
uint256 totalDebtInBaseCurrency,
Expand Down
2 changes: 1 addition & 1 deletion Certora/certora/harness/PoolConfiguratorHarness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {IPoolDataProvider} from '../../contracts/interfaces/IPoolDataProvider.so
* @title PoolConfigurator
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/
*/
contract PoolConfiguratorHarness is VersionedInitializable, IPoolConfigurator {
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
Expand Down
4 changes: 2 additions & 2 deletions Certora/certora/harness/PoolHarnessForConfigurator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {Helpers} from '../../contracts/protocol/libraries/helpers/Helpers.sol';
* @dev To be covered by a proxy contract, owned by the PoolAddressesProvider of the specific market
* @dev All admin functions are callable by the PoolConfigurator contract defined also in the
* PoolAddressesProvider
**/
*/
contract PoolHarnessForConfigurator is VersionedInitializable, IPool, PoolStorage {
using WadRayMath for uint256;
using ReserveLogic for DataTypes.ReserveData;
Expand Down Expand Up @@ -88,7 +88,7 @@ contract PoolHarnessForConfigurator is VersionedInitializable, IPool, PoolStorag
* PoolAddressesProvider of the market.
* @dev Caching the address of the PoolAddressesProvider in order to reduce gas consumption on subsequent operations
* @param provider The address of the PoolAddressesProvider
**/
*/
function initialize(IPoolAddressesProvider provider) external initializer {
require(provider == _addressesProvider, Errors.PC_INVALID_CONFIGURATION);
_maxStableRateBorrowSizePercent = 2500;
Expand Down
2 changes: 1 addition & 1 deletion Certora/certora/harness/StableDebtTokenHarness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract StableDebtTokenHarness is StableDebtToken {

/**
Simplification: The user accumulates no interest (the balance increase is always 0).
**/
*/
function balanceOf(address account) public view override returns (uint256) {
return IncentivizedERC20.balanceOf(account);
}
Expand Down
2 changes: 1 addition & 1 deletion Certora/certora/specs/pool.spec
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ methods {
mintToTreasury(uint256 amount, uint256 index) => DISPATCHER(true)
transferOnLiquidation(address from, address to, uint256 value) => DISPATCHER(true)
transferUnderlyingTo(address user, uint256 amount) => DISPATCHER(true)
handleRepayment(address user, uint256 amount) => DISPATCHER(true)
handleRepayment(address user, address onBehalfOf, uint256 amount) => DISPATCHER(true)
permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) => DISPATCHER(true)

//Debt Tokens
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Formal Verification

## Connect with the community

You can join at the [Discord](http://aave.com/discord) channel or at the [Governance Forum](https://governance.aave.com/) for asking questions about the protocol or talk about Aave with other peers.
You can join the [Discord](http://aave.com/discord) channel or the [Governance Forum](https://governance.aave.com/) to ask questions about the protocol or talk about Aave with other peers.

## Getting Started

Expand All @@ -67,7 +67,7 @@ contract Misc {
}
```

The JSON artifacts with the ABI and Bytecode are also included into the bundled NPM package at `artifacts/` directory.
The JSON artifacts with the ABI and Bytecode are also included in the bundled NPM package at `artifacts/` directory.

Import JSON file via Node JS `require`:

Expand All @@ -80,12 +80,12 @@ console.log(PoolV3Artifact.abi)

## Setup

The repository uses Docker Compose to manage sensitive keys and load the configuration. Prior any action like test or deploy, you must run `docker-compose up` to start the `contracts-env` container, and then connect to the container console via `docker-compose exec contracts-env bash`.
The repository uses Docker Compose to manage sensitive keys and load the configuration. Prior to any action like test or deploy, you must run `docker-compose up` to start the `contracts-env` container, and then connect to the container console via `docker-compose exec contracts-env bash`.

Follow the next steps to setup the repository:

- Install `docker` and `docker-compose`
- Create an enviroment file named `.env` and fill the next enviroment variables
- Create an environment file named `.env` and fill the next environment variables

```
# Add Alchemy or Infura provider keys, alchemy takes preference at the config level
Expand Down
Binary file added audits/09-12-2022_PeckShield_AaveV3-0-1.pdf
Binary file not shown.
Binary file added audits/23-12-2022_SigmaPrime_AaveV3-0-1.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: agpl-3.0
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/openzeppelin/contracts/IERC20.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: agpl-3.0
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: agpl-3.0
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

import {IERC20} from './IERC20.sol';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: agpl-3.0
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

/// @title Optimized overflow and underflow safe math operations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: agpl-3.0
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

import './BaseAdminUpgradeabilityProxy.sol';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: agpl-3.0
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

import './UpgradeabilityProxy.sol';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: agpl-3.0
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

import './Proxy.sol';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: agpl-3.0
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: agpl-3.0
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

import './BaseAdminUpgradeabilityProxy.sol';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: agpl-3.0
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

import './BaseUpgradeabilityProxy.sol';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: agpl-3.0
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: agpl-3.0
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

import './BaseUpgradeabilityProxy.sol';
Expand Down
2 changes: 2 additions & 0 deletions contracts/deployments/ReservesSetupHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ contract ReservesSetupHelper is Ownable {
uint256 supplyCap;
bool stableBorrowingEnabled;
bool borrowingEnabled;
bool flashLoanEnabled;
}

/**
Expand Down Expand Up @@ -50,6 +51,7 @@ contract ReservesSetupHelper is Ownable {
inputParams[i].stableBorrowingEnabled
);
}
configurator.setReserveFlashLoaning(inputParams[i].asset, inputParams[i].flashLoanEnabled);
configurator.setSupplyCap(inputParams[i].asset, inputParams[i].supplyCap);
configurator.setReserveFactor(inputParams[i].asset, inputParams[i].reserveFactor);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/flashloan/interfaces/IFlashLoanReceiver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {IPool} from '../../interfaces/IPool.sol';
* @author Aave
* @notice Defines the basic interface of a flashloan-receiver contract.
* @dev Implement this interface to develop a flashloan-compatible flashLoanReceiver contract
**/
*/
interface IFlashLoanReceiver {
/**
* @notice Executes an operation after receiving the flash-borrowed assets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {IPool} from '../../interfaces/IPool.sol';
* @author Aave
* @notice Defines the basic interface of a flashloan-receiver contract.
* @dev Implement this interface to develop a flashloan-compatible flashLoanReceiver contract
**/
*/
interface IFlashLoanSimpleReceiver {
/**
* @notice Executes an operation after receiving the flash-borrowed asset
Expand Down
4 changes: 2 additions & 2 deletions contracts/interfaces/IACLManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';
* @title IACLManager
* @author Aave
* @notice Defines the basic interface for the ACL Manager
**/
*/
interface IACLManager {
/**
* @notice Returns the contract address of the PoolAddressesProvider
Expand Down Expand Up @@ -123,7 +123,7 @@ interface IACLManager {
function addFlashBorrower(address borrower) external;

/**
* @notice Removes an admin as FlashBorrower
* @notice Removes an address as FlashBorrower
* @param borrower The address of the FlashBorrower to remove
*/
function removeFlashBorrower(address borrower) external;
Expand Down
31 changes: 18 additions & 13 deletions contracts/interfaces/IAToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import {IInitializableAToken} from './IInitializableAToken.sol';
* @title IAToken
* @author Aave
* @notice Defines the basic interface for an AToken.
**/
*/
interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken {
/**
* @dev Emitted during the transfer action
* @param from The user whose tokens are being transferred
* @param to The recipient
* @param value The amount being transferred
* @param value The scaled amount being transferred
* @param index The next liquidity index of the reserve
**/
*/
event BalanceTransfer(address indexed from, address indexed to, uint256 value, uint256 index);

/**
Expand All @@ -43,7 +43,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken {
* @param receiverOfUnderlying The address that will receive the underlying
* @param amount The amount being burned
* @param index The next liquidity index of the reserve
**/
*/
function burn(
address from,
address receiverOfUnderlying,
Expand All @@ -63,7 +63,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken {
* @param from The address getting liquidated, current owner of the aTokens
* @param to The recipient
* @param value The amount of tokens getting transferred
**/
*/
function transferOnLiquidation(
address from,
address to,
Expand All @@ -73,20 +73,25 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken {
/**
* @notice Transfers the underlying asset to `target`.
* @dev Used by the Pool to transfer assets in borrow(), withdraw() and flashLoan()
* @param user The recipient of the underlying
* @param target The recipient of the underlying
* @param amount The amount getting transferred
**/
function transferUnderlyingTo(address user, uint256 amount) external;
*/
function transferUnderlyingTo(address target, uint256 amount) external;

/**
* @notice Handles the underlying received by the aToken after the transfer has been completed.
* @dev The default implementation is empty as with standard ERC20 tokens, nothing needs to be done after the
* transfer is concluded. However in the future there may be aTokens that allow for example to stake the underlying
* to receive LM rewards. In that case, `handleRepayment()` would perform the staking of the underlying asset.
* @param user The user executing the repayment
* @param onBehalfOf The address of the user who will get his debt reduced/removed
* @param amount The amount getting repaid
**/
function handleRepayment(address user, uint256 amount) external;
*/
function handleRepayment(
address user,
address onBehalfOf,
uint256 amount
) external;

/**
* @notice Allow passing a signed message to approve spending
Expand All @@ -113,13 +118,13 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken {
/**
* @notice Returns the address of the underlying asset of this aToken (E.g. WETH for aWETH)
* @return The address of the underlying asset
**/
*/
function UNDERLYING_ASSET_ADDRESS() external view returns (address);

/**
* @notice Returns the address of the Aave treasury, receiving the fees on this aToken.
* @return Address of the Aave treasury
**/
*/
function RESERVE_TREASURY_ADDRESS() external view returns (address);

/**
Expand All @@ -133,7 +138,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken {
* @notice Returns the nonce for owner.
* @param owner The address of the owner
* @return The nonce of the owner
**/
*/
function nonces(address owner) external view returns (uint256);

/**
Expand Down
Loading