diff --git a/Certora/certora/harness/ATokenHarness.sol b/Certora/certora/harness/ATokenHarness.sol index e5129c475..a5492b9dd 100644 --- a/Certora/certora/harness/ATokenHarness.sol +++ b/Certora/certora/harness/ATokenHarness.sol @@ -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, @@ -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, diff --git a/Certora/certora/harness/GenericLogicHarness.sol b/Certora/certora/harness/GenericLogicHarness.sol index ae18b7390..316896308 100644 --- a/Certora/certora/harness/GenericLogicHarness.sol +++ b/Certora/certora/harness/GenericLogicHarness.sol @@ -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 ( @@ -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, diff --git a/Certora/certora/harness/PoolConfiguratorHarness.sol b/Certora/certora/harness/PoolConfiguratorHarness.sol index 0180964b0..f10e28688 100644 --- a/Certora/certora/harness/PoolConfiguratorHarness.sol +++ b/Certora/certora/harness/PoolConfiguratorHarness.sol @@ -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; diff --git a/Certora/certora/harness/PoolHarnessForConfigurator.sol b/Certora/certora/harness/PoolHarnessForConfigurator.sol index a27cd77e1..529942cfc 100644 --- a/Certora/certora/harness/PoolHarnessForConfigurator.sol +++ b/Certora/certora/harness/PoolHarnessForConfigurator.sol @@ -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; @@ -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; diff --git a/Certora/certora/harness/StableDebtTokenHarness.sol b/Certora/certora/harness/StableDebtTokenHarness.sol index 471096e30..3a5d55d95 100644 --- a/Certora/certora/harness/StableDebtTokenHarness.sol +++ b/Certora/certora/harness/StableDebtTokenHarness.sol @@ -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); } diff --git a/contracts/flashloan/interfaces/IFlashLoanReceiver.sol b/contracts/flashloan/interfaces/IFlashLoanReceiver.sol index 144cc6eac..f006202d8 100644 --- a/contracts/flashloan/interfaces/IFlashLoanReceiver.sol +++ b/contracts/flashloan/interfaces/IFlashLoanReceiver.sol @@ -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 diff --git a/contracts/flashloan/interfaces/IFlashLoanSimpleReceiver.sol b/contracts/flashloan/interfaces/IFlashLoanSimpleReceiver.sol index b13a299a9..492b627a2 100644 --- a/contracts/flashloan/interfaces/IFlashLoanSimpleReceiver.sol +++ b/contracts/flashloan/interfaces/IFlashLoanSimpleReceiver.sol @@ -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 diff --git a/contracts/interfaces/IACLManager.sol b/contracts/interfaces/IACLManager.sol index c481ce94d..d5d97ceb0 100644 --- a/contracts/interfaces/IACLManager.sol +++ b/contracts/interfaces/IACLManager.sol @@ -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 diff --git a/contracts/interfaces/IAToken.sol b/contracts/interfaces/IAToken.sol index 43b9c949b..a50e11d5c 100644 --- a/contracts/interfaces/IAToken.sol +++ b/contracts/interfaces/IAToken.sol @@ -9,7 +9,7 @@ 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 @@ -17,7 +17,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { * @param to The recipient * @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); /** @@ -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, @@ -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, @@ -75,7 +75,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { * @dev Used by the Pool to transfer assets in borrow(), withdraw() and flashLoan() * @param user The recipient of the underlying * @param amount The amount getting transferred - **/ + */ function transferUnderlyingTo(address user, uint256 amount) external; /** @@ -86,7 +86,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { * @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, address onBehalfOf, @@ -118,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); /** @@ -138,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); /** diff --git a/contracts/interfaces/IAaveIncentivesController.sol b/contracts/interfaces/IAaveIncentivesController.sol index d855d079c..0cfc5596a 100644 --- a/contracts/interfaces/IAaveIncentivesController.sol +++ b/contracts/interfaces/IAaveIncentivesController.sol @@ -6,7 +6,7 @@ pragma solidity ^0.8.0; * @author Aave * @notice Defines the basic interface for an Aave Incentives Controller. * @dev It only contains one single function, needed as a hook on aToken and debtToken transfers. - **/ + */ interface IAaveIncentivesController { /** * @dev Called by the corresponding asset on transfer hook in order to update the rewards distribution. @@ -14,7 +14,7 @@ interface IAaveIncentivesController { * @param user The address of the user whose asset balance has changed * @param totalSupply The total supply of the asset prior to user balance change * @param userBalance The previous user balance prior to balance change - **/ + */ function handleAction( address user, uint256 totalSupply, diff --git a/contracts/interfaces/ICreditDelegationToken.sol b/contracts/interfaces/ICreditDelegationToken.sol index 34dfa52d3..323118f12 100644 --- a/contracts/interfaces/ICreditDelegationToken.sol +++ b/contracts/interfaces/ICreditDelegationToken.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.0; * @title ICreditDelegationToken * @author Aave * @notice Defines the basic interface for a token supporting credit delegation. - **/ + */ interface ICreditDelegationToken { /** * @dev Emitted on `approveDelegation` and `borrowAllowance @@ -27,7 +27,7 @@ interface ICreditDelegationToken { * delegatee cannot force a delegator HF to go below 1) * @param delegatee The address receiving the delegated borrowing power * @param amount The maximum amount being delegated. - **/ + */ function approveDelegation(address delegatee, uint256 amount) external; /** @@ -35,7 +35,7 @@ interface ICreditDelegationToken { * @param fromUser The user to giving allowance * @param toUser The user to give allowance to * @return The current allowance of `toUser` - **/ + */ function borrowAllowance(address fromUser, address toUser) external view returns (uint256); /** diff --git a/contracts/interfaces/IDelegationToken.sol b/contracts/interfaces/IDelegationToken.sol index e32599fb3..171b95e2f 100644 --- a/contracts/interfaces/IDelegationToken.sol +++ b/contracts/interfaces/IDelegationToken.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.0; * @title IDelegationToken * @author Aave * @notice Implements an interface for tokens with delegation COMP/UNI compatible - **/ + */ interface IDelegationToken { /** * @notice Delegate voting power to a delegatee diff --git a/contracts/interfaces/IERC20WithPermit.sol b/contracts/interfaces/IERC20WithPermit.sol index 2f0a704ff..d1053aab1 100644 --- a/contracts/interfaces/IERC20WithPermit.sol +++ b/contracts/interfaces/IERC20WithPermit.sol @@ -7,7 +7,7 @@ import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol'; * @title IERC20WithPermit * @author Aave * @notice Interface for the permit function (EIP-2612) - **/ + */ interface IERC20WithPermit is IERC20 { /** * @notice Allow passing a signed message to approve spending diff --git a/contracts/interfaces/IInitializableAToken.sol b/contracts/interfaces/IInitializableAToken.sol index d34bdd8d8..0b16baa82 100644 --- a/contracts/interfaces/IInitializableAToken.sol +++ b/contracts/interfaces/IInitializableAToken.sol @@ -8,7 +8,7 @@ import {IPool} from './IPool.sol'; * @title IInitializableAToken * @author Aave * @notice Interface for the initialize function on AToken - **/ + */ interface IInitializableAToken { /** * @dev Emitted when an aToken is initialized @@ -20,7 +20,7 @@ interface IInitializableAToken { * @param aTokenName The name of the aToken * @param aTokenSymbol The symbol of the aToken * @param params A set of encoded parameters for additional initialization - **/ + */ event Initialized( address indexed underlyingAsset, address indexed pool, diff --git a/contracts/interfaces/IInitializableDebtToken.sol b/contracts/interfaces/IInitializableDebtToken.sol index 45c48b5b4..ad8cd7c6c 100644 --- a/contracts/interfaces/IInitializableDebtToken.sol +++ b/contracts/interfaces/IInitializableDebtToken.sol @@ -8,7 +8,7 @@ import {IPool} from './IPool.sol'; * @title IInitializableDebtToken * @author Aave * @notice Interface for the initialize function common between debt tokens - **/ + */ interface IInitializableDebtToken { /** * @dev Emitted when a debt token is initialized @@ -19,7 +19,7 @@ interface IInitializableDebtToken { * @param debtTokenName The name of the debt token * @param debtTokenSymbol The symbol of the debt token * @param params A set of encoded parameters for additional initialization - **/ + */ event Initialized( address indexed underlyingAsset, address indexed pool, diff --git a/contracts/interfaces/IL2Pool.sol b/contracts/interfaces/IL2Pool.sol index 7823e864a..7f8c380c9 100644 --- a/contracts/interfaces/IL2Pool.sol +++ b/contracts/interfaces/IL2Pool.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.0; * @title IL2Pool * @author Aave * @notice Defines the basic extension interface for an L2 Aave Pool. - **/ + */ interface IL2Pool { /** * @notice Calldata efficient wrapper of the supply function on behalf of the caller diff --git a/contracts/interfaces/IPool.sol b/contracts/interfaces/IPool.sol index d2e8d94bc..68d0f11a1 100644 --- a/contracts/interfaces/IPool.sol +++ b/contracts/interfaces/IPool.sol @@ -8,7 +8,7 @@ import {DataTypes} from '../protocol/libraries/types/DataTypes.sol'; * @title IPool * @author Aave * @notice Defines the basic interface for an Aave Pool. - **/ + */ interface IPool { /** * @dev Emitted on mintUnbacked() @@ -17,7 +17,7 @@ interface IPool { * @param onBehalfOf The beneficiary of the supplied assets, receiving the aTokens * @param amount The amount of supplied assets * @param referralCode The referral code used - **/ + */ event MintUnbacked( address indexed reserve, address user, @@ -32,7 +32,7 @@ interface IPool { * @param backer The address paying for the backing * @param amount The amount added as backing * @param fee The amount paid in fees - **/ + */ event BackUnbacked(address indexed reserve, address indexed backer, uint256 amount, uint256 fee); /** @@ -42,7 +42,7 @@ interface IPool { * @param onBehalfOf The beneficiary of the supply, receiving the aTokens * @param amount The amount supplied * @param referralCode The referral code used - **/ + */ event Supply( address indexed reserve, address user, @@ -57,7 +57,7 @@ interface IPool { * @param user The address initiating the withdrawal, owner of aTokens * @param to The address that will receive the underlying * @param amount The amount to be withdrawn - **/ + */ event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount); /** @@ -70,7 +70,7 @@ interface IPool { * @param interestRateMode The rate mode: 1 for Stable, 2 for Variable * @param borrowRate The numeric rate at which the user has borrowed, expressed in ray * @param referralCode The referral code used - **/ + */ event Borrow( address indexed reserve, address user, @@ -88,7 +88,7 @@ interface IPool { * @param repayer The address of the user initiating the repay(), providing the funds * @param amount The amount repaid * @param useATokens True if the repayment is done using aTokens, `false` if done with underlying asset directly - **/ + */ event Repay( address indexed reserve, address indexed user, @@ -102,7 +102,7 @@ interface IPool { * @param reserve The address of the underlying asset of the reserve * @param user The address of the user swapping his rate mode * @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable - **/ + */ event SwapBorrowRateMode( address indexed reserve, address indexed user, @@ -120,28 +120,28 @@ interface IPool { * @dev Emitted when the user selects a certain asset category for eMode * @param user The address of the user * @param categoryId The category id - **/ + */ event UserEModeSet(address indexed user, uint8 categoryId); /** * @dev Emitted on setUserUseReserveAsCollateral() * @param reserve The address of the underlying asset of the reserve * @param user The address of the user enabling the usage as collateral - **/ + */ event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user); /** * @dev Emitted on setUserUseReserveAsCollateral() * @param reserve The address of the underlying asset of the reserve * @param user The address of the user enabling the usage as collateral - **/ + */ event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user); /** * @dev Emitted on rebalanceStableBorrowRate() * @param reserve The address of the underlying asset of the reserve * @param user The address of the user for which the rebalance has been executed - **/ + */ event RebalanceStableBorrowRate(address indexed reserve, address indexed user); /** @@ -153,7 +153,7 @@ interface IPool { * @param interestRateMode The flashloan mode: 0 for regular flashloan, 1 for Stable debt, 2 for Variable debt * @param premium The fee flash borrowed * @param referralCode The referral code used - **/ + */ event FlashLoan( address indexed target, address initiator, @@ -174,7 +174,7 @@ interface IPool { * @param liquidator The address of the liquidator * @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants * to receive the underlying collateral asset directly - **/ + */ event LiquidationCall( address indexed collateralAsset, address indexed debtAsset, @@ -193,7 +193,7 @@ interface IPool { * @param variableBorrowRate The next variable borrow rate * @param liquidityIndex The next liquidity index * @param variableBorrowIndex The next variable borrow index - **/ + */ event ReserveDataUpdated( address indexed reserve, uint256 liquidityRate, @@ -207,7 +207,7 @@ interface IPool { * @dev Emitted when the protocol treasury receives minted aTokens from the accrued interest. * @param reserve The address of the reserve * @param amountMinted The amount minted to the treasury - **/ + */ event MintedToTreasury(address indexed reserve, uint256 amountMinted); /** @@ -217,7 +217,7 @@ interface IPool { * @param onBehalfOf The address that will receive the aTokens * @param referralCode Code used to register the integrator originating the operation, for potential rewards. * 0 if the action is executed directly by the user, without any middle-man - **/ + */ function mintUnbacked( address asset, uint256 amount, @@ -231,7 +231,7 @@ interface IPool { * @param amount The amount to back * @param fee The amount paid in fees * @return The backed amount - **/ + */ function backUnbacked( address asset, uint256 amount, @@ -248,7 +248,7 @@ interface IPool { * is a different wallet * @param referralCode Code used to register the integrator originating the operation, for potential rewards. * 0 if the action is executed directly by the user, without any middle-man - **/ + */ function supply( address asset, uint256 amount, @@ -270,7 +270,7 @@ interface IPool { * @param permitV The V parameter of ERC712 permit sig * @param permitR The R parameter of ERC712 permit sig * @param permitS The S parameter of ERC712 permit sig - **/ + */ function supplyWithPermit( address asset, uint256 amount, @@ -292,7 +292,7 @@ interface IPool { * wants to receive it on his own wallet, or a different address if the beneficiary is a * different wallet * @return The final amount withdrawn - **/ + */ function withdraw( address asset, uint256 amount, @@ -313,7 +313,7 @@ interface IPool { * @param onBehalfOf The address of the user who will receive the debt. Should be the address of the borrower itself * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator * if he has been given credit delegation allowance - **/ + */ function borrow( address asset, uint256 amount, @@ -333,7 +333,7 @@ interface IPool { * user calling the function if he wants to reduce/remove his own debt, or the address of any other * other borrower whose debt should be removed * @return The final amount repaid - **/ + */ function repay( address asset, uint256 amount, @@ -356,7 +356,7 @@ interface IPool { * @param permitR The R parameter of ERC712 permit sig * @param permitS The S parameter of ERC712 permit sig * @return The final amount repaid - **/ + */ function repayWithPermit( address asset, uint256 amount, @@ -379,7 +379,7 @@ interface IPool { * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable * @return The final amount repaid - **/ + */ function repayWithATokens( address asset, uint256 amount, @@ -390,7 +390,7 @@ interface IPool { * @notice Allows a borrower to swap his debt between stable and variable mode, or vice versa * @param asset The address of the underlying asset borrowed * @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable - **/ + */ function swapBorrowRateMode(address asset, uint256 interestRateMode) external; /** @@ -401,14 +401,14 @@ interface IPool { * much has been borrowed at a stable rate and suppliers are not earning enough * @param asset The address of the underlying asset borrowed * @param user The address of the user to be rebalanced - **/ + */ function rebalanceStableBorrowRate(address asset, address user) external; /** * @notice Allows suppliers to enable/disable a specific supplied asset as collateral * @param asset The address of the underlying asset supplied * @param useAsCollateral True if the user wants to use the supply as collateral, false otherwise - **/ + */ function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external; /** @@ -421,7 +421,7 @@ interface IPool { * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover * @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants * to receive the underlying collateral asset directly - **/ + */ function liquidationCall( address collateralAsset, address debtAsset, @@ -446,7 +446,7 @@ interface IPool { * @param params Variadic packed params to pass to the receiver as extra information * @param referralCode The code used to register the integrator originating the operation, for potential rewards. * 0 if the action is executed directly by the user, without any middle-man - **/ + */ function flashLoan( address receiverAddress, address[] calldata assets, @@ -468,7 +468,7 @@ interface IPool { * @param params Variadic packed params to pass to the receiver as extra information * @param referralCode The code used to register the integrator originating the operation, for potential rewards. * 0 if the action is executed directly by the user, without any middle-man - **/ + */ function flashLoanSimple( address receiverAddress, address asset, @@ -486,7 +486,7 @@ interface IPool { * @return currentLiquidationThreshold The liquidation threshold of the user * @return ltv The loan to value of The user * @return healthFactor The current health factor of the user - **/ + */ function getUserAccountData(address user) external view @@ -508,7 +508,7 @@ interface IPool { * @param stableDebtAddress The address of the StableDebtToken that will be assigned to the reserve * @param variableDebtAddress The address of the VariableDebtToken that will be assigned to the reserve * @param interestRateStrategyAddress The address of the interest rate strategy contract - **/ + */ function initReserve( address asset, address aTokenAddress, @@ -521,7 +521,7 @@ interface IPool { * @notice Drop a reserve * @dev Only callable by the PoolConfigurator contract * @param asset The address of the underlying asset of the reserve - **/ + */ function dropReserve(address asset) external; /** @@ -529,7 +529,7 @@ interface IPool { * @dev Only callable by the PoolConfigurator contract * @param asset The address of the underlying asset of the reserve * @param rateStrategyAddress The address of the interest rate strategy contract - **/ + */ function setReserveInterestRateStrategyAddress(address asset, address rateStrategyAddress) external; @@ -538,7 +538,7 @@ interface IPool { * @dev Only callable by the PoolConfigurator contract * @param asset The address of the underlying asset of the reserve * @param configuration The new configuration bitmap - **/ + */ function setConfiguration(address asset, DataTypes.ReserveConfigurationMap calldata configuration) external; @@ -546,7 +546,7 @@ interface IPool { * @notice Returns the configuration of the reserve * @param asset The address of the underlying asset of the reserve * @return The configuration of the reserve - **/ + */ function getConfiguration(address asset) external view @@ -556,7 +556,7 @@ interface IPool { * @notice Returns the configuration of the user across all the reserves * @param user The user address * @return The configuration of the user - **/ + */ function getUserConfiguration(address user) external view @@ -580,7 +580,7 @@ interface IPool { * @notice Returns the state and configuration of the reserve * @param asset The address of the underlying asset of the reserve * @return The state and configuration data of the reserve - **/ + */ function getReserveData(address asset) external view returns (DataTypes.ReserveData memory); /** @@ -606,20 +606,20 @@ interface IPool { * @notice Returns the list of the underlying assets of all the initialized reserves * @dev It does not include dropped reserves * @return The addresses of the underlying assets of the initialized reserves - **/ + */ function getReservesList() external view returns (address[] memory); /** * @notice Returns the address of the underlying asset of a reserve by the reserve id as stored in the DataTypes.ReserveData struct * @param id The id of the reserve as stored in the DataTypes.ReserveData struct * @return The address of the reserve associated with id - **/ + */ function getReserveAddressById(uint16 id) external view returns (address); /** * @notice Returns the PoolAddressesProvider connected to this contract * @return The address of the PoolAddressesProvider - **/ + */ function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider); /** @@ -712,7 +712,7 @@ interface IPool { /** * @notice Mints the assets accrued through the reserve factor to the treasury in the form of aTokens * @param assets The list of reserves for which the minting needs to be executed - **/ + */ function mintToTreasury(address[] calldata assets) external; /** @@ -738,7 +738,7 @@ interface IPool { * is a different wallet * @param referralCode Code used to register the integrator originating the operation, for potential rewards. * 0 if the action is executed directly by the user, without any middle-man - **/ + */ function deposit( address asset, uint256 amount, diff --git a/contracts/interfaces/IPoolAddressesProvider.sol b/contracts/interfaces/IPoolAddressesProvider.sol index c3c8617f9..587a0d0bc 100644 --- a/contracts/interfaces/IPoolAddressesProvider.sol +++ b/contracts/interfaces/IPoolAddressesProvider.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.0; * @title IPoolAddressesProvider * @author Aave * @notice Defines the basic interface for a Pool Addresses Provider. - **/ + */ interface IPoolAddressesProvider { /** * @dev Emitted when the market identifier is updated. @@ -100,7 +100,7 @@ interface IPoolAddressesProvider { /** * @notice Returns the id of the Aave market to which this contract points to. * @return The market id - **/ + */ function getMarketId() external view returns (string memory); /** @@ -142,27 +142,27 @@ interface IPoolAddressesProvider { /** * @notice Returns the address of the Pool proxy. * @return The Pool proxy address - **/ + */ function getPool() external view returns (address); /** * @notice Updates the implementation of the Pool, or creates a proxy * setting the new `pool` implementation when the function is called for the first time. * @param newPoolImpl The new Pool implementation - **/ + */ function setPoolImpl(address newPoolImpl) external; /** * @notice Returns the address of the PoolConfigurator proxy. * @return The PoolConfigurator proxy address - **/ + */ function getPoolConfigurator() external view returns (address); /** * @notice Updates the implementation of the PoolConfigurator, or creates a proxy * setting the new `PoolConfigurator` implementation when the function is called for the first time. * @param newPoolConfiguratorImpl The new PoolConfigurator implementation - **/ + */ function setPoolConfiguratorImpl(address newPoolConfiguratorImpl) external; /** @@ -186,7 +186,7 @@ interface IPoolAddressesProvider { /** * @notice Updates the address of the ACL manager. * @param newAclManager The address of the new ACLManager - **/ + */ function setACLManager(address newAclManager) external; /** @@ -210,7 +210,7 @@ interface IPoolAddressesProvider { /** * @notice Updates the address of the price oracle sentinel. * @param newPriceOracleSentinel The address of the new PriceOracleSentinel - **/ + */ function setPriceOracleSentinel(address newPriceOracleSentinel) external; /** @@ -222,6 +222,6 @@ interface IPoolAddressesProvider { /** * @notice Updates the address of the data provider. * @param newDataProvider The address of the new DataProvider - **/ + */ function setPoolDataProvider(address newDataProvider) external; } diff --git a/contracts/interfaces/IPoolAddressesProviderRegistry.sol b/contracts/interfaces/IPoolAddressesProviderRegistry.sol index f3867d06b..e81df6791 100644 --- a/contracts/interfaces/IPoolAddressesProviderRegistry.sol +++ b/contracts/interfaces/IPoolAddressesProviderRegistry.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.0; * @title IPoolAddressesProviderRegistry * @author Aave * @notice Defines the basic interface for an Aave Pool Addresses Provider Registry. - **/ + */ interface IPoolAddressesProviderRegistry { /** * @dev Emitted when a new AddressesProvider is registered. @@ -24,7 +24,7 @@ interface IPoolAddressesProviderRegistry { /** * @notice Returns the list of registered addresses providers * @return The list of addresses providers - **/ + */ function getAddressesProvidersList() external view returns (address[] memory); /** @@ -50,12 +50,12 @@ interface IPoolAddressesProviderRegistry { * @dev The id must not be used by an already registered PoolAddressesProvider * @param provider The address of the new PoolAddressesProvider * @param id The id for the new PoolAddressesProvider, referring to the market it belongs to - **/ + */ function registerAddressesProvider(address provider, uint256 id) external; /** * @notice Removes an addresses provider from the list of registered addresses providers * @param provider The PoolAddressesProvider address - **/ + */ function unregisterAddressesProvider(address provider) external; } diff --git a/contracts/interfaces/IPoolConfigurator.sol b/contracts/interfaces/IPoolConfigurator.sol index b0a583e47..457ce66a9 100644 --- a/contracts/interfaces/IPoolConfigurator.sol +++ b/contracts/interfaces/IPoolConfigurator.sol @@ -7,7 +7,7 @@ import {ConfiguratorInputTypes} from '../protocol/libraries/types/ConfiguratorIn * @title IPoolConfigurator * @author Aave * @notice Defines the basic interface for a Pool configurator. - **/ + */ interface IPoolConfigurator { /** * @dev Emitted when a reserve is initialized. @@ -16,7 +16,7 @@ interface IPoolConfigurator { * @param stableDebtToken The address of the associated stable rate debt token * @param variableDebtToken The address of the associated variable rate debt token * @param interestRateStrategyAddress The address of the interest rate strategy for the reserve - **/ + */ event ReserveInitialized( address indexed asset, address indexed aToken, @@ -29,7 +29,7 @@ interface IPoolConfigurator { * @dev Emitted when borrowing is enabled or disabled on a reserve. * @param asset The address of the underlying asset of the reserve * @param enabled True if borrowing is enabled, false otherwise - **/ + */ event ReserveBorrowing(address indexed asset, bool enabled); /** @@ -45,7 +45,7 @@ interface IPoolConfigurator { * @param ltv The loan to value of the asset when used as collateral * @param liquidationThreshold The threshold at which loans using this asset as collateral will be considered undercollateralized * @param liquidationBonus The bonus liquidators receive to liquidate this asset - **/ + */ event CollateralConfigurationChanged( address indexed asset, uint256 ltv, @@ -57,34 +57,34 @@ interface IPoolConfigurator { * @dev Emitted when stable rate borrowing is enabled or disabled on a reserve * @param asset The address of the underlying asset of the reserve * @param enabled True if stable rate borrowing is enabled, false otherwise - **/ + */ event ReserveStableRateBorrowing(address indexed asset, bool enabled); /** * @dev Emitted when a reserve is activated or deactivated * @param asset The address of the underlying asset of the reserve * @param active True if reserve is active, false otherwise - **/ + */ event ReserveActive(address indexed asset, bool active); /** * @dev Emitted when a reserve is frozen or unfrozen * @param asset The address of the underlying asset of the reserve * @param frozen True if reserve is frozen, false otherwise - **/ + */ event ReserveFrozen(address indexed asset, bool frozen); /** * @dev Emitted when a reserve is paused or unpaused * @param asset The address of the underlying asset of the reserve * @param paused True if reserve is paused, false otherwise - **/ + */ event ReservePaused(address indexed asset, bool paused); /** * @dev Emitted when a reserve is dropped. * @param asset The address of the underlying asset of the reserve - **/ + */ event ReserveDropped(address indexed asset); /** @@ -92,7 +92,7 @@ interface IPoolConfigurator { * @param asset The address of the underlying asset of the reserve * @param oldReserveFactor The old reserve factor, expressed in bps * @param newReserveFactor The new reserve factor, expressed in bps - **/ + */ event ReserveFactorChanged( address indexed asset, uint256 oldReserveFactor, @@ -104,7 +104,7 @@ interface IPoolConfigurator { * @param asset The address of the underlying asset of the reserve * @param oldBorrowCap The old borrow cap * @param newBorrowCap The new borrow cap - **/ + */ event BorrowCapChanged(address indexed asset, uint256 oldBorrowCap, uint256 newBorrowCap); /** @@ -112,7 +112,7 @@ interface IPoolConfigurator { * @param asset The address of the underlying asset of the reserve * @param oldSupplyCap The old supply cap * @param newSupplyCap The new supply cap - **/ + */ event SupplyCapChanged(address indexed asset, uint256 oldSupplyCap, uint256 newSupplyCap); /** @@ -120,7 +120,7 @@ interface IPoolConfigurator { * @param asset The address of the underlying asset of the reserve * @param oldFee The old liquidation protocol fee, expressed in bps * @param newFee The new liquidation protocol fee, expressed in bps - **/ + */ event LiquidationProtocolFeeChanged(address indexed asset, uint256 oldFee, uint256 newFee); /** @@ -140,7 +140,7 @@ interface IPoolConfigurator { * @param asset The address of the underlying asset of the reserve * @param oldCategoryId The old eMode asset category * @param newCategoryId The new eMode asset category - **/ + */ event EModeAssetCategoryChanged(address indexed asset, uint8 oldCategoryId, uint8 newCategoryId); /** @@ -151,7 +151,7 @@ interface IPoolConfigurator { * @param liquidationBonus The liquidationBonus for the asset category in eMode * @param oracle The optional address of the price oracle specific for this category * @param label A human readable identifier for the category - **/ + */ event EModeCategoryAdded( uint8 indexed categoryId, uint256 ltv, @@ -166,7 +166,7 @@ interface IPoolConfigurator { * @param asset The address of the underlying asset of the reserve * @param oldStrategy The address of the old interest strategy contract * @param newStrategy The address of the new interest strategy contract - **/ + */ event ReserveInterestRateStrategyChanged( address indexed asset, address oldStrategy, @@ -178,7 +178,7 @@ interface IPoolConfigurator { * @param asset The address of the underlying asset of the reserve * @param proxy The aToken proxy address * @param implementation The new aToken implementation - **/ + */ event ATokenUpgraded( address indexed asset, address indexed proxy, @@ -190,7 +190,7 @@ interface IPoolConfigurator { * @param asset The address of the underlying asset of the reserve * @param proxy The stable debt token proxy address * @param implementation The new aToken implementation - **/ + */ event StableDebtTokenUpgraded( address indexed asset, address indexed proxy, @@ -202,7 +202,7 @@ interface IPoolConfigurator { * @param asset The address of the underlying asset of the reserve * @param proxy The variable debt token proxy address * @param implementation The new aToken implementation - **/ + */ event VariableDebtTokenUpgraded( address indexed asset, address indexed proxy, @@ -214,7 +214,7 @@ interface IPoolConfigurator { * @param asset The address of the underlying asset of the reserve * @param oldDebtCeiling The old debt ceiling * @param newDebtCeiling The new debt ceiling - **/ + */ event DebtCeilingChanged(address indexed asset, uint256 oldDebtCeiling, uint256 newDebtCeiling); /** @@ -222,7 +222,7 @@ interface IPoolConfigurator { * @param asset The address of the underlying asset of the reserve * @param oldState The old siloed borrowing state * @param newState The new siloed borrowing state - **/ + */ event SiloedBorrowingChanged(address indexed asset, bool oldState, bool newState); /** @@ -236,7 +236,7 @@ interface IPoolConfigurator { * @dev Emitted when the total premium on flashloans is updated. * @param oldFlashloanPremiumTotal The old premium, expressed in bps * @param newFlashloanPremiumTotal The new premium, expressed in bps - **/ + */ event FlashloanPremiumTotalUpdated( uint128 oldFlashloanPremiumTotal, uint128 newFlashloanPremiumTotal @@ -246,7 +246,7 @@ interface IPoolConfigurator { * @dev Emitted when the part of the premium that goes to protocol is updated. * @param oldFlashloanPremiumToProtocol The old premium, expressed in bps * @param newFlashloanPremiumToProtocol The new premium, expressed in bps - **/ + */ event FlashloanPremiumToProtocolUpdated( uint128 oldFlashloanPremiumToProtocol, uint128 newFlashloanPremiumToProtocol @@ -256,32 +256,32 @@ interface IPoolConfigurator { * @dev Emitted when the reserve is set as borrowable/non borrowable in isolation mode. * @param asset The address of the underlying asset of the reserve * @param borrowable True if the reserve is borrowable in isolation, false otherwise - **/ + */ event BorrowableInIsolationChanged(address asset, bool borrowable); /** * @notice Initializes multiple reserves. * @param input The array of initialization parameters - **/ + */ function initReserves(ConfiguratorInputTypes.InitReserveInput[] calldata input) external; /** * @dev Updates the aToken implementation for the reserve. * @param input The aToken update parameters - **/ + */ function updateAToken(ConfiguratorInputTypes.UpdateATokenInput calldata input) external; /** * @notice Updates the stable debt token implementation for the reserve. * @param input The stableDebtToken update parameters - **/ + */ function updateStableDebtToken(ConfiguratorInputTypes.UpdateDebtTokenInput calldata input) external; /** * @notice Updates the variable debt token implementation for the asset. * @param input The variableDebtToken update parameters - **/ + */ function updateVariableDebtToken(ConfiguratorInputTypes.UpdateDebtTokenInput calldata input) external; @@ -290,7 +290,7 @@ interface IPoolConfigurator { * @dev Can only be disabled (set to false) if stable borrowing is disabled * @param asset The address of the underlying asset of the reserve * @param enabled True if borrowing needs to be enabled, false otherwise - **/ + */ function setReserveBorrowing(address asset, bool enabled) external; /** @@ -301,7 +301,7 @@ interface IPoolConfigurator { * @param ltv The loan to value of the asset when used as collateral * @param liquidationThreshold The threshold at which loans using this asset as collateral will be considered undercollateralized * @param liquidationBonus The bonus liquidators receive to liquidate this asset - **/ + */ function configureReserveAsCollateral( address asset, uint256 ltv, @@ -314,7 +314,7 @@ interface IPoolConfigurator { * @dev Can only be enabled (set to true) if borrowing is enabled * @param asset The address of the underlying asset of the reserve * @param enabled True if stable rate borrowing needs to be enabled, false otherwise - **/ + */ function setReserveStableRateBorrowing(address asset, bool enabled) external; /** @@ -328,7 +328,7 @@ interface IPoolConfigurator { * @notice Activate or deactivate a reserve * @param asset The address of the underlying asset of the reserve * @param active True if the reserve needs to be active, false otherwise - **/ + */ function setReserveActive(address asset, bool active) external; /** @@ -336,7 +336,7 @@ interface IPoolConfigurator { * or rate swap but allows repayments, liquidations, rate rebalances and withdrawals. * @param asset The address of the underlying asset of the reserve * @param freeze True if the reserve needs to be frozen, false otherwise - **/ + */ function setReserveFreeze(address asset, bool freeze) external; /** @@ -347,7 +347,7 @@ interface IPoolConfigurator { * consistency in the debt ceiling calculations * @param asset The address of the underlying asset of the reserve * @param borrowable True if the asset should be borrowable in isolation, false otherwise - **/ + */ function setBorrowableInIsolation(address asset, bool borrowable) external; /** @@ -355,21 +355,21 @@ interface IPoolConfigurator { * swap interest rate, liquidate, atoken transfers). * @param asset The address of the underlying asset of the reserve * @param paused True if pausing the reserve, false if unpausing - **/ + */ function setReservePause(address asset, bool paused) external; /** * @notice Updates the reserve factor of a reserve. * @param asset The address of the underlying asset of the reserve * @param newReserveFactor The new reserve factor of the reserve - **/ + */ function setReserveFactor(address asset, uint256 newReserveFactor) external; /** * @notice Sets the interest rate strategy of a reserve. * @param asset The address of the underlying asset of the reserve * @param newRateStrategyAddress The address of the new interest strategy contract - **/ + */ function setReserveInterestRateStrategyAddress(address asset, address newRateStrategyAddress) external; @@ -377,42 +377,42 @@ interface IPoolConfigurator { * @notice Pauses or unpauses all the protocol reserves. In the paused state all the protocol interactions * are suspended. * @param paused True if protocol needs to be paused, false otherwise - **/ + */ function setPoolPause(bool paused) external; /** * @notice Updates the borrow cap of a reserve. * @param asset The address of the underlying asset of the reserve * @param newBorrowCap The new borrow cap of the reserve - **/ + */ function setBorrowCap(address asset, uint256 newBorrowCap) external; /** * @notice Updates the supply cap of a reserve. * @param asset The address of the underlying asset of the reserve * @param newSupplyCap The new supply cap of the reserve - **/ + */ function setSupplyCap(address asset, uint256 newSupplyCap) external; /** * @notice Updates the liquidation protocol fee of reserve. * @param asset The address of the underlying asset of the reserve * @param newFee The new liquidation protocol fee of the reserve, expressed in bps - **/ + */ function setLiquidationProtocolFee(address asset, uint256 newFee) external; /** * @notice Updates the unbacked mint cap of reserve. * @param asset The address of the underlying asset of the reserve * @param newUnbackedMintCap The new unbacked mint cap of the reserve - **/ + */ function setUnbackedMintCap(address asset, uint256 newUnbackedMintCap) external; /** * @notice Assign an efficiency mode (eMode) category to asset. * @param asset The address of the underlying asset of the reserve * @param newCategoryId The new category id of the asset - **/ + */ function setAssetEModeCategory(address asset, uint8 newCategoryId) external; /** @@ -427,7 +427,7 @@ interface IPoolConfigurator { * @param liquidationBonus The liquidation bonus associated with the category * @param oracle The oracle associated with the category * @param label A label identifying the category - **/ + */ function setEModeCategory( uint8 categoryId, uint16 ltv, @@ -440,7 +440,7 @@ interface IPoolConfigurator { /** * @notice Drops a reserve entirely. * @param asset The address of the reserve to drop - **/ + */ function dropReserve(address asset) external; /** diff --git a/contracts/interfaces/IPoolDataProvider.sol b/contracts/interfaces/IPoolDataProvider.sol index f0683fda9..e299d3f8b 100644 --- a/contracts/interfaces/IPoolDataProvider.sol +++ b/contracts/interfaces/IPoolDataProvider.sol @@ -76,7 +76,7 @@ interface IPoolDataProvider { * @param asset The address of the underlying asset of the reserve * @return borrowCap The borrow cap of the reserve * @return supplyCap The supply cap of the reserve - **/ + */ function getReserveCaps(address asset) external view diff --git a/contracts/interfaces/IPriceOracle.sol b/contracts/interfaces/IPriceOracle.sol index b86cc1d17..3a6db80ac 100644 --- a/contracts/interfaces/IPriceOracle.sol +++ b/contracts/interfaces/IPriceOracle.sol @@ -5,19 +5,19 @@ pragma solidity ^0.8.0; * @title IPriceOracle * @author Aave * @notice Defines the basic interface for a Price oracle. - **/ + */ interface IPriceOracle { /** * @notice Returns the asset price in the base currency * @param asset The address of the asset * @return The price of the asset - **/ + */ function getAssetPrice(address asset) external view returns (uint256); /** * @notice Set the price of the asset * @param asset The address of the asset * @param price The price of the asset - **/ + */ function setAssetPrice(address asset, uint256 price) external; } diff --git a/contracts/interfaces/IPriceOracleGetter.sol b/contracts/interfaces/IPriceOracleGetter.sol index 40e59954f..0e0df3e73 100644 --- a/contracts/interfaces/IPriceOracleGetter.sol +++ b/contracts/interfaces/IPriceOracleGetter.sol @@ -5,26 +5,26 @@ pragma solidity ^0.8.0; * @title IPriceOracleGetter * @author Aave * @notice Interface for the Aave price oracle. - **/ + */ interface IPriceOracleGetter { /** * @notice Returns the base currency address * @dev Address 0x0 is reserved for USD as base currency. * @return Returns the base currency address. - **/ + */ function BASE_CURRENCY() external view returns (address); /** * @notice Returns the base currency unit * @dev 1 ether for ETH, 1e8 for USD. * @return Returns the base currency unit. - **/ + */ function BASE_CURRENCY_UNIT() external view returns (uint256); /** * @notice Returns the asset price in the base currency * @param asset The address of the asset * @return The price of the asset - **/ + */ function getAssetPrice(address asset) external view returns (uint256); } diff --git a/contracts/interfaces/IScaledBalanceToken.sol b/contracts/interfaces/IScaledBalanceToken.sol index 8f215c692..fe311fbb1 100644 --- a/contracts/interfaces/IScaledBalanceToken.sol +++ b/contracts/interfaces/IScaledBalanceToken.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.0; * @title IScaledBalanceToken * @author Aave * @notice Defines the basic interface for a scaled-balance token. - **/ + */ interface IScaledBalanceToken { /** * @dev Emitted after the mint action @@ -14,7 +14,7 @@ interface IScaledBalanceToken { * @param value The scaled-up amount being minted (based on user entered amount and balance increase from interest) * @param balanceIncrease The increase in scaled-up balance since the last action of 'onBehalfOf' * @param index The next liquidity index of the reserve - **/ + */ event Mint( address indexed caller, address indexed onBehalfOf, @@ -31,7 +31,7 @@ interface IScaledBalanceToken { * @param value The scaled-up amount being burned (user entered amount - balance increase from interest) * @param balanceIncrease The increase in scaled-up balance since the last action of 'from' * @param index The next liquidity index of the reserve - **/ + */ event Burn( address indexed from, address indexed target, @@ -46,7 +46,7 @@ interface IScaledBalanceToken { * at the moment of the update * @param user The user whose balance is calculated * @return The scaled balance of the user - **/ + */ function scaledBalanceOf(address user) external view returns (uint256); /** @@ -54,19 +54,19 @@ interface IScaledBalanceToken { * @param user The address of the user * @return The scaled balance of the user * @return The scaled total supply - **/ + */ function getScaledUserBalanceAndSupply(address user) external view returns (uint256, uint256); /** * @notice Returns the scaled total supply of the scaled balance token. Represents sum(debt/index) * @return The scaled total supply - **/ + */ function scaledTotalSupply() external view returns (uint256); /** * @notice Returns last index interest was accrued to the user's balance * @param user The address of the user * @return The last index interest was accrued to the user's balance, expressed in ray - **/ + */ function getPreviousIndex(address user) external view returns (uint256); } diff --git a/contracts/interfaces/IStableDebtToken.sol b/contracts/interfaces/IStableDebtToken.sol index c9d33a80d..77b986f2a 100644 --- a/contracts/interfaces/IStableDebtToken.sol +++ b/contracts/interfaces/IStableDebtToken.sol @@ -8,7 +8,7 @@ import {IInitializableDebtToken} from './IInitializableDebtToken.sol'; * @author Aave * @notice Defines the interface for the stable debt token * @dev It does not inherit from IERC20 to save in code size - **/ + */ interface IStableDebtToken is IInitializableDebtToken { /** * @dev Emitted when new stable debt is minted @@ -20,7 +20,7 @@ interface IStableDebtToken is IInitializableDebtToken { * @param newRate The rate of the debt after the minting * @param avgStableRate The next average stable rate after the minting * @param newTotalSupply The next total supply of the stable debt token after the action - **/ + */ event Mint( address indexed user, address indexed onBehalfOf, @@ -40,7 +40,7 @@ interface IStableDebtToken is IInitializableDebtToken { * @param balanceIncrease The increase in balance since the last action of 'from' * @param avgStableRate The next average stable rate after the burning * @param newTotalSupply The next total supply of the stable debt token after the action - **/ + */ event Burn( address indexed from, uint256 amount, @@ -62,7 +62,7 @@ interface IStableDebtToken is IInitializableDebtToken { * @return True if it is the first borrow, false otherwise * @return The total stable debt * @return The average stable borrow rate - **/ + */ function mint( address user, address onBehalfOf, @@ -86,27 +86,27 @@ interface IStableDebtToken is IInitializableDebtToken { * @param amount The amount of debt tokens getting burned * @return The total stable debt * @return The average stable borrow rate - **/ + */ function burn(address from, uint256 amount) external returns (uint256, uint256); /** * @notice Returns the average rate of all the stable rate loans. * @return The average stable rate - **/ + */ function getAverageStableRate() external view returns (uint256); /** * @notice Returns the stable rate of the user debt * @param user The address of the user * @return The stable rate of the user - **/ + */ function getUserStableRate(address user) external view returns (uint256); /** * @notice Returns the timestamp of the last update of the user * @param user The address of the user * @return The timestamp - **/ + */ function getUserLastUpdated(address user) external view returns (uint40); /** @@ -115,7 +115,7 @@ interface IStableDebtToken is IInitializableDebtToken { * @return The total supply * @return The average stable rate * @return The timestamp of the last update - **/ + */ function getSupplyData() external view @@ -129,25 +129,25 @@ interface IStableDebtToken is IInitializableDebtToken { /** * @notice Returns the timestamp of the last update of the total supply * @return The timestamp - **/ + */ function getTotalSupplyLastUpdated() external view returns (uint40); /** * @notice Returns the total supply and the average stable rate * @return The total supply * @return The average rate - **/ + */ function getTotalSupplyAndAvgRate() external view returns (uint256, uint256); /** * @notice Returns the principal debt balance of the user * @return The debt balance of the user since the last burn/mint action - **/ + */ function principalBalanceOf(address user) external view returns (uint256); /** * @notice Returns the address of the underlying asset of this stableDebtToken (E.g. WETH for stableDebtWETH) * @return The address of the underlying asset - **/ + */ function UNDERLYING_ASSET_ADDRESS() external view returns (address); } diff --git a/contracts/interfaces/IVariableDebtToken.sol b/contracts/interfaces/IVariableDebtToken.sol index cc61f6c68..5c4fc69ec 100644 --- a/contracts/interfaces/IVariableDebtToken.sol +++ b/contracts/interfaces/IVariableDebtToken.sol @@ -8,7 +8,7 @@ import {IInitializableDebtToken} from './IInitializableDebtToken.sol'; * @title IVariableDebtToken * @author Aave * @notice Defines the basic interface for a variable debt token. - **/ + */ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { /** * @notice Mints debt token to the `onBehalfOf` address @@ -19,7 +19,7 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { * @param index The variable debt index of the reserve * @return True if the previous balance of the user is 0, false otherwise * @return The scaled total debt of the reserve - **/ + */ function mint( address user, address onBehalfOf, @@ -35,7 +35,7 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { * @param amount The amount getting burned * @param index The variable debt index of the reserve * @return The scaled total debt of the reserve - **/ + */ function burn( address from, uint256 amount, @@ -45,6 +45,6 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { /** * @notice Returns the address of the underlying asset of this debtToken (E.g. WETH for variableDebtWETH) * @return The address of the underlying asset - **/ + */ function UNDERLYING_ASSET_ADDRESS() external view returns (address); } diff --git a/contracts/misc/AaveOracle.sol b/contracts/misc/AaveOracle.sol index 99afe286b..4d728c9cd 100644 --- a/contracts/misc/AaveOracle.sol +++ b/contracts/misc/AaveOracle.sol @@ -28,7 +28,7 @@ contract AaveOracle is IAaveOracle { /** * @dev Only asset listing or pool admin can call functions marked by this modifier. - **/ + */ modifier onlyAssetListingOrPoolAdmins() { _onlyAssetListingOrPoolAdmins(); _; diff --git a/contracts/mocks/tests/MockReserveInterestRateStrategy.sol b/contracts/mocks/tests/MockReserveInterestRateStrategy.sol index eaa0830d5..66dd40cca 100644 --- a/contracts/mocks/tests/MockReserveInterestRateStrategy.sol +++ b/contracts/mocks/tests/MockReserveInterestRateStrategy.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.10; +import {IDefaultInterestRateStrategy} from '../../interfaces/IDefaultInterestRateStrategy.sol'; import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol'; import {WadRayMath} from '../../protocol/libraries/math/WadRayMath.sol'; import {DataTypes} from '../../protocol/libraries/types/DataTypes.sol'; -import {IDefaultInterestRateStrategy} from '../../interfaces/IDefaultInterestRateStrategy.sol'; contract MockReserveInterestRateStrategy is IDefaultInterestRateStrategy { uint256 public immutable OPTIMAL_USAGE_RATIO; diff --git a/contracts/mocks/upgradeability/MockInitializableImplementation.sol b/contracts/mocks/upgradeability/MockInitializableImplementation.sol index e70eab116..e165d1242 100644 --- a/contracts/mocks/upgradeability/MockInitializableImplementation.sol +++ b/contracts/mocks/upgradeability/MockInitializableImplementation.sol @@ -13,7 +13,7 @@ contract MockInitializableImple is VersionedInitializable { /** * @dev returns the revision number of the contract * Needs to be defined in the inherited class as a constant. - **/ + */ function getRevision() internal pure override returns (uint256) { return REVISION; } @@ -47,7 +47,7 @@ contract MockInitializableImpleV2 is VersionedInitializable { /** * @dev returns the revision number of the contract * Needs to be defined in the inherited class as a constant. - **/ + */ function getRevision() internal pure override returns (uint256) { return REVISION; } @@ -79,7 +79,7 @@ contract MockInitializableFromConstructorImple is VersionedInitializable { /** * @dev returns the revision number of the contract * Needs to be defined in the inherited class as a constant. - **/ + */ function getRevision() internal pure override returns (uint256) { return REVISION; } @@ -101,7 +101,7 @@ contract MockReentrantInitializableImple is VersionedInitializable { /** * @dev returns the revision number of the contract * Needs to be defined in the inherited class as a constant. - **/ + */ function getRevision() internal pure override returns (uint256) { return REVISION; } diff --git a/contracts/protocol/configuration/PoolAddressesProvider.sol b/contracts/protocol/configuration/PoolAddressesProvider.sol index 073e92f35..b4255fac5 100644 --- a/contracts/protocol/configuration/PoolAddressesProvider.sol +++ b/contracts/protocol/configuration/PoolAddressesProvider.sol @@ -11,7 +11,7 @@ import {InitializableImmutableAdminUpgradeabilityProxy} from '../libraries/aave- * @notice Main registry of addresses part of or connected to the protocol, including permissioned roles * @dev Acts as factory of proxies and admin of those, so with right to change its implementations * @dev Owned by the Aave Governance - **/ + */ contract PoolAddressesProvider is Ownable, IPoolAddressesProvider { // Identifier of the Aave Market string private _marketId; @@ -164,7 +164,7 @@ contract PoolAddressesProvider is Ownable, IPoolAddressesProvider { * calls the initialize() function via upgradeToAndCall() in the proxy * @param id The id of the proxy to be updated * @param newAddress The address of the new implementation - **/ + */ function _updateImpl(bytes32 id, address newAddress) internal { address proxyAddress = _addresses[id]; InitializableImmutableAdminUpgradeabilityProxy proxy; @@ -184,7 +184,7 @@ contract PoolAddressesProvider is Ownable, IPoolAddressesProvider { /** * @notice Updates the identifier of the Aave market. * @param newMarketId The new id of the market - **/ + */ function _setMarketId(string memory newMarketId) internal { string memory oldMarketId = _marketId; _marketId = newMarketId; diff --git a/contracts/protocol/configuration/PoolAddressesProviderRegistry.sol b/contracts/protocol/configuration/PoolAddressesProviderRegistry.sol index f5cb3d373..5f724eb8e 100644 --- a/contracts/protocol/configuration/PoolAddressesProviderRegistry.sol +++ b/contracts/protocol/configuration/PoolAddressesProviderRegistry.sol @@ -11,7 +11,7 @@ import {IPoolAddressesProviderRegistry} from '../../interfaces/IPoolAddressesPro * @notice Main registry of PoolAddressesProvider of Aave markets. * @dev Used for indexing purposes of Aave protocol's markets. The id assigned to a PoolAddressesProvider refers to the * market it is connected with, for example with `1` for the Aave main market and `2` for the next created. - **/ + */ contract PoolAddressesProviderRegistry is Ownable, IPoolAddressesProviderRegistry { // Map of address provider ids (addressesProvider => id) mapping(address => uint256) private _addressesProviderToId; diff --git a/contracts/protocol/configuration/PriceOracleSentinel.sol b/contracts/protocol/configuration/PriceOracleSentinel.sol index 81b22d8db..280c76e66 100644 --- a/contracts/protocol/configuration/PriceOracleSentinel.sol +++ b/contracts/protocol/configuration/PriceOracleSentinel.sol @@ -17,7 +17,7 @@ import {IACLManager} from '../../interfaces/IACLManager.sol'; contract PriceOracleSentinel is IPriceOracleSentinel { /** * @dev Only pool admin can call functions marked by this modifier. - **/ + */ modifier onlyPoolAdmin() { IACLManager aclManager = IACLManager(ADDRESSES_PROVIDER.getACLManager()); require(aclManager.isPoolAdmin(msg.sender), Errors.CALLER_NOT_POOL_ADMIN); @@ -26,7 +26,7 @@ contract PriceOracleSentinel is IPriceOracleSentinel { /** * @dev Only risk or pool admin can call functions marked by this modifier. - **/ + */ modifier onlyRiskOrPoolAdmins() { IACLManager aclManager = IACLManager(ADDRESSES_PROVIDER.getACLManager()); require( diff --git a/contracts/protocol/libraries/aave-upgradeability/VersionedInitializable.sol b/contracts/protocol/libraries/aave-upgradeability/VersionedInitializable.sol index 570c319e8..d24312bf1 100644 --- a/contracts/protocol/libraries/aave-upgradeability/VersionedInitializable.sol +++ b/contracts/protocol/libraries/aave-upgradeability/VersionedInitializable.sol @@ -51,13 +51,13 @@ abstract contract VersionedInitializable { * @notice Returns the revision number of the contract * @dev Needs to be defined in the inherited class as a constant. * @return The revision number - **/ + */ function getRevision() internal pure virtual returns (uint256); /** * @notice Returns true if and only if the function is running in the constructor * @return True if the function is running in the constructor - **/ + */ function isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not diff --git a/contracts/protocol/libraries/configuration/ReserveConfiguration.sol b/contracts/protocol/libraries/configuration/ReserveConfiguration.sol index a2aeba1ff..6ef2d4d45 100644 --- a/contracts/protocol/libraries/configuration/ReserveConfiguration.sol +++ b/contracts/protocol/libraries/configuration/ReserveConfiguration.sol @@ -69,7 +69,7 @@ library ReserveConfiguration { * @notice Sets the Loan to Value of the reserve * @param self The reserve configuration * @param ltv The new ltv - **/ + */ function setLtv(DataTypes.ReserveConfigurationMap memory self, uint256 ltv) internal pure { require(ltv <= MAX_VALID_LTV, Errors.INVALID_LTV); @@ -80,7 +80,7 @@ library ReserveConfiguration { * @notice Gets the Loan to Value of the reserve * @param self The reserve configuration * @return The loan to value - **/ + */ function getLtv(DataTypes.ReserveConfigurationMap memory self) internal pure returns (uint256) { return self.data & ~LTV_MASK; } @@ -89,7 +89,7 @@ library ReserveConfiguration { * @notice Sets the liquidation threshold of the reserve * @param self The reserve configuration * @param threshold The new liquidation threshold - **/ + */ function setLiquidationThreshold(DataTypes.ReserveConfigurationMap memory self, uint256 threshold) internal pure @@ -105,7 +105,7 @@ library ReserveConfiguration { * @notice Gets the liquidation threshold of the reserve * @param self The reserve configuration * @return The liquidation threshold - **/ + */ function getLiquidationThreshold(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -118,7 +118,7 @@ library ReserveConfiguration { * @notice Sets the liquidation bonus of the reserve * @param self The reserve configuration * @param bonus The new liquidation bonus - **/ + */ function setLiquidationBonus(DataTypes.ReserveConfigurationMap memory self, uint256 bonus) internal pure @@ -134,7 +134,7 @@ library ReserveConfiguration { * @notice Gets the liquidation bonus of the reserve * @param self The reserve configuration * @return The liquidation bonus - **/ + */ function getLiquidationBonus(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -147,7 +147,7 @@ library ReserveConfiguration { * @notice Sets the decimals of the underlying asset of the reserve * @param self The reserve configuration * @param decimals The decimals - **/ + */ function setDecimals(DataTypes.ReserveConfigurationMap memory self, uint256 decimals) internal pure @@ -161,7 +161,7 @@ library ReserveConfiguration { * @notice Gets the decimals of the underlying asset of the reserve * @param self The reserve configuration * @return The decimals of the asset - **/ + */ function getDecimals(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -174,7 +174,7 @@ library ReserveConfiguration { * @notice Sets the active state of the reserve * @param self The reserve configuration * @param active The active state - **/ + */ function setActive(DataTypes.ReserveConfigurationMap memory self, bool active) internal pure { self.data = (self.data & ACTIVE_MASK) | @@ -185,7 +185,7 @@ library ReserveConfiguration { * @notice Gets the active state of the reserve * @param self The reserve configuration * @return The active state - **/ + */ function getActive(DataTypes.ReserveConfigurationMap memory self) internal pure returns (bool) { return (self.data & ~ACTIVE_MASK) != 0; } @@ -194,7 +194,7 @@ library ReserveConfiguration { * @notice Sets the frozen state of the reserve * @param self The reserve configuration * @param frozen The frozen state - **/ + */ function setFrozen(DataTypes.ReserveConfigurationMap memory self, bool frozen) internal pure { self.data = (self.data & FROZEN_MASK) | @@ -205,7 +205,7 @@ library ReserveConfiguration { * @notice Gets the frozen state of the reserve * @param self The reserve configuration * @return The frozen state - **/ + */ function getFrozen(DataTypes.ReserveConfigurationMap memory self) internal pure returns (bool) { return (self.data & ~FROZEN_MASK) != 0; } @@ -214,7 +214,7 @@ library ReserveConfiguration { * @notice Sets the paused state of the reserve * @param self The reserve configuration * @param paused The paused state - **/ + */ function setPaused(DataTypes.ReserveConfigurationMap memory self, bool paused) internal pure { self.data = (self.data & PAUSED_MASK) | @@ -225,7 +225,7 @@ library ReserveConfiguration { * @notice Gets the paused state of the reserve * @param self The reserve configuration * @return The paused state - **/ + */ function getPaused(DataTypes.ReserveConfigurationMap memory self) internal pure returns (bool) { return (self.data & ~PAUSED_MASK) != 0; } @@ -238,7 +238,7 @@ library ReserveConfiguration { * consistency in the debt ceiling calculations. * @param self The reserve configuration * @param borrowable True if the asset is borrowable - **/ + */ function setBorrowableInIsolation(DataTypes.ReserveConfigurationMap memory self, bool borrowable) internal pure @@ -256,7 +256,7 @@ library ReserveConfiguration { * consistency in the debt ceiling calculations. * @param self The reserve configuration * @return The borrowable in isolation flag - **/ + */ function getBorrowableInIsolation(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -270,7 +270,7 @@ library ReserveConfiguration { * @dev When this flag is set to true, users borrowing this asset will not be allowed to borrow any other asset. * @param self The reserve configuration * @param siloed True if the asset is siloed - **/ + */ function setSiloedBorrowing(DataTypes.ReserveConfigurationMap memory self, bool siloed) internal pure @@ -285,7 +285,7 @@ library ReserveConfiguration { * @dev When this flag is set to true, users borrowing this asset will not be allowed to borrow any other asset. * @param self The reserve configuration * @return The siloed borrowing flag - **/ + */ function getSiloedBorrowing(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -298,7 +298,7 @@ library ReserveConfiguration { * @notice Enables or disables borrowing on the reserve * @param self The reserve configuration * @param enabled True if the borrowing needs to be enabled, false otherwise - **/ + */ function setBorrowingEnabled(DataTypes.ReserveConfigurationMap memory self, bool enabled) internal pure @@ -312,7 +312,7 @@ library ReserveConfiguration { * @notice Gets the borrowing state of the reserve * @param self The reserve configuration * @return The borrowing state - **/ + */ function getBorrowingEnabled(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -325,7 +325,7 @@ library ReserveConfiguration { * @notice Enables or disables stable rate borrowing on the reserve * @param self The reserve configuration * @param enabled True if the stable rate borrowing needs to be enabled, false otherwise - **/ + */ function setStableRateBorrowingEnabled( DataTypes.ReserveConfigurationMap memory self, bool enabled @@ -339,7 +339,7 @@ library ReserveConfiguration { * @notice Gets the stable rate borrowing state of the reserve * @param self The reserve configuration * @return The stable rate borrowing state - **/ + */ function getStableRateBorrowingEnabled(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -352,7 +352,7 @@ library ReserveConfiguration { * @notice Sets the reserve factor of the reserve * @param self The reserve configuration * @param reserveFactor The reserve factor - **/ + */ function setReserveFactor(DataTypes.ReserveConfigurationMap memory self, uint256 reserveFactor) internal pure @@ -368,7 +368,7 @@ library ReserveConfiguration { * @notice Gets the reserve factor of the reserve * @param self The reserve configuration * @return The reserve factor - **/ + */ function getReserveFactor(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -381,7 +381,7 @@ library ReserveConfiguration { * @notice Sets the borrow cap of the reserve * @param self The reserve configuration * @param borrowCap The borrow cap - **/ + */ function setBorrowCap(DataTypes.ReserveConfigurationMap memory self, uint256 borrowCap) internal pure @@ -395,7 +395,7 @@ library ReserveConfiguration { * @notice Gets the borrow cap of the reserve * @param self The reserve configuration * @return The borrow cap - **/ + */ function getBorrowCap(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -408,7 +408,7 @@ library ReserveConfiguration { * @notice Sets the supply cap of the reserve * @param self The reserve configuration * @param supplyCap The supply cap - **/ + */ function setSupplyCap(DataTypes.ReserveConfigurationMap memory self, uint256 supplyCap) internal pure @@ -422,7 +422,7 @@ library ReserveConfiguration { * @notice Gets the supply cap of the reserve * @param self The reserve configuration * @return The supply cap - **/ + */ function getSupplyCap(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -435,7 +435,7 @@ library ReserveConfiguration { * @notice Sets the debt ceiling in isolation mode for the asset * @param self The reserve configuration * @param ceiling The maximum debt ceiling for the asset - **/ + */ function setDebtCeiling(DataTypes.ReserveConfigurationMap memory self, uint256 ceiling) internal pure @@ -449,7 +449,7 @@ library ReserveConfiguration { * @notice Gets the debt ceiling for the asset if the asset is in isolation mode * @param self The reserve configuration * @return The debt ceiling (0 = isolation mode disabled) - **/ + */ function getDebtCeiling(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -462,7 +462,7 @@ library ReserveConfiguration { * @notice Sets the liquidation protocol fee of the reserve * @param self The reserve configuration * @param liquidationProtocolFee The liquidation protocol fee - **/ + */ function setLiquidationProtocolFee( DataTypes.ReserveConfigurationMap memory self, uint256 liquidationProtocolFee @@ -481,7 +481,7 @@ library ReserveConfiguration { * @dev Gets the liquidation protocol fee * @param self The reserve configuration * @return The liquidation protocol fee - **/ + */ function getLiquidationProtocolFee(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -495,7 +495,7 @@ library ReserveConfiguration { * @notice Sets the unbacked mint cap of the reserve * @param self The reserve configuration * @param unbackedMintCap The unbacked mint cap - **/ + */ function setUnbackedMintCap( DataTypes.ReserveConfigurationMap memory self, uint256 unbackedMintCap @@ -511,7 +511,7 @@ library ReserveConfiguration { * @dev Gets the unbacked mint cap of the reserve * @param self The reserve configuration * @return The unbacked mint cap - **/ + */ function getUnbackedMintCap(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -524,7 +524,7 @@ library ReserveConfiguration { * @notice Sets the eMode asset category * @param self The reserve configuration * @param category The asset category when the user selects the eMode - **/ + */ function setEModeCategory(DataTypes.ReserveConfigurationMap memory self, uint256 category) internal pure @@ -538,7 +538,7 @@ library ReserveConfiguration { * @dev Gets the eMode asset category * @param self The reserve configuration * @return The eMode category for the asset - **/ + */ function getEModeCategory(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -582,7 +582,7 @@ library ReserveConfiguration { * @return The state flag representing borrowing enabled * @return The state flag representing stableRateBorrowing enabled * @return The state flag representing paused - **/ + */ function getFlags(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -614,7 +614,7 @@ library ReserveConfiguration { * @return The state param representing reserve decimals * @return The state param representing reserve factor * @return The state param representing eMode category - **/ + */ function getParams(DataTypes.ReserveConfigurationMap memory self) internal pure @@ -644,7 +644,7 @@ library ReserveConfiguration { * @param self The reserve configuration * @return The state param representing borrow cap * @return The state param representing supply cap. - **/ + */ function getCaps(DataTypes.ReserveConfigurationMap memory self) internal pure diff --git a/contracts/protocol/libraries/configuration/UserConfiguration.sol b/contracts/protocol/libraries/configuration/UserConfiguration.sol index 34ef2b506..60d7dd3e1 100644 --- a/contracts/protocol/libraries/configuration/UserConfiguration.sol +++ b/contracts/protocol/libraries/configuration/UserConfiguration.sol @@ -23,7 +23,7 @@ library UserConfiguration { * @param self The configuration object * @param reserveIndex The index of the reserve in the bitmap * @param borrowing True if the user is borrowing the reserve, false otherwise - **/ + */ function setBorrowing( DataTypes.UserConfigurationMap storage self, uint256 reserveIndex, @@ -45,7 +45,7 @@ library UserConfiguration { * @param self The configuration object * @param reserveIndex The index of the reserve in the bitmap * @param usingAsCollateral True if the user is using the reserve as collateral, false otherwise - **/ + */ function setUsingAsCollateral( DataTypes.UserConfigurationMap storage self, uint256 reserveIndex, @@ -67,7 +67,7 @@ library UserConfiguration { * @param self The configuration object * @param reserveIndex The index of the reserve in the bitmap * @return True if the user has been using a reserve for borrowing or as collateral, false otherwise - **/ + */ function isUsingAsCollateralOrBorrowing( DataTypes.UserConfigurationMap memory self, uint256 reserveIndex @@ -83,7 +83,7 @@ library UserConfiguration { * @param self The configuration object * @param reserveIndex The index of the reserve in the bitmap * @return True if the user has been using a reserve for borrowing, false otherwise - **/ + */ function isBorrowing(DataTypes.UserConfigurationMap memory self, uint256 reserveIndex) internal pure @@ -100,7 +100,7 @@ library UserConfiguration { * @param self The configuration object * @param reserveIndex The index of the reserve in the bitmap * @return True if the user has been using a reserve as collateral, false otherwise - **/ + */ function isUsingAsCollateral(DataTypes.UserConfigurationMap memory self, uint256 reserveIndex) internal pure @@ -117,7 +117,7 @@ library UserConfiguration { * @dev this uses a simple trick - if a number is a power of two (only one bit set) then n & (n - 1) == 0 * @param self The configuration object * @return True if the user has been supplying as collateral one reserve, false otherwise - **/ + */ function isUsingAsCollateralOne(DataTypes.UserConfigurationMap memory self) internal pure @@ -131,7 +131,7 @@ library UserConfiguration { * @notice Checks if a user has been supplying any reserve as collateral * @param self The configuration object * @return True if the user has been supplying as collateral any reserve, false otherwise - **/ + */ function isUsingAsCollateralAny(DataTypes.UserConfigurationMap memory self) internal pure @@ -145,7 +145,7 @@ library UserConfiguration { * @dev this uses a simple trick - if a number is a power of two (only one bit set) then n & (n - 1) == 0 * @param self The configuration object * @return True if the user has been supplying as collateral one reserve, false otherwise - **/ + */ function isBorrowingOne(DataTypes.UserConfigurationMap memory self) internal pure returns (bool) { uint256 borrowingData = self.data & BORROWING_MASK; return borrowingData != 0 && (borrowingData & (borrowingData - 1) == 0); @@ -155,7 +155,7 @@ library UserConfiguration { * @notice Checks if a user has been borrowing from any reserve * @param self The configuration object * @return True if the user has been borrowing any reserve, false otherwise - **/ + */ function isBorrowingAny(DataTypes.UserConfigurationMap memory self) internal pure returns (bool) { return self.data & BORROWING_MASK != 0; } @@ -164,7 +164,7 @@ library UserConfiguration { * @notice Checks if a user has not been using any reserve for borrowing or supply * @param self The configuration object * @return True if the user has not been borrowing or supplying any reserve, false otherwise - **/ + */ function isEmpty(DataTypes.UserConfigurationMap memory self) internal pure returns (bool) { return self.data == 0; } diff --git a/contracts/protocol/libraries/helpers/Helpers.sol b/contracts/protocol/libraries/helpers/Helpers.sol index 06a37f611..66cbd9968 100644 --- a/contracts/protocol/libraries/helpers/Helpers.sol +++ b/contracts/protocol/libraries/helpers/Helpers.sol @@ -15,7 +15,7 @@ library Helpers { * @param reserveCache The reserve cache data object * @return The stable debt balance * @return The variable debt balance - **/ + */ function getUserCurrentDebt(address user, DataTypes.ReserveCache memory reserveCache) internal view diff --git a/contracts/protocol/libraries/logic/BridgeLogic.sol b/contracts/protocol/libraries/logic/BridgeLogic.sol index a6ec0da2a..6aa63badb 100644 --- a/contracts/protocol/libraries/logic/BridgeLogic.sol +++ b/contracts/protocol/libraries/logic/BridgeLogic.sol @@ -48,7 +48,7 @@ library BridgeLogic { * @param onBehalfOf The address that will receive the aTokens * @param referralCode Code used to register the integrator originating the operation, for potential rewards. * 0 if the action is executed directly by the user, without any middle-man - **/ + */ function executeMintUnbacked( mapping(address => DataTypes.ReserveData) storage reservesData, mapping(uint256 => address) storage reservesList, @@ -108,7 +108,7 @@ library BridgeLogic { * @param fee The amount paid in fees * @param protocolFeeBps The fraction of fees in basis points paid to the protocol * @return The backed amount - **/ + */ function executeBackUnbacked( DataTypes.ReserveData storage reserve, address asset, diff --git a/contracts/protocol/libraries/logic/EModeLogic.sol b/contracts/protocol/libraries/logic/EModeLogic.sol index e329828b4..38505aa90 100644 --- a/contracts/protocol/libraries/logic/EModeLogic.sol +++ b/contracts/protocol/libraries/logic/EModeLogic.sol @@ -82,7 +82,7 @@ library EModeLogic { * @return The eMode ltv * @return The eMode liquidation threshold * @return The eMode asset price - **/ + */ function getEModeConfiguration( DataTypes.EModeCategory storage category, IPriceOracleGetter oracle @@ -110,7 +110,7 @@ library EModeLogic { * @param eModeUserCategory The user eMode category * @param eModeAssetCategory The asset eMode category * @return True if eMode is active and the asset belongs to the eMode category chosen by the user, false otherwise - **/ + */ function isInEModeCategory(uint256 eModeUserCategory, uint256 eModeAssetCategory) internal pure diff --git a/contracts/protocol/libraries/logic/GenericLogic.sol b/contracts/protocol/libraries/logic/GenericLogic.sol index a03fc3ca2..088b03666 100644 --- a/contracts/protocol/libraries/logic/GenericLogic.sol +++ b/contracts/protocol/libraries/logic/GenericLogic.sol @@ -60,7 +60,7 @@ library 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( mapping(address => DataTypes.ReserveData) storage reservesData, mapping(uint256 => address) storage reservesList, @@ -202,7 +202,7 @@ library 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, @@ -228,7 +228,7 @@ library GenericLogic { * @param assetPrice The price of the asset for which the total debt of the user is being calculated * @param assetUnit The value representing one full unit of the asset (10^decimals) * @return The total debt of the user normalized to the base currency - **/ + */ function _getUserDebtInBaseCurrency( address user, DataTypes.ReserveData storage reserve, @@ -261,7 +261,7 @@ library GenericLogic { * @param assetPrice The price of the asset for which the total aToken balance of the user is being calculated * @param assetUnit The value representing one full unit of the asset (10^decimals) * @return The total aToken balance of the user normalized to the base currency of the price oracle - **/ + */ function _getUserBalanceInBaseCurrency( address user, DataTypes.ReserveData storage reserve, diff --git a/contracts/protocol/libraries/logic/LiquidationLogic.sol b/contracts/protocol/libraries/logic/LiquidationLogic.sol index aea7040b0..48ad62885 100644 --- a/contracts/protocol/libraries/logic/LiquidationLogic.sol +++ b/contracts/protocol/libraries/logic/LiquidationLogic.sol @@ -23,7 +23,7 @@ import {IPriceOracleGetter} from '../../../interfaces/IPriceOracleGetter.sol'; * @title LiquidationLogic library * @author Aave * @notice Implements actions involving management of collateral in the protocol, the main one being the liquidations - **/ + */ library LiquidationLogic { using WadRayMath for uint256; using PercentageMath for uint256; @@ -92,7 +92,7 @@ library LiquidationLogic { * @param usersConfig The users configuration mapping that track the supplied/borrowed assets * @param eModeCategories The configuration of all the efficiency mode categories * @param params The additional parameters needed to execute the liquidation function - **/ + */ function executeLiquidationCall( mapping(address => DataTypes.ReserveData) storage reservesData, mapping(uint256 => address) storage reservesList, @@ -478,7 +478,7 @@ library LiquidationLogic { * @return The maximum amount that is possible to liquidate given all the liquidation constraints (user balance, close factor) * @return The amount to repay with the liquidation * @return The fee taken from the liquidation bonus amount to be paid to the protocol - **/ + */ function _calculateAvailableCollateralToLiquidate( DataTypes.ReserveData storage collateralReserve, DataTypes.ReserveCache memory debtReserveCache, diff --git a/contracts/protocol/libraries/logic/PoolLogic.sol b/contracts/protocol/libraries/logic/PoolLogic.sol index 954066fd3..5757200cf 100644 --- a/contracts/protocol/libraries/logic/PoolLogic.sol +++ b/contracts/protocol/libraries/logic/PoolLogic.sol @@ -34,7 +34,7 @@ library PoolLogic { * @param reservesList The addresses of all the active reserves * @param params Additional parameters needed for initiation * @return true if appended, false if inserted at existing empty spot - **/ + */ function executeInitReserve( mapping(address => DataTypes.ReserveData) storage reservesData, mapping(uint256 => address) storage reservesList, @@ -84,7 +84,7 @@ library PoolLogic { * @notice Mints the assets accrued through the reserve factor to the treasury in the form of aTokens * @param reservesData The state of all the reserves * @param assets The list of reserves for which the minting needs to be executed - **/ + */ function executeMintToTreasury( mapping(address => DataTypes.ReserveData) storage reservesData, address[] calldata assets @@ -132,7 +132,7 @@ library PoolLogic { * @param reservesData The state of all the reserves * @param reservesList The addresses of all the active reserves * @param asset The address of the underlying asset of the reserve - **/ + */ function executeDropReserve( mapping(address => DataTypes.ReserveData) storage reservesData, mapping(uint256 => address) storage reservesList, @@ -156,7 +156,7 @@ library PoolLogic { * @return currentLiquidationThreshold The liquidation threshold of the user * @return ltv The loan to value of The user * @return healthFactor The current health factor of the user - **/ + */ function executeGetUserAccountData( mapping(address => DataTypes.ReserveData) storage reservesData, mapping(uint256 => address) storage reservesList, diff --git a/contracts/protocol/libraries/logic/ReserveLogic.sol b/contracts/protocol/libraries/logic/ReserveLogic.sol index c73655f18..127fcaf87 100644 --- a/contracts/protocol/libraries/logic/ReserveLogic.sol +++ b/contracts/protocol/libraries/logic/ReserveLogic.sol @@ -43,7 +43,7 @@ library ReserveLogic { * @dev A value of 2*1e27 means for each unit of asset one unit of income has been accrued * @param reserve The reserve object * @return The normalized income, expressed in ray - **/ + */ function getNormalizedIncome(DataTypes.ReserveData storage reserve) internal view @@ -69,7 +69,7 @@ library ReserveLogic { * @dev A value of 2*1e27 means that for each unit of debt, one unit worth of interest has been accumulated * @param reserve The reserve object * @return The normalized variable debt, expressed in ray - **/ + */ function getNormalizedDebt(DataTypes.ReserveData storage reserve) internal view @@ -93,7 +93,7 @@ library ReserveLogic { * @notice Updates the liquidity cumulative index and the variable borrow index. * @param reserve The reserve object * @param reserveCache The caching layer for the reserve data - **/ + */ function updateState( DataTypes.ReserveData storage reserve, DataTypes.ReserveCache memory reserveCache @@ -118,7 +118,7 @@ library ReserveLogic { * @param totalLiquidity The total liquidity available in the reserve * @param amount The amount to accumulate * @return The next liquidity index of the reserve - **/ + */ function cumulateToLiquidityIndex( DataTypes.ReserveData storage reserve, uint256 totalLiquidity, @@ -140,7 +140,7 @@ library ReserveLogic { * @param stableDebtTokenAddress The address of the overlying stable debt token contract * @param variableDebtTokenAddress The address of the overlying variable debt token contract * @param interestRateStrategyAddress The address of the interest rate strategy contract - **/ + */ function init( DataTypes.ReserveData storage reserve, address aTokenAddress, @@ -172,7 +172,7 @@ library ReserveLogic { * @param reserveAddress The address of the reserve to be updated * @param liquidityAdded The amount of liquidity added to the protocol (supply or repay) in the previous action * @param liquidityTaken The amount of liquidity taken from the protocol (redeem or borrow) - **/ + */ function updateInterestRates( DataTypes.ReserveData storage reserve, DataTypes.ReserveCache memory reserveCache, @@ -234,7 +234,7 @@ library ReserveLogic { * specific asset. * @param reserve The reserve to be updated * @param reserveCache The caching layer for the reserve data - **/ + */ function _accrueToTreasury( DataTypes.ReserveData storage reserve, DataTypes.ReserveCache memory reserveCache @@ -287,7 +287,7 @@ library ReserveLogic { * @notice Updates the reserve indexes and the timestamp of the update. * @param reserve The reserve reserve to be updated * @param reserveCache The cache layer holding the cached protocol data - **/ + */ function _updateIndexes( DataTypes.ReserveData storage reserve, DataTypes.ReserveCache memory reserveCache diff --git a/contracts/protocol/libraries/logic/ValidationLogic.sol b/contracts/protocol/libraries/logic/ValidationLogic.sol index 60ba04394..f0e9409df 100644 --- a/contracts/protocol/libraries/logic/ValidationLogic.sol +++ b/contracts/protocol/libraries/logic/ValidationLogic.sol @@ -261,7 +261,7 @@ library ValidationLogic { * 2. Users cannot borrow from the reserve if their collateral is (mostly) the same currency * they are borrowing, to prevent abuses. * 3. Users will be able to borrow only a portion of the total available liquidity - **/ + */ if (params.interestRateMode == DataTypes.InterestRateMode.STABLE) { //check if the borrow mode is stable and if stable rate borrowing is enabled on this reserve @@ -368,7 +368,7 @@ library ValidationLogic { * 2. user is not trying to abuse the reserve by supplying * more collateral than he is borrowing, artificially lowering * the interest rate, borrowing at variable, and switching to stable - **/ + */ require(stableRateEnabled, Errors.STABLE_BORROWING_NOT_ENABLED); require( @@ -621,7 +621,7 @@ library ValidationLogic { * @param reservesList The addresses of all the active reserves * @param reserve The reserve object * @param asset The address of the reserve's underlying asset - **/ + */ function validateDropReserve( mapping(uint256 => address) storage reservesList, DataTypes.ReserveData storage reserve, @@ -648,7 +648,7 @@ library ValidationLogic { * @param userConfig the user configuration * @param reservesCount The total number of valid reserves * @param categoryId The id of the category - **/ + */ function validateSetUserEMode( mapping(address => DataTypes.ReserveData) storage reservesData, mapping(uint256 => address) storage reservesList, @@ -696,7 +696,7 @@ library ValidationLogic { * @param userConfig the user configuration * @param reserveConfig The reserve configuration * @return True if the asset can be activated as collateral, false otherwise - **/ + */ function validateUseAsCollateral( mapping(address => DataTypes.ReserveData) storage reservesData, mapping(uint256 => address) storage reservesList, diff --git a/contracts/protocol/libraries/math/MathUtils.sol b/contracts/protocol/libraries/math/MathUtils.sol index 825061d77..d666d2f73 100644 --- a/contracts/protocol/libraries/math/MathUtils.sol +++ b/contracts/protocol/libraries/math/MathUtils.sol @@ -19,7 +19,7 @@ library MathUtils { * @param rate The interest rate, in ray * @param lastUpdateTimestamp The timestamp of the last update of the interest * @return The interest rate linearly accumulated during the timeDelta, in ray - **/ + */ function calculateLinearInterest(uint256 rate, uint40 lastUpdateTimestamp) internal view @@ -47,7 +47,7 @@ library MathUtils { * @param rate The interest rate, in ray * @param lastUpdateTimestamp The timestamp of the last update of the interest * @return The interest rate compounded during the timeDelta, in ray - **/ + */ function calculateCompoundedInterest( uint256 rate, uint40 lastUpdateTimestamp, @@ -90,7 +90,7 @@ library MathUtils { * @param rate The interest rate (in ray) * @param lastUpdateTimestamp The timestamp from which the interest accumulation needs to be calculated * @return The interest rate compounded between lastUpdateTimestamp and current block timestamp, in ray - **/ + */ function calculateCompoundedInterest(uint256 rate, uint40 lastUpdateTimestamp) internal view diff --git a/contracts/protocol/libraries/math/PercentageMath.sol b/contracts/protocol/libraries/math/PercentageMath.sol index 597521342..c000be3a6 100644 --- a/contracts/protocol/libraries/math/PercentageMath.sol +++ b/contracts/protocol/libraries/math/PercentageMath.sol @@ -7,7 +7,7 @@ pragma solidity ^0.8.0; * @notice Provides functions to perform percentage calculations * @dev Percentages are defined by default with 2 decimals of precision (100.00). The precision is indicated by PERCENTAGE_FACTOR * @dev Operations are rounded. If a value is >=.5, will be rounded up, otherwise rounded down. - **/ + */ library PercentageMath { // Maximum percentage factor (100.00%) uint256 internal constant PERCENTAGE_FACTOR = 1e4; @@ -21,7 +21,7 @@ library PercentageMath { * @param value The value of which the percentage needs to be calculated * @param percentage The percentage of the value to be calculated * @return result value percentmul percentage - **/ + */ function percentMul(uint256 value, uint256 percentage) internal pure returns (uint256 result) { // to avoid overflow, value <= (type(uint256).max - HALF_PERCENTAGE_FACTOR) / percentage assembly { @@ -44,7 +44,7 @@ library PercentageMath { * @param value The value of which the percentage needs to be calculated * @param percentage The percentage of the value to be calculated * @return result value percentdiv percentage - **/ + */ function percentDiv(uint256 value, uint256 percentage) internal pure returns (uint256 result) { // to avoid overflow, value <= (type(uint256).max - halfPercentage) / PERCENTAGE_FACTOR assembly { diff --git a/contracts/protocol/libraries/math/WadRayMath.sol b/contracts/protocol/libraries/math/WadRayMath.sol index dbc8f21f1..f61fe87f2 100644 --- a/contracts/protocol/libraries/math/WadRayMath.sol +++ b/contracts/protocol/libraries/math/WadRayMath.sol @@ -8,7 +8,7 @@ pragma solidity ^0.8.0; * @dev Provides mul and div function for wads (decimal numbers with 18 digits of precision) and rays (decimal numbers * with 27 digits of precision) * @dev Operations are rounded. If a value is >=.5, will be rounded up, otherwise rounded down. - **/ + */ library WadRayMath { // HALF_WAD and HALF_RAY expressed with extended notation as constant with operations are not supported in Yul assembly uint256 internal constant WAD = 1e18; @@ -25,7 +25,7 @@ library WadRayMath { * @param a Wad * @param b Wad * @return c = a*b, in wad - **/ + */ function wadMul(uint256 a, uint256 b) internal pure returns (uint256 c) { // to avoid overflow, a <= (type(uint256).max - HALF_WAD) / b assembly { @@ -43,7 +43,7 @@ library WadRayMath { * @param a Wad * @param b Wad * @return c = a/b, in wad - **/ + */ function wadDiv(uint256 a, uint256 b) internal pure returns (uint256 c) { // to avoid overflow, a <= (type(uint256).max - halfB) / WAD assembly { @@ -61,7 +61,7 @@ library WadRayMath { * @param a Ray * @param b Ray * @return c = a raymul b - **/ + */ function rayMul(uint256 a, uint256 b) internal pure returns (uint256 c) { // to avoid overflow, a <= (type(uint256).max - HALF_RAY) / b assembly { @@ -79,7 +79,7 @@ library WadRayMath { * @param a Ray * @param b Ray * @return c = a raydiv b - **/ + */ function rayDiv(uint256 a, uint256 b) internal pure returns (uint256 c) { // to avoid overflow, a <= (type(uint256).max - halfB) / RAY assembly { @@ -96,7 +96,7 @@ library WadRayMath { * @dev assembly optimized for improved gas savings, see https://twitter.com/transmissions11/status/1451131036377571328 * @param a Ray * @return b = a converted to wad, rounded half up to the nearest wad - **/ + */ function rayToWad(uint256 a) internal pure returns (uint256 b) { assembly { b := div(a, WAD_RAY_RATIO) @@ -112,7 +112,7 @@ library WadRayMath { * @dev assembly optimized for improved gas savings, see https://twitter.com/transmissions11/status/1451131036377571328 * @param a Wad * @return b = a converted in ray - **/ + */ function wadToRay(uint256 a) internal pure returns (uint256 b) { // to avoid overflow, b/WAD_RAY_RATIO == a assembly { diff --git a/contracts/protocol/pool/DefaultReserveInterestRateStrategy.sol b/contracts/protocol/pool/DefaultReserveInterestRateStrategy.sol index 9ad96e862..e8430f6e9 100644 --- a/contracts/protocol/pool/DefaultReserveInterestRateStrategy.sol +++ b/contracts/protocol/pool/DefaultReserveInterestRateStrategy.sol @@ -18,7 +18,7 @@ import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.so * point of usage and another from that one to 100%. * - An instance of this same contract, can't be used across different Aave markets, due to the caching * of the PoolAddressesProvider - **/ + */ contract DefaultReserveInterestRateStrategy is IDefaultInterestRateStrategy { using WadRayMath for uint256; using PercentageMath for uint256; @@ -239,7 +239,7 @@ contract DefaultReserveInterestRateStrategy is IDefaultInterestRateStrategy { * @param currentVariableBorrowRate The current variable borrow rate of the reserve * @param currentAverageStableBorrowRate The current weighted average of all the stable rate loans * @return The weighted averaged borrow rate - **/ + */ function _getOverallBorrowRate( uint256 totalStableDebt, uint256 totalVariableDebt, diff --git a/contracts/protocol/pool/Pool.sol b/contracts/protocol/pool/Pool.sol index 8c3fcacda..1e5e93d87 100644 --- a/contracts/protocol/pool/Pool.sol +++ b/contracts/protocol/pool/Pool.sol @@ -35,7 +35,7 @@ import {PoolStorage} from './PoolStorage.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 Pool is VersionedInitializable, PoolStorage, IPool { using ReserveLogic for DataTypes.ReserveData; @@ -44,7 +44,7 @@ contract Pool is VersionedInitializable, PoolStorage, IPool { /** * @dev Only pool configurator can call functions marked by this modifier. - **/ + */ modifier onlyPoolConfigurator() { _onlyPoolConfigurator(); _; @@ -52,7 +52,7 @@ contract Pool is VersionedInitializable, PoolStorage, IPool { /** * @dev Only pool admin can call functions marked by this modifier. - **/ + */ modifier onlyPoolAdmin() { _onlyPoolAdmin(); _; @@ -60,7 +60,7 @@ contract Pool is VersionedInitializable, PoolStorage, IPool { /** * @dev Only bridge can call functions marked by this modifier. - **/ + */ modifier onlyBridge() { _onlyBridge(); _; @@ -105,7 +105,7 @@ contract Pool is VersionedInitializable, PoolStorage, IPool { * 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 virtual initializer { require(provider == ADDRESSES_PROVIDER, Errors.INVALID_ADDRESSES_PROVIDER); _maxStableRateBorrowSizePercent = 0.25e4; diff --git a/contracts/protocol/pool/PoolConfigurator.sol b/contracts/protocol/pool/PoolConfigurator.sol index a76d85fbf..4d98e106d 100644 --- a/contracts/protocol/pool/PoolConfigurator.sol +++ b/contracts/protocol/pool/PoolConfigurator.sol @@ -18,7 +18,7 @@ import {IPoolDataProvider} from '../../interfaces/IPoolDataProvider.sol'; * @title PoolConfigurator * @author Aave * @dev Implements the configuration methods for the Aave protocol - **/ + */ contract PoolConfigurator is VersionedInitializable, IPoolConfigurator { using PercentageMath for uint256; using ReserveConfiguration for DataTypes.ReserveConfigurationMap; @@ -28,7 +28,7 @@ contract PoolConfigurator is VersionedInitializable, IPoolConfigurator { /** * @dev Only pool admin can call functions marked by this modifier. - **/ + */ modifier onlyPoolAdmin() { _onlyPoolAdmin(); _; @@ -36,7 +36,7 @@ contract PoolConfigurator is VersionedInitializable, IPoolConfigurator { /** * @dev Only emergency admin can call functions marked by this modifier. - **/ + */ modifier onlyEmergencyAdmin() { _onlyEmergencyAdmin(); _; @@ -44,7 +44,7 @@ contract PoolConfigurator is VersionedInitializable, IPoolConfigurator { /** * @dev Only emergency or pool admin can call functions marked by this modifier. - **/ + */ modifier onlyEmergencyOrPoolAdmin() { _onlyPoolOrEmergencyAdmin(); _; @@ -52,7 +52,7 @@ contract PoolConfigurator is VersionedInitializable, IPoolConfigurator { /** * @dev Only asset listing or pool admin can call functions marked by this modifier. - **/ + */ modifier onlyAssetListingOrPoolAdmins() { _onlyAssetListingOrPoolAdmins(); _; @@ -60,7 +60,7 @@ contract PoolConfigurator is VersionedInitializable, IPoolConfigurator { /** * @dev Only risk or pool admin can call functions marked by this modifier. - **/ + */ modifier onlyRiskOrPoolAdmins() { _onlyRiskOrPoolAdmins(); _; diff --git a/contracts/protocol/tokenization/AToken.sol b/contracts/protocol/tokenization/AToken.sol index d011e19c2..7bb079455 100644 --- a/contracts/protocol/tokenization/AToken.sol +++ b/contracts/protocol/tokenization/AToken.sol @@ -204,7 +204,7 @@ contract AToken is VersionedInitializable, ScaledBalanceTokenBase, EIP712Base, I * @param to The destination address * @param amount The amount getting transferred * @param validate True if the transfer needs to be validated, false otherwise - **/ + */ function _transfer( address from, address to, @@ -232,7 +232,7 @@ contract AToken is VersionedInitializable, ScaledBalanceTokenBase, EIP712Base, I * @param from The source address * @param to The destination address * @param amount The amount getting transferred - **/ + */ function _transfer( address from, address to, diff --git a/contracts/protocol/tokenization/DelegationAwareAToken.sol b/contracts/protocol/tokenization/DelegationAwareAToken.sol index 51a5f201a..6f48482f6 100644 --- a/contracts/protocol/tokenization/DelegationAwareAToken.sol +++ b/contracts/protocol/tokenization/DelegationAwareAToken.sol @@ -29,7 +29,7 @@ contract DelegationAwareAToken is AToken { /** * @notice Delegates voting power of the underlying asset to a `delegatee` address * @param delegatee The address that will receive the delegation - **/ + */ function delegateUnderlyingTo(address delegatee) external onlyPoolAdmin { IDelegationToken(_underlyingAsset).delegate(delegatee); emit DelegateUnderlyingTo(delegatee); diff --git a/contracts/protocol/tokenization/StableDebtToken.sol b/contracts/protocol/tokenization/StableDebtToken.sol index c37358ba8..ae207b7b6 100644 --- a/contracts/protocol/tokenization/StableDebtToken.sol +++ b/contracts/protocol/tokenization/StableDebtToken.sol @@ -21,7 +21,7 @@ import {SafeCast} from '../../dependencies/openzeppelin/contracts/SafeCast.sol'; * @notice Implements a stable debt token to track the borrowing positions of users * at stable rate mode * @dev Transfer and approve functionalities are disabled since its a non-transferable token - **/ + */ contract StableDebtToken is DebtTokenBase, IncentivizedERC20, IStableDebtToken { using WadRayMath for uint256; using SafeCast for uint256; @@ -264,7 +264,7 @@ contract StableDebtToken is DebtTokenBase, IncentivizedERC20, IStableDebtToken { * @return The previous principal balance * @return The new principal balance * @return The balance increase - **/ + */ function _calculateBalanceIncrease(address user) internal view @@ -335,7 +335,7 @@ contract StableDebtToken is DebtTokenBase, IncentivizedERC20, IStableDebtToken { * @notice Calculates the total supply * @param avgRate The average rate at which the total supply increases * @return The debt balance of the user since the last burn/mint action - **/ + */ function _calcTotalSupply(uint256 avgRate) internal view returns (uint256) { uint256 principalSupply = super.totalSupply(); @@ -356,7 +356,7 @@ contract StableDebtToken is DebtTokenBase, IncentivizedERC20, IStableDebtToken { * @param account The account receiving the debt tokens * @param amount The amount being minted * @param oldTotalSupply The total supply before the minting event - **/ + */ function _mint( address account, uint256 amount, @@ -376,7 +376,7 @@ contract StableDebtToken is DebtTokenBase, IncentivizedERC20, IStableDebtToken { * @param account The user getting his debt burned * @param amount The amount being burned * @param oldTotalSupply The total supply before the burning event - **/ + */ function _burn( address account, uint256 amount, @@ -399,7 +399,7 @@ contract StableDebtToken is DebtTokenBase, IncentivizedERC20, IStableDebtToken { /** * @dev Being non transferrable, the debt token does not implement any of the * standard ERC20 functions for transfer and allowance. - **/ + */ function transfer(address, uint256) external virtual override returns (bool) { revert(Errors.OPERATION_NOT_SUPPORTED); } diff --git a/contracts/protocol/tokenization/VariableDebtToken.sol b/contracts/protocol/tokenization/VariableDebtToken.sol index 6b73f4b5e..295843592 100644 --- a/contracts/protocol/tokenization/VariableDebtToken.sol +++ b/contracts/protocol/tokenization/VariableDebtToken.sol @@ -20,7 +20,7 @@ import {ScaledBalanceTokenBase} from './base/ScaledBalanceTokenBase.sol'; * @notice Implements a variable debt token to track the borrowing positions of users * at variable rate mode * @dev Transfer and approve functionalities are disabled since its a non-transferable token - **/ + */ contract VariableDebtToken is DebtTokenBase, ScaledBalanceTokenBase, IVariableDebtToken { using WadRayMath for uint256; using SafeCast for uint256; @@ -121,7 +121,7 @@ contract VariableDebtToken is DebtTokenBase, ScaledBalanceTokenBase, IVariableDe /** * @dev Being non transferrable, the debt token does not implement any of the * standard ERC20 functions for transfer and allowance. - **/ + */ function transfer(address, uint256) external virtual override returns (bool) { revert(Errors.OPERATION_NOT_SUPPORTED); } diff --git a/contracts/protocol/tokenization/base/DebtTokenBase.sol b/contracts/protocol/tokenization/base/DebtTokenBase.sol index 3e5ac909d..d548491cc 100644 --- a/contracts/protocol/tokenization/base/DebtTokenBase.sol +++ b/contracts/protocol/tokenization/base/DebtTokenBase.sol @@ -82,7 +82,7 @@ abstract contract DebtTokenBase is * @param delegator The address delegating the borrowing power * @param delegatee The address receiving the delegated borrowing power * @param amount The allowance amount being delegated. - **/ + */ function _approveDelegation( address delegator, address delegatee, @@ -97,7 +97,7 @@ abstract contract DebtTokenBase is * @param delegator The address delegating the borrowing power * @param delegatee The address receiving the delegated borrowing power * @param amount The amount to subtract from the current allowance - **/ + */ function _decreaseBorrowAllowance( address delegator, address delegatee, diff --git a/contracts/protocol/tokenization/base/IncentivizedERC20.sol b/contracts/protocol/tokenization/base/IncentivizedERC20.sol index 1c684eaf6..79f9d2724 100644 --- a/contracts/protocol/tokenization/base/IncentivizedERC20.sol +++ b/contracts/protocol/tokenization/base/IncentivizedERC20.sol @@ -16,14 +16,14 @@ import {IACLManager} from '../../../interfaces/IACLManager.sol'; * @title IncentivizedERC20 * @author Aave, inspired by the Openzeppelin ERC20 implementation * @notice Basic ERC20 implementation - **/ + */ abstract contract IncentivizedERC20 is Context, IERC20Detailed { using WadRayMath for uint256; using SafeCast for uint256; /** * @dev Only pool admin can call functions marked by this modifier. - **/ + */ modifier onlyPoolAdmin() { IACLManager aclManager = IACLManager(_addressesProvider.getACLManager()); require(aclManager.isPoolAdmin(msg.sender), Errors.CALLER_NOT_POOL_ADMIN); @@ -32,7 +32,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { /** * @dev Only pool can call functions marked by this modifier. - **/ + */ modifier onlyPool() { require(_msgSender() == address(POOL), Errors.CALLER_MUST_BE_POOL); _; @@ -110,7 +110,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { /** * @notice Returns the address of the Incentives Controller contract * @return The address of the Incentives Controller - **/ + */ function getIncentivesController() external view virtual returns (IAaveIncentivesController) { return _incentivesController; } @@ -118,7 +118,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { /** * @notice Sets a new Incentives Controller * @param controller the new Incentives controller - **/ + */ function setIncentivesController(IAaveIncentivesController controller) external onlyPoolAdmin { _incentivesController = controller; } @@ -164,7 +164,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { * @param spender The user allowed to spend on behalf of _msgSender() * @param addedValue The amount being added to the allowance * @return `true` - **/ + */ function increaseAllowance(address spender, uint256 addedValue) external virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; @@ -175,7 +175,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { * @param spender The user allowed to spend on behalf of _msgSender() * @param subtractedValue The amount being subtracted to the allowance * @return `true` - **/ + */ function decreaseAllowance(address spender, uint256 subtractedValue) external virtual diff --git a/contracts/protocol/tokenization/base/MintableIncentivizedERC20.sol b/contracts/protocol/tokenization/base/MintableIncentivizedERC20.sol index 51eba347e..caaad61d8 100644 --- a/contracts/protocol/tokenization/base/MintableIncentivizedERC20.sol +++ b/contracts/protocol/tokenization/base/MintableIncentivizedERC20.sol @@ -9,7 +9,7 @@ import {IncentivizedERC20} from './IncentivizedERC20.sol'; * @title MintableIncentivizedERC20 * @author Aave * @notice Implements mint and burn functions for IncentivizedERC20 - **/ + */ abstract contract MintableIncentivizedERC20 is IncentivizedERC20 { /** * @dev Constructor. diff --git a/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol b/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol index 033728e43..d659b5897 100644 --- a/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol +++ b/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol @@ -12,7 +12,7 @@ import {MintableIncentivizedERC20} from './MintableIncentivizedERC20.sol'; * @title ScaledBalanceTokenBase * @author Aave * @notice Basic ERC20 implementation of scaled balance token - **/ + */ abstract contract ScaledBalanceTokenBase is MintableIncentivizedERC20, IScaledBalanceToken { using WadRayMath for uint256; using SafeCast for uint256; @@ -65,7 +65,7 @@ abstract contract ScaledBalanceTokenBase is MintableIncentivizedERC20, IScaledBa * @param amount The amount of tokens getting minted * @param index The next liquidity index of the reserve * @return `true` if the the previous balance of the user was 0 - **/ + */ function _mintScaled( address caller, address onBehalfOf, @@ -98,7 +98,7 @@ abstract contract ScaledBalanceTokenBase is MintableIncentivizedERC20, IScaledBa * @param target The address that will receive the underlying, if any * @param amount The amount getting burned * @param index The variable debt index of the reserve - **/ + */ function _burnScaled( address user, address target, @@ -134,7 +134,7 @@ abstract contract ScaledBalanceTokenBase is MintableIncentivizedERC20, IScaledBa * @param recipient The destination address * @param amount The amount getting transferred * @param index The next liquidity index of the reserve - **/ + */ function _transfer( address sender, address recipient,