Verified contractPartialMIT
AaveV3Ethereum_RepositioningAaveV3CoreAroundEstablishedLiquidCollateral_20261119
Address0x34832d35c9a67a06f8112d76e8b421fe39a0c4a1
- Balance
0 ETH
- Transactions
0
- Compiler
solc 0.8.28
- Same code
Only this contract
Details
- Compiler
- solc 0.8.28+commit.7893614a
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- shanghai
- License
- MIT
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,477,885
- Creation transaction
- 0x655b2ec6fa…c2aeed55f5
28 files
- src/20261119_AaveV3Ethereum_RepositioningAaveV3CoreAroundEstablishedLiquidCollateral/AaveV3Ethereum_RepositioningAaveV3CoreAroundEstablishedLiquidCollateral_20261119.solmain5.77 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol2.78 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/Address.sol6.03 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/Errors.sol896 B
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/chainlink/AggregatorInterface.sol1.21 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/extensions/v3-config-engine/AaveV3Payload.sol6.79 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/extensions/v3-config-engine/EngineFlags.sol1.5 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol11.39 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IACLManager.sol5.46 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IAToken.sol5.69 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IAaveOracle.sol2.39 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IDefaultInterestRateStrategyV2.sol6.1 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IInitializableAToken.sol1.7 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPool.sol36.35 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPoolAddressesProvider.sol8.21 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPoolConfigurator.sol19.6 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPoolDataProvider.sol9.71 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPriceOracleGetter.sol848 B
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IReserveInterestRateStrategy.sol1.12 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IScaledBalanceToken.sol2.74 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/helpers/Errors.sol7.36 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/math/WadRayMath.sol5.4 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/types/ConfiguratorInputTypes.sol649 B
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/types/DataTypes.sol9.72 KB
- lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/treasury/ICollector.sol6.61 KB
- lib/aave-helpers/lib/aave-address-book/src/AaveV3.sol2.06 KB
- lib/aave-helpers/lib/aave-address-book/src/AaveV3Ethereum.sol82.21 KB
- lib/aave-helpers/src/v3-config-engine/AaveV3PayloadEthereum.sol586 B
src/20261119_AaveV3Ethereum_RepositioningAaveV3CoreAroundEstablishedLiquidCollateral/AaveV3Ethereum_RepositioningAaveV3CoreAroundEstablishedLiquidCollateral_20261119.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {AaveV3Ethereum, AaveV3EthereumAssets, AaveV3EthereumEModes} from 'aave-address-book/AaveV3Ethereum.sol';
import {AaveV3PayloadEthereum} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadEthereum.sol';
import {EngineFlags} from 'aave-v3-origin/contracts/extensions/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol';
/**
* @title Repositioning Aave V3 Core Around Established & Liquid Collateral
* @author LlamaRisk
* - Snapshot: https://snapshot.org/#/s:aavedao.eth/proposal/0x7ed3e17373060128618599b425fd0b4312bea86fcd903a1aa99c2622403f7f98
* - Discussion: https://governance.aave.com/t/arfc-repositioning-aave-v3-core-around-established-liquid-collateral/26191
*/
contract AaveV3Ethereum_RepositioningAaveV3CoreAroundEstablishedLiquidCollateral_20261119 is
AaveV3PayloadEthereum
{
function _postExecute() internal override {
AaveV3Ethereum.POOL_CONFIGURATOR.setReserveFreeze(AaveV3EthereumAssets.osETH_UNDERLYING, true);
AaveV3Ethereum.POOL_CONFIGURATOR.setReserveFreeze(AaveV3EthereumAssets.LBTC_UNDERLYING, true);
AaveV3Ethereum.POOL_CONFIGURATOR.setReserveFreeze(AaveV3EthereumAssets.rETH_UNDERLYING, true);
AaveV3Ethereum.POOL_CONFIGURATOR.setReserveFreeze(AaveV3EthereumAssets.eBTC_UNDERLYING, true);
AaveV3Ethereum.POOL_CONFIGURATOR.setReserveFreeze(AaveV3EthereumAssets.BTCb_UNDERLYING, true);
AaveV3Ethereum.POOL_CONFIGURATOR.setReserveFreeze(AaveV3EthereumAssets.tETH_UNDERLYING, true);
AaveV3Ethereum.POOL_CONFIGURATOR.setReserveFreeze(
AaveV3EthereumAssets.PT_srUSDe_22OCT2026_UNDERLYING,
true
);
AaveV3Ethereum.POOL_CONFIGURATOR.setReserveFreeze(AaveV3EthereumAssets.LDO_UNDERLYING, true);
AaveV3Ethereum.POOL_CONFIGURATOR.setReserveFreeze(AaveV3EthereumAssets.mUSD_UNDERLYING, true);
}
function eModeCategoriesUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.EModeCategoryUpdate[] memory)
{
IAaveV3ConfigEngine.EModeCategoryUpdate[]
memory eModeUpdates = new IAaveV3ConfigEngine.EModeCategoryUpdate[](1);
eModeUpdates[0] = IAaveV3ConfigEngine.EModeCategoryUpdate({
eModeCategory: AaveV3EthereumEModes.rsETH__WETH_wstETH_ETHx,
ltv: EngineFlags.KEEP_CURRENT,
liqThreshold: EngineFlags.KEEP_CURRENT,
liqBonus: EngineFlags.KEEP_CURRENT,
label: 'rsETH_wstETH_weETH_cbETH__WETH_ETHx',
isolated: EngineFlags.KEEP_CURRENT
});
return eModeUpdates;
}
function assetsEModeUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.AssetEModeUpdate[] memory)
{
IAaveV3ConfigEngine.AssetEModeUpdate[]
memory assetEModeUpdates = new IAaveV3ConfigEngine.AssetEModeUpdate[](3);
assetEModeUpdates[0] = IAaveV3ConfigEngine.AssetEModeUpdate({
asset: AaveV3EthereumAssets.wstETH_UNDERLYING,
eModeCategory: AaveV3EthereumEModes.rsETH__WETH_wstETH_ETHx,
borrowable: EngineFlags.DISABLED,
collateral: EngineFlags.ENABLED,
ltvzero: EngineFlags.KEEP_CURRENT
});
assetEModeUpdates[1] = IAaveV3ConfigEngine.AssetEModeUpdate({
asset: AaveV3EthereumAssets.weETH_UNDERLYING,
eModeCategory: AaveV3EthereumEModes.rsETH__WETH_wstETH_ETHx,
borrowable: EngineFlags.KEEP_CURRENT,
collateral: EngineFlags.ENABLED,
ltvzero: EngineFlags.KEEP_CURRENT
});
assetEModeUpdates[2] = IAaveV3ConfigEngine.AssetEModeUpdate({
asset: AaveV3EthereumAssets.cbETH_UNDERLYING,
eModeCategory: AaveV3EthereumEModes.rsETH__WETH_wstETH_ETHx,
borrowable: EngineFlags.KEEP_CURRENT,
collateral: EngineFlags.ENABLED,
ltvzero: EngineFlags.KEEP_CURRENT
});
return assetEModeUpdates;
}
function borrowsUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.BorrowUpdate[] memory)
{
IAaveV3ConfigEngine.BorrowUpdate[]
memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](7);
borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3EthereumAssets.CRV_UNDERLYING,
enabledToBorrow: EngineFlags.KEEP_CURRENT,
flashloanable: EngineFlags.KEEP_CURRENT,
reserveFactor: 100_00
});
borrowUpdates[1] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3EthereumAssets.tBTC_UNDERLYING,
enabledToBorrow: EngineFlags.KEEP_CURRENT,
flashloanable: EngineFlags.KEEP_CURRENT,
reserveFactor: 100_00
});
borrowUpdates[2] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3EthereumAssets.rETH_UNDERLYING,
enabledToBorrow: EngineFlags.KEEP_CURRENT,
flashloanable: EngineFlags.KEEP_CURRENT,
reserveFactor: 100_00
});
borrowUpdates[3] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3EthereumAssets.crvUSD_UNDERLYING,
enabledToBorrow: EngineFlags.KEEP_CURRENT,
flashloanable: EngineFlags.KEEP_CURRENT,
reserveFactor: 100_00
});
borrowUpdates[4] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3EthereumAssets.FBTC_UNDERLYING,
enabledToBorrow: EngineFlags.KEEP_CURRENT,
flashloanable: EngineFlags.KEEP_CURRENT,
reserveFactor: 100_00
});
borrowUpdates[5] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3EthereumAssets.UNI_UNDERLYING,
enabledToBorrow: EngineFlags.KEEP_CURRENT,
flashloanable: EngineFlags.KEEP_CURRENT,
reserveFactor: 100_00
});
borrowUpdates[6] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3EthereumAssets.mUSD_UNDERLYING,
enabledToBorrow: EngineFlags.KEEP_CURRENT,
flashloanable: EngineFlags.KEEP_CURRENT,
reserveFactor: 100_00
});
return borrowUpdates;
}
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol)
pragma solidity ^0.8.20;
import {Errors} from "./Errors.sol";
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert Errors.InsufficientBalance(address(this).balance, amount);
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert Errors.FailedCall();
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {Errors.FailedCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert Errors.InsufficientBalance(address(this).balance, value);
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
* of an unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {Errors.FailedCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly ("memory-safe") {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert Errors.FailedCall();
}
}
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/Errors.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of common custom errors used in multiple contracts
*
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
* It is recommended to avoid relying on the error API for critical functionality.
*
* _Available since v5.1._
*/
library Errors {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error InsufficientBalance(uint256 balance, uint256 needed);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedCall();
/**
* @dev The deployment failed.
*/
error FailedDeployment();
/**
* @dev A necessary precompile is missing.
*/
error MissingPrecompile(address);
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/chainlink/AggregatorInterface.sol
// SPDX-License-Identifier: MIT
// Chainlink Contracts v0.8
pragma solidity ^0.8.0;
interface AggregatorInterface {
function decimals() external view returns (uint8);
function description() external view returns (string memory);
function getRoundData(
uint80 _roundId
)
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
function latestAnswer() external view returns (int256);
function latestTimestamp() external view returns (uint256);
function latestRound() external view returns (uint256);
function getAnswer(uint256 roundId) external view returns (int256);
function getTimestamp(uint256 roundId) external view returns (uint256);
function aggregator() external view returns (address);
event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt);
event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/extensions/v3-config-engine/AaveV3Payload.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import {Address} from 'openzeppelin-contracts/contracts/utils/Address.sol';
import {WadRayMath} from '../../protocol/libraries/math/WadRayMath.sol';
import {IAaveV3ConfigEngine as IEngine} from './IAaveV3ConfigEngine.sol';
import {EngineFlags} from './EngineFlags.sol';
/**
* @dev Base smart contract for an Aave v3.0.1 configs update.
* - !!!IMPORTANT!!! This payload inheriting AaveV3Payload MUST BE STATELESS always
* - Assumes this contract has the right permissions
* - Connected to a IAaveV3ConfigEngine engine contact, which abstract the complexities of
* interaction with the Aave protocol.
* - At the moment covering:
* - Listings of new assets on the pool.
* - Listings of new assets on the pool with custom token impl.
* - Updates of caps (supply cap, borrow cap).
* - Updates of price feeds
* - Updates of interest rate strategies
* - Updates of borrow parameters (flashloanable, reserveFactor)
* - Updates of collateral parameters (ltv, liq threshold, liq bonus, liq protocol fee)
* - Updates of emode category parameters (ltv, liq threshold, liq bonus, price source, label)
* - Updates of emode category of assets (e-mode id)
* @author BGD Labs
*/
abstract contract AaveV3Payload {
using Address for address;
IEngine public immutable CONFIG_ENGINE;
constructor(IEngine engine) {
CONFIG_ENGINE = engine;
}
/// @dev to be overriden on the child if any extra logic is needed pre-listing
function _preExecute() internal virtual {}
/// @dev to be overriden on the child if any extra logic is needed post-listing
function _postExecute() internal virtual {}
function execute() external {
_preExecute();
IEngine.Listing[] memory listings = newListings();
IEngine.ListingWithCustomImpl[] memory listingsCustom = newListingsCustom();
IEngine.EModeCategoryUpdate[] memory eModeCategories = eModeCategoriesUpdates();
IEngine.AssetEModeUpdate[] memory assetsEModes = assetsEModeUpdates();
IEngine.EModeCategoryCreation[] memory newEmodes = eModeCategoryCreations();
IEngine.CollateralUpdate[] memory collaterals = collateralsUpdates();
IEngine.BorrowUpdate[] memory borrows = borrowsUpdates();
IEngine.RateStrategyUpdate[] memory rates = rateStrategiesUpdates();
IEngine.PriceFeedUpdate[] memory priceFeeds = priceFeedsUpdates();
IEngine.CapsUpdate[] memory caps = capsUpdates();
if (listings.length != 0) {
address(CONFIG_ENGINE).functionDelegateCall(
abi.encodeWithSelector(CONFIG_ENGINE.listAssets.selector, getPoolContext(), listings)
);
}
if (listingsCustom.length != 0) {
address(CONFIG_ENGINE).functionDelegateCall(
abi.encodeWithSelector(
CONFIG_ENGINE.listAssetsCustom.selector,
getPoolContext(),
listingsCustom
)
);
}
if (eModeCategories.length != 0) {
address(CONFIG_ENGINE).functionDelegateCall(
abi.encodeWithSelector(CONFIG_ENGINE.updateEModeCategories.selector, eModeCategories)
);
}
if (assetsEModes.length != 0) {
address(CONFIG_ENGINE).functionDelegateCall(
abi.encodeWithSelector(CONFIG_ENGINE.updateAssetsEMode.selector, assetsEModes)
);
}
if (newEmodes.length != 0) {
address(CONFIG_ENGINE).functionDelegateCall(
abi.encodeWithSelector(CONFIG_ENGINE.createEModeCategories.selector, newEmodes)
);
}
if (borrows.length != 0) {
address(CONFIG_ENGINE).functionDelegateCall(
abi.encodeWithSelector(CONFIG_ENGINE.updateBorrowSide.selector, borrows)
);
}
if (collaterals.length != 0) {
address(CONFIG_ENGINE).functionDelegateCall(
abi.encodeWithSelector(CONFIG_ENGINE.updateCollateralSide.selector, collaterals)
);
}
if (rates.length != 0) {
address(CONFIG_ENGINE).functionDelegateCall(
abi.encodeWithSelector(CONFIG_ENGINE.updateRateStrategies.selector, rates)
);
}
if (priceFeeds.length != 0) {
address(CONFIG_ENGINE).functionDelegateCall(
abi.encodeWithSelector(CONFIG_ENGINE.updatePriceFeeds.selector, priceFeeds)
);
}
if (caps.length != 0) {
address(CONFIG_ENGINE).functionDelegateCall(
abi.encodeWithSelector(CONFIG_ENGINE.updateCaps.selector, caps)
);
}
_postExecute();
}
/** @dev Converts basis points to RAY units
* e.g. 10_00 (10.00%) will return 100000000000000000000000000
*/
function _bpsToRay(uint256 amount) internal pure returns (uint256) {
return (amount * WadRayMath.RAY) / 10_000;
}
/// @dev to be defined in the child with a list of new assets to list
function newListings() public view virtual returns (IEngine.Listing[] memory) {}
/// @dev to be defined in the child with a list of new assets to list (with custom a/v/s tokens implementations)
function newListingsCustom()
public
view
virtual
returns (IEngine.ListingWithCustomImpl[] memory)
{}
/// @dev to be defined in the child with a list of caps to update
function capsUpdates() public view virtual returns (IEngine.CapsUpdate[] memory) {}
/// @dev to be defined in the child with a list of collaterals' params to update
function collateralsUpdates() public view virtual returns (IEngine.CollateralUpdate[] memory) {}
/// @dev to be defined in the child with a list of borrows' params to update
function borrowsUpdates() public view virtual returns (IEngine.BorrowUpdate[] memory) {}
/// @dev to be defined in the child with a list of priceFeeds to update
function priceFeedsUpdates() public view virtual returns (IEngine.PriceFeedUpdate[] memory) {}
/// @dev to be defined in the child with a list of eMode categories to create
function eModeCategoryCreations()
public
view
virtual
returns (IEngine.EModeCategoryCreation[] memory)
{}
/// @dev to be defined in the child with a list of eMode categories to update
function eModeCategoriesUpdates()
public
view
virtual
returns (IEngine.EModeCategoryUpdate[] memory)
{}
/// @dev to be defined in the child with a list of assets for which eMode collateral to update
function assetsEModeUpdates() public view virtual returns (IEngine.AssetEModeUpdate[] memory) {}
/// @dev to be defined in the child with a list of set of parameters of rate strategies
function rateStrategiesUpdates()
public
view
virtual
returns (IEngine.RateStrategyUpdate[] memory)
{}
/// @dev the lack of support for immutable strings kinds of forces for this
/// Besides that, it can actually be useful being able to change the naming, but remote
function getPoolContext() public view virtual returns (IEngine.PoolContext memory);
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/extensions/v3-config-engine/EngineFlags.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.18;
library EngineFlags {
/// @dev magic value to be used as flag to keep unchanged any current configuration
/// Strongly assumes that the value `type(uint256).max - 42` will never be used, which seems reasonable
uint256 internal constant KEEP_CURRENT = type(uint256).max - 42;
/// @dev magic value to be used as flag to keep unchanged any current configuration
/// Strongly assumes that the value `KEEP_CURRENT_STRING` will never be used, which seems reasonable
string internal constant KEEP_CURRENT_STRING = 'KEEP_CURRENT_STRING';
/// @dev magic value to be used as flag to keep unchanged any current configuration
/// Strongly assumes that the value `0x0000000000000000000000000000000000000050` will never be used, which seems reasonable
address internal constant KEEP_CURRENT_ADDRESS =
address(0x0000000000000000000000000000000000000050);
/// @dev value to be used as flag for bool value true
uint256 internal constant ENABLED = 1;
/// @dev value to be used as flag for bool value false
uint256 internal constant DISABLED = 0;
/// @dev converts flag ENABLED DISABLED to bool
function toBool(uint256 flag) internal pure returns (bool) {
require(flag == 0 || flag == 1, 'INVALID_CONVERSION_TO_BOOL');
return flag == 1;
}
/// @dev converts bool to ENABLED DISABLED flags
function fromBool(bool isTrue) internal pure returns (uint256) {
return isTrue ? ENABLED : DISABLED;
}
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {IPool} from '../../interfaces/IPool.sol';
import {IPoolConfigurator} from '../../interfaces/IPoolConfigurator.sol';
import {IAaveOracle} from '../../interfaces/IAaveOracle.sol';
import {IDefaultInterestRateStrategyV2} from '../../interfaces/IDefaultInterestRateStrategyV2.sol';
/// @dev Examples here assume the usage of the `AaveV3Payload` base contracts
/// contained in this same repository
interface IAaveV3ConfigEngine {
struct Basic {
string assetSymbol;
TokenImplementations implementations;
}
struct EngineConstants {
IPool pool;
IPoolConfigurator poolConfigurator;
IAaveOracle oracle;
address rewardsController;
address collector;
address defaultInterestRateStrategy;
}
struct InterestRateInputData {
uint256 optimalUsageRatio;
uint256 baseVariableBorrowRate;
uint256 variableRateSlope1;
uint256 variableRateSlope2;
}
/**
* @dev Required for naming of a/v/s tokens
* Example (mock):
* PoolContext({
* networkName: 'Polygon',
* networkAbbreviation: 'Pol'
* })
*/
struct PoolContext {
string networkName;
string networkAbbreviation;
}
/**
* @dev Example (mock):
* Listing({
* asset: 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9,
* assetSymbol: 'AAVE',
* priceFeed: 0x547a514d5e3769680Ce22B2361c10Ea13619e8a9,
* rateStrategyParams: InterestRateInputData({
* optimalUsageRatio: 80_00,
* baseVariableBorrowRate: 25, // 0.25%
* variableRateSlope1: 3_00,
* variableRateSlope2: 75_00
* }),
* enabledToBorrow: EngineFlags.ENABLED,
* flashloanable: EngineFlags.ENABLED,
* ltv: 70_50, // 70.5%
* liqThreshold: 76_00, // 76%
* liqBonus: 5_00, // 5%
* reserveFactor: 10_00, // 10%
* supplyCap: 100_000, // 100k AAVE
* borrowCap: 60_000, // 60k AAVE
* liqProtocolFee: 10_00, // 10%
* }
*/
struct Listing {
address asset;
string assetSymbol;
address priceFeed;
InterestRateInputData rateStrategyParams; // Mandatory, no matter if enabled for borrowing or not
uint256 enabledToBorrow;
uint256 flashloanable; // Independent from enabled to borrow: an asset can be flashloanble and not enabled to borrow
uint256 ltv; // Only considered if liqThreshold > 0
uint256 liqThreshold; // If `0`, the asset will not be enabled as collateral
uint256 liqBonus; // Only considered if liqThreshold > 0
uint256 reserveFactor; // Only considered if enabledToBorrow == EngineFlags.ENABLED (true)
uint256 supplyCap; // If passing any value distinct to EngineFlags.KEEP_CURRENT, always configured
uint256 borrowCap; // If passing any value distinct to EngineFlags.KEEP_CURRENT, always configured
uint256 liqProtocolFee; // Only considered if liqThreshold > 0
}
struct RepackedListings {
address[] ids;
Basic[] basics;
BorrowUpdate[] borrowsUpdates;
CollateralUpdate[] collateralsUpdates;
PriceFeedUpdate[] priceFeedsUpdates;
CapsUpdate[] capsUpdates;
IDefaultInterestRateStrategyV2.InterestRateData[] rates;
}
struct TokenImplementations {
address aToken;
address vToken;
}
struct ListingWithCustomImpl {
Listing base;
TokenImplementations implementations;
}
/**
* @dev Example (mock):
* CapsUpdate({
* asset: AaveV3EthereumAssets.AAVE_UNDERLYING,
* supplyCap: 1_000_000,
* borrowCap: EngineFlags.KEEP_CURRENT
* }
*/
struct CapsUpdate {
address asset;
uint256 supplyCap; // Pass any value, of EngineFlags.KEEP_CURRENT to keep it as it is
uint256 borrowCap; // Pass any value, of EngineFlags.KEEP_CURRENT to keep it as it is
}
/**
* @dev Example (mock):
* PriceFeedUpdate({
* asset: AaveV3EthereumAssets.AAVE_UNDERLYING,
* priceFeed: 0x547a514d5e3769680Ce22B2361c10Ea13619e8a9
* })
*/
struct PriceFeedUpdate {
address asset;
address priceFeed;
}
/**
* @dev Example (mock):
* CollateralUpdate({
* asset: AaveV3EthereumAssets.AAVE_UNDERLYING,
* ltv: 60_00,
* liqThreshold: 70_00,
* liqBonus: EngineFlags.KEEP_CURRENT,
* liqProtocolFee: 7_00
* })
*/
struct CollateralUpdate {
address asset;
uint256 ltv;
uint256 liqThreshold;
uint256 liqBonus;
uint256 liqProtocolFee;
}
/**
* @dev Example (mock):
* BorrowUpdate({
* asset: AaveV3EthereumAssets.AAVE_UNDERLYING,
* enabledToBorrow: EngineFlags.ENABLED,
* flashloanable: EngineFlags.KEEP_CURRENT,
* reserveFactor: 15_00, // 15%
* })
*/
struct BorrowUpdate {
address asset;
uint256 enabledToBorrow;
uint256 flashloanable;
uint256 reserveFactor;
}
/**
* @dev Example (mock):
* AssetEModeUpdate({
* asset: AaveV3EthereumAssets.rETH_UNDERLYING,
* eModeCategory: 1, // ETH correlated
* borrowable: EngineFlags.ENABLED,
* collateral: EngineFlags.KEEP_CURRENT,
* ltvzero: EngineFlags.KEEP_CURRENT
* })
*/
struct AssetEModeUpdate {
address asset;
uint8 eModeCategory;
uint256 borrowable;
uint256 collateral;
uint256 ltvzero;
}
/**
* @dev Example (mock):
* EModeCategoryUpdate({
* eModeCategory: 1, // ETH correlated
* ltv: 60_00,
* liqThreshold: 70_00,
* liqBonus: EngineFlags.KEEP_CURRENT,
* label: EngineFlags.KEEP_CURRENT_STRING,
* isolated: EngineFlags.ENABLED
* })
*/
struct EModeCategoryUpdate {
uint8 eModeCategory;
uint256 ltv;
uint256 liqThreshold;
uint256 liqBonus;
string label;
uint256 isolated;
}
/**
* @dev Example (mock):
* EModeCategoryUpdate({
* ltv: 60_00,
* liqThreshold: 70_00,
* liqBonus: 3_00,
* label: 'WETH USDC',
* borrowables:[USDC],
* collaterals:[ETH]
* })
*/
struct EModeCategoryCreation {
uint256 ltv;
uint256 liqThreshold;
uint256 liqBonus;
string label;
address[] borrowables;
address[] collaterals;
bool isolated;
}
/**
* @dev Example (mock):
* RateStrategyUpdate({
* asset: AaveV3OptimismAssets.USDT_UNDERLYING,
* params: InterestRateInputData({
* optimalUsageRatio: _bpsToRay(80_00),
* baseVariableBorrowRate: EngineFlags.KEEP_CURRENT,
* variableRateSlope1: EngineFlags.KEEP_CURRENT,
* variableRateSlope2: _bpsToRay(75_00)
* })
* })
*/
struct RateStrategyUpdate {
address asset;
InterestRateInputData params;
}
/**
* @notice Performs full listing of the assets, in the Aave pool configured in this engine instance
* @param context `PoolContext` struct, effectively meta-data for naming of a/v/s tokens.
* More information on the documentation of the struct.
* @param listings `Listing[]` list of declarative configs for every aspect of the asset listings.
* More information on the documentation of the struct.
*/
function listAssets(PoolContext memory context, Listing[] memory listings) external;
/**
* @notice Performs full listings of assets, in the Aave pool configured in this engine instance
* @dev This function allows more customization, especifically enables to set custom implementations
* for a/v/s tokens.
* IMPORTANT. Use it only if understanding the internals of the Aave v3 protocol
* @param context `PoolContext` struct, effectively meta-data for naming of a/v/s tokens.
* More information on the documentation of the struct.
* @param listings `ListingWithCustomImpl[]` list of declarative configs for every aspect of the asset listings.
*/
function listAssetsCustom(
PoolContext memory context,
ListingWithCustomImpl[] memory listings
) external;
/**
* @notice Performs an update of the caps (supply, borrow) of the assets, in the Aave pool configured in this engine instance
* @param updates `CapsUpdate[]` list of declarative updates containing the new caps
* More information on the documentation of the struct.
*/
function updateCaps(CapsUpdate[] memory updates) external;
/**
* @notice Performs an update on the rate strategy params of the assets, in the Aave pool configured in this engine instance
* @dev The engine itself manages if a new rate strategy needs to be deployed or if an existing one can be re-used
* @param updates `RateStrategyUpdate[]` list of declarative updates containing the new rate strategy params
* More information on the documentation of the struct.
*/
function updateRateStrategies(RateStrategyUpdate[] memory updates) external;
/**
* @notice Performs an update of the collateral-related params of the assets, in the Aave pool configured in this engine instance
* @param updates `CollateralUpdate[]` list of declarative updates containing the new parameters
* More information on the documentation of the struct.
*/
function updateCollateralSide(CollateralUpdate[] memory updates) external;
/**
* @notice Performs an update of the price feed of the assets, in the Aave pool configured in this engine instance
* @param updates `PriceFeedUpdate[]` list of declarative updates containing the new parameters
* More information on the documentation of the struct.
*/
function updatePriceFeeds(PriceFeedUpdate[] memory updates) external;
/**
* @notice Performs an update of the borrow-related params of the assets, in the Aave pool configured in this engine instance
* @param updates `BorrowUpdate[]` list of declarative updates containing the new parameters
* More information on the documentation of the struct.
*/
function updateBorrowSide(BorrowUpdate[] memory updates) external;
/**
* @notice Performs creation of new e-mode categories, in the Aave pool configured in this engine instance
* @param creations `EModeCategoryCreation[]` list of declarative creations containing the new parameters
* More information on the documentation of the struct.
*/
function createEModeCategories(EModeCategoryCreation[] memory creations) external;
/**
* @notice Performs an update of the e-mode categories, in the Aave pool configured in this engine instance
* @param updates `EModeCategoryUpdate[]` list of declarative updates containing the new parameters
* More information on the documentation of the struct.
*/
function updateEModeCategories(EModeCategoryUpdate[] memory updates) external;
/**
* @notice Performs an update of the e-mode category.
* Sets a specified asset collateral and/or borrowable, in the Aave pool configured in this engine instance
* @param updates `EModeCollateralUpdate[]` list of declarative updates containing the new parameters
* More information on the documentation of the struct.
*/
function updateAssetsEMode(AssetEModeUpdate[] calldata updates) external;
function DEFAULT_INTEREST_RATE_STRATEGY() external view returns (address);
function POOL() external view returns (IPool);
function POOL_CONFIGURATOR() external view returns (IPoolConfigurator);
function ORACLE() external view returns (IAaveOracle);
function ATOKEN_IMPL() external view returns (address);
function VTOKEN_IMPL() external view returns (address);
function REWARDS_CONTROLLER() external view returns (address);
function COLLECTOR() external view returns (address);
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IACLManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
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
* @return The address of the PoolAddressesProvider
*/
function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);
/**
* @notice Returns the identifier of the PoolAdmin role
* @return The id of the PoolAdmin role
*/
function POOL_ADMIN_ROLE() external view returns (bytes32);
/**
* @notice Returns the identifier of the EmergencyAdmin role
* @return The id of the EmergencyAdmin role
*/
function EMERGENCY_ADMIN_ROLE() external view returns (bytes32);
/**
* @notice Returns the identifier of the RiskAdmin role
* @return The id of the RiskAdmin role
*/
function RISK_ADMIN_ROLE() external view returns (bytes32);
/**
* @notice Returns the identifier of the FlashBorrower role
* @return The id of the FlashBorrower role
*/
function FLASH_BORROWER_ROLE() external view returns (bytes32);
/**
* @notice Returns the identifier of the Bridge role
* @return The id of the Bridge role
*/
function BRIDGE_ROLE() external view returns (bytes32);
/**
* @notice Returns the identifier of the AssetListingAdmin role
* @return The id of the AssetListingAdmin role
*/
function ASSET_LISTING_ADMIN_ROLE() external view returns (bytes32);
/**
* @notice Set the role as admin of a specific role.
* @dev By default the admin role for all roles is `DEFAULT_ADMIN_ROLE`.
* @param role The role to be managed by the admin role
* @param adminRole The admin role
*/
function setRoleAdmin(bytes32 role, bytes32 adminRole) external;
/**
* @notice Adds a new admin as PoolAdmin
* @param admin The address of the new admin
*/
function addPoolAdmin(address admin) external;
/**
* @notice Removes an admin as PoolAdmin
* @param admin The address of the admin to remove
*/
function removePoolAdmin(address admin) external;
/**
* @notice Returns true if the address is PoolAdmin, false otherwise
* @param admin The address to check
* @return True if the given address is PoolAdmin, false otherwise
*/
function isPoolAdmin(address admin) external view returns (bool);
/**
* @notice Adds a new admin as EmergencyAdmin
* @param admin The address of the new admin
*/
function addEmergencyAdmin(address admin) external;
/**
* @notice Removes an admin as EmergencyAdmin
* @param admin The address of the admin to remove
*/
function removeEmergencyAdmin(address admin) external;
/**
* @notice Returns true if the address is EmergencyAdmin, false otherwise
* @param admin The address to check
* @return True if the given address is EmergencyAdmin, false otherwise
*/
function isEmergencyAdmin(address admin) external view returns (bool);
/**
* @notice Adds a new admin as RiskAdmin
* @param admin The address of the new admin
*/
function addRiskAdmin(address admin) external;
/**
* @notice Removes an admin as RiskAdmin
* @param admin The address of the admin to remove
*/
function removeRiskAdmin(address admin) external;
/**
* @notice Returns true if the address is RiskAdmin, false otherwise
* @param admin The address to check
* @return True if the given address is RiskAdmin, false otherwise
*/
function isRiskAdmin(address admin) external view returns (bool);
/**
* @notice Adds a new address as FlashBorrower
* @param borrower The address of the new FlashBorrower
*/
function addFlashBorrower(address borrower) external;
/**
* @notice Removes an address as FlashBorrower
* @param borrower The address of the FlashBorrower to remove
*/
function removeFlashBorrower(address borrower) external;
/**
* @notice Returns true if the address is FlashBorrower, false otherwise
* @param borrower The address to check
* @return True if the given address is FlashBorrower, false otherwise
*/
function isFlashBorrower(address borrower) external view returns (bool);
/**
* @notice Adds a new address as Bridge
* @param bridge The address of the new Bridge
*/
function addBridge(address bridge) external;
/**
* @notice Removes an address as Bridge
* @param bridge The address of the bridge to remove
*/
function removeBridge(address bridge) external;
/**
* @notice Returns true if the address is Bridge, false otherwise
* @param bridge The address to check
* @return True if the given address is Bridge, false otherwise
*/
function isBridge(address bridge) external view returns (bool);
/**
* @notice Adds a new admin as AssetListingAdmin
* @param admin The address of the new admin
*/
function addAssetListingAdmin(address admin) external;
/**
* @notice Removes an admin as AssetListingAdmin
* @param admin The address of the admin to remove
*/
function removeAssetListingAdmin(address admin) external;
/**
* @notice Returns true if the address is AssetListingAdmin, false otherwise
* @param admin The address to check
* @return True if the given address is AssetListingAdmin, false otherwise
*/
function isAssetListingAdmin(address admin) external view returns (bool);
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IAToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IERC20} from 'openzeppelin-contracts/contracts/token/ERC20/IERC20.sol';
import {IScaledBalanceToken} from './IScaledBalanceToken.sol';
import {IInitializableAToken} from './IInitializableAToken.sol';
/**
* @title IAToken
* @author Aave
* @notice Defines the basic interface for an AToken.
*/
interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken {
/**
* @dev Emitted during the transfer action
* @param from The user whose tokens are being transferred
* @param to The recipient
* @param value The 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);
/**
* @notice Mints `amount` aTokens to `user`
* @param caller The address performing the mint
* @param onBehalfOf The address of the user that will receive the minted aTokens
* @param scaledAmount The scaled 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 mint(
address caller,
address onBehalfOf,
uint256 scaledAmount,
uint256 index
) external returns (bool);
/**
* @notice Burns aTokens from `user` and sends the equivalent amount of underlying to `receiverOfUnderlying`.
* @dev Passing both the unscaled and scaled amounts enhances precision. The `scaledAmount` is used for precise balance updates,
* while the `amount` is used for the underlying asset transfer, preventing cumulative rounding errors.
* @dev In some instances, a mint event may be emitted from a burn transaction if the amount to burn is less than the interest that the user accrued.
* @param from The address from which the aTokens will be burned
* @param receiverOfUnderlying The address that will receive the underlying
* @param amount The amount of underlying to be burned (non scaled)
* @param scaledAmount The scaled amount of aTokens to be burned (scaled)
* @param index The next liquidity index of the reserve
* @return `true` if the the new balance of the user is 0
*/
function burn(
address from,
address receiverOfUnderlying,
uint256 amount,
uint256 scaledAmount,
uint256 index
) external returns (bool);
/**
* @notice Mints aTokens to the reserve treasury
* @param scaledAmount The scaled amount of tokens getting minted
* @param index The next liquidity index of the reserve
*/
function mintToTreasury(uint256 scaledAmount, uint256 index) external;
/**
* @notice Transfers aTokens in the event of a borrow being liquidated, in case the liquidator reclaims the aToken.
* @dev Passing both the unscaled and scaled amounts enhances precision. The `scaledAmount` is used for precise balance updates,
* while the `amount` is used for logging and consistency, preventing cumulative rounding errors.
* @param from The address getting liquidated, current owner of the aTokens
* @param to The recipient
* @param amount The amount of tokens getting transferred (non-scaled)
* @param scaledAmount The scaled amount of tokens getting transferred (scaled)
* @param index The next liquidity index of the reserve
*/
function transferOnLiquidation(
address from,
address to,
uint256 amount,
uint256 scaledAmount,
uint256 index
) external;
/**
* @notice Transfers the underlying asset to `target`.
* @dev Used by the Pool to transfer assets in borrow(), withdraw() and flashLoan()
* @param target The recipient of the underlying
* @param amount The amount getting transferred
*/
function transferUnderlyingTo(address target, uint256 amount) external;
/**
* @notice Allow passing a signed message to approve spending
* @dev implements the permit function as for
* https://github.com/ethereum/EIPs/blob/8a34d644aacf0f9f8f00815307fd7dd5da07655f/EIPS/eip-2612.md
* @param owner The owner of the funds
* @param spender The spender
* @param value The amount
* @param deadline The deadline timestamp, type(uint256).max for max deadline
* @param v Signature param
* @param s Signature param
* @param r Signature param
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @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);
/**
* @notice Get the domain separator for the token
* @dev Return cached value if chainId matches cache, otherwise recomputes separator
* @return The domain separator of the token at current chain
*/
function DOMAIN_SEPARATOR() external view returns (bytes32);
/**
* @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);
/**
* @notice Rescue and transfer tokens locked in this contract
* @param token The address of the token
* @param to The address of the recipient
* @param amount The amount of token to transfer
*/
function rescueTokens(address token, address to, uint256 amount) external;
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IAaveOracle.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IPriceOracleGetter} from './IPriceOracleGetter.sol';
import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';
/**
* @title IAaveOracle
* @author Aave
* @notice Defines the basic interface for the Aave Oracle
*/
interface IAaveOracle is IPriceOracleGetter {
/**
* @dev Emitted after the base currency is set
* @param baseCurrency The base currency of used for price quotes
* @param baseCurrencyUnit The unit of the base currency
*/
event BaseCurrencySet(address indexed baseCurrency, uint256 baseCurrencyUnit);
/**
* @dev Emitted after the price source of an asset is updated
* @param asset The address of the asset
* @param source The price source of the asset
*/
event AssetSourceUpdated(address indexed asset, address indexed source);
/**
* @dev Emitted after the address of fallback oracle is updated
* @param fallbackOracle The address of the fallback oracle
*/
event FallbackOracleUpdated(address indexed fallbackOracle);
/**
* @notice Returns the PoolAddressesProvider
* @return The address of the PoolAddressesProvider contract
*/
function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);
/**
* @notice Sets or replaces price sources of assets
* @param assets The addresses of the assets
* @param sources The addresses of the price sources
*/
function setAssetSources(address[] calldata assets, address[] calldata sources) external;
/**
* @notice Sets the fallback oracle
* @param fallbackOracle The address of the fallback oracle
*/
function setFallbackOracle(address fallbackOracle) external;
/**
* @notice Returns a list of prices from a list of assets addresses
* @param assets The list of assets addresses
* @return The prices of the given assets
*/
function getAssetsPrices(address[] calldata assets) external view returns (uint256[] memory);
/**
* @notice Returns the address of the source for an asset address
* @param asset The address of the asset
* @return The address of the source
*/
function getSourceOfAsset(address asset) external view returns (address);
/**
* @notice Returns the address of the fallback oracle
* @return The address of the fallback oracle
*/
function getFallbackOracle() external view returns (address);
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IDefaultInterestRateStrategyV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IReserveInterestRateStrategy} from './IReserveInterestRateStrategy.sol';
import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';
/**
* @title IDefaultInterestRateStrategyV2
* @author BGD Labs
* @notice Interface of the default interest rate strategy used by the Aave protocol
*/
interface IDefaultInterestRateStrategyV2 is IReserveInterestRateStrategy {
/**
* @notice Holds the interest rate data for a given reserve
*
* @dev Since values are in bps, they are multiplied by 1e23 in order to become rays with 27 decimals. This
* in turn means that the maximum supported interest rate is 4294967295 (2**32-1) bps or 42949672.95%.
*
* @param optimalUsageRatio The optimal usage ratio, in bps
* @param baseVariableBorrowRate The base variable borrow rate, in bps
* @param variableRateSlope1 The slope of the variable interest curve, before hitting the optimal ratio, in bps
* @param variableRateSlope2 The slope of the variable interest curve, after hitting the optimal ratio, in bps
*/
struct InterestRateData {
uint16 optimalUsageRatio;
uint32 baseVariableBorrowRate;
uint32 variableRateSlope1;
uint32 variableRateSlope2;
}
/**
* @notice The interest rate data, where all values are in ray (fixed-point 27 decimal numbers) for a given reserve,
* used in in-memory calculations.
*
* @param optimalUsageRatio The optimal usage ratio
* @param baseVariableBorrowRate The base variable borrow rate
* @param variableRateSlope1 The slope of the variable interest curve, before hitting the optimal ratio
* @param variableRateSlope2 The slope of the variable interest curve, after hitting the optimal ratio
*/
struct InterestRateDataRay {
uint256 optimalUsageRatio;
uint256 baseVariableBorrowRate;
uint256 variableRateSlope1;
uint256 variableRateSlope2;
}
/**
* @notice emitted when new interest rate data is set in a reserve
*
* @param reserve address of the reserve that has new interest rate data set
* @param optimalUsageRatio The optimal usage ratio, in bps
* @param baseVariableBorrowRate The base variable borrow rate, in bps
* @param variableRateSlope1 The slope of the variable interest curve, before hitting the optimal ratio, in bps
* @param variableRateSlope2 The slope of the variable interest curve, after hitting the optimal ratio, in bps
*/
event RateDataUpdate(
address indexed reserve,
uint256 optimalUsageRatio,
uint256 baseVariableBorrowRate,
uint256 variableRateSlope1,
uint256 variableRateSlope2
);
/**
* @notice Returns the address of the PoolAddressesProvider
* @return The address of the PoolAddressesProvider contract
*/
function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);
/**
* @notice Returns the maximum value achievable for variable borrow rate, in bps
* @return The maximum rate
*/
function MAX_BORROW_RATE() external view returns (uint256);
/**
* @notice Returns the minimum optimal point, in bps
* @return The optimal point
*/
function MIN_OPTIMAL_POINT() external view returns (uint256);
/**
* @notice Returns the maximum optimal point, in bps
* @return The optimal point
*/
function MAX_OPTIMAL_POINT() external view returns (uint256);
/**
* @notice Returns the full InterestRateData object for the given reserve, in ray
*
* @param reserve The reserve to get the data of
*
* @return The InterestRateDataRay object for the given reserve
*/
function getInterestRateData(address reserve) external view returns (InterestRateDataRay memory);
/**
* @notice Returns the full InterestRateData object for the given reserve, in bps
*
* @param reserve The reserve to get the data of
*
* @return The InterestRateData object for the given reserve
*/
function getInterestRateDataBps(address reserve) external view returns (InterestRateData memory);
/**
* @notice Returns the optimal usage rate for the given reserve in ray
*
* @param reserve The reserve to get the optimal usage rate of
*
* @return The optimal usage rate is the level of borrow / collateral at which the borrow rate
*/
function getOptimalUsageRatio(address reserve) external view returns (uint256);
/**
* @notice Returns the variable rate slope below optimal usage ratio in ray
* @dev It's the variable rate when usage ratio > 0 and <= OPTIMAL_USAGE_RATIO
*
* @param reserve The reserve to get the variable rate slope 1 of
*
* @return The variable rate slope
*/
function getVariableRateSlope1(address reserve) external view returns (uint256);
/**
* @notice Returns the variable rate slope above optimal usage ratio in ray
* @dev It's the variable rate when usage ratio > OPTIMAL_USAGE_RATIO
*
* @param reserve The reserve to get the variable rate slope 2 of
*
* @return The variable rate slope
*/
function getVariableRateSlope2(address reserve) external view returns (uint256);
/**
* @notice Returns the base variable borrow rate, in ray
*
* @param reserve The reserve to get the base variable borrow rate of
*
* @return The base variable borrow rate
*/
function getBaseVariableBorrowRate(address reserve) external view returns (uint256);
/**
* @notice Returns the maximum variable borrow rate, in ray
*
* @param reserve The reserve to get the maximum variable borrow rate of
*
* @return The maximum variable borrow rate
*/
function getMaxVariableBorrowRate(address reserve) external view returns (uint256);
/**
* @notice Sets interest rate data for an Aave rate strategy
* @param reserve The reserve to update
* @param rateData The reserve interest rate data to apply to the given reserve
* Being specific to this custom implementation, with custom struct type,
* overloading the function on the generic interface
*/
function setInterestRateParams(address reserve, InterestRateData calldata rateData) external;
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IInitializableAToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
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
* @param underlyingAsset The address of the underlying asset
* @param pool The address of the associated pool
* @param treasury The address of the treasury
* @param incentivesController The address of the incentives controller for this aToken
* @param aTokenDecimals The decimals of the underlying
* @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,
address treasury,
address incentivesController,
uint8 aTokenDecimals,
string aTokenName,
string aTokenSymbol,
bytes params
);
/**
* @notice Initializes the aToken
* @param pool The pool contract that is initializing this contract
* @param underlyingAsset The address of the underlying asset of this aToken (E.g. WETH for aWETH)
* @param aTokenDecimals The decimals of the aToken, same as the underlying asset's
* @param aTokenName The name of the aToken
* @param aTokenSymbol The symbol of the aToken
* @param params A set of encoded parameters for additional initialization
*/
function initialize(
IPool pool,
address underlyingAsset,
uint8 aTokenDecimals,
string calldata aTokenName,
string calldata aTokenSymbol,
bytes calldata params
) external;
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';
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 supply()
* @param reserve The address of the underlying asset of the reserve
* @param user The address initiating the supply
* @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,
address indexed onBehalfOf,
uint256 amount,
uint16 indexed referralCode
);
/**
* @dev Emitted on withdraw()
* @param reserve The address of the underlying asset being withdrawn
* @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);
/**
* @dev Emitted on borrow() and flashLoan() when debt needs to be opened
* @param reserve The address of the underlying asset being borrowed
* @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just
* initiator of the transaction on flashLoan()
* @param onBehalfOf The address that will be getting the debt
* @param amount The amount borrowed out
* @param interestRateMode The rate mode: 2 for Variable, 1 is deprecated (changed on v3.2.0)
* @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,
address indexed onBehalfOf,
uint256 amount,
DataTypes.InterestRateMode interestRateMode,
uint256 borrowRate,
uint16 indexed referralCode
);
/**
* @dev Emitted on repay()
* @param reserve The address of the underlying asset of the reserve
* @param user The beneficiary of the repayment, getting his debt reduced
* @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,
address indexed repayer,
uint256 amount,
bool useATokens
);
/**
* @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 flashLoan()
* @param target The address of the flash loan receiver contract
* @param initiator The address initiating the flash loan
* @param asset The address of the asset being flash borrowed
* @param amount The amount flash borrowed
* @param interestRateMode The flashloan mode: 0 for regular flashloan,
* 1 for Stable (Deprecated on v3.2.0), 2 for Variable
* @param premium The fee flash borrowed
* @param referralCode The referral code used
*/
event FlashLoan(
address indexed target,
address initiator,
address indexed asset,
uint256 amount,
DataTypes.InterestRateMode interestRateMode,
uint256 premium,
uint16 indexed referralCode
);
/**
* @dev Emitted when a borrower is liquidated.
* @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation
* @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation
* @param user The address of the borrower getting liquidated
* @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover
* @param liquidatedCollateralAmount The amount of collateral received by the liquidator
* @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,
address indexed user,
uint256 debtToCover,
uint256 liquidatedCollateralAmount,
address liquidator,
bool receiveAToken
);
/**
* @dev Emitted when the state of a reserve is updated.
* @param reserve The address of the underlying asset of the reserve
* @param liquidityRate The next liquidity rate
* @param stableBorrowRate The next stable borrow rate @note deprecated on v3.2.0
* @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,
uint256 stableBorrowRate,
uint256 variableBorrowRate,
uint256 liquidityIndex,
uint256 variableBorrowIndex
);
/**
* @dev Emitted when the deficit of a reserve is covered.
* @param reserve The address of the underlying asset of the reserve
* @param caller The caller that triggered the DeficitCovered event
* @param amountCovered The amount of deficit covered
*/
event DeficitCovered(address indexed reserve, address caller, uint256 amountCovered);
/**
* @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);
/**
* @dev Emitted when deficit is realized on a liquidation.
* @param user The user address where the bad debt will be burned
* @param debtAsset The address of the underlying borrowed asset to be burned
* @param amountCreated The amount of deficit created
*/
event DeficitCreated(address indexed user, address indexed debtAsset, uint256 amountCreated);
/**
* @dev Emitted when a position manager is approved by the user.
* @param user The user address
* @param positionManager The address of the position manager
*/
event PositionManagerApproved(address indexed user, address indexed positionManager);
/**
* @dev Emitted when a position manager is revoked by the user.
* @param user The user address
* @param positionManager The address of the position manager
*/
event PositionManagerRevoked(address indexed user, address indexed positionManager);
/**
* @notice Supplies an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.
* - E.g. User supplies 100 USDC and gets in return 100 aUSDC
* @param asset The address of the underlying asset to supply
* @param amount The amount to be supplied
* @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user
* wants to receive them on his own wallet, or a different address if the beneficiary of aTokens
* 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, address onBehalfOf, uint16 referralCode) external;
/**
* @notice Supply with transfer approval of asset to be supplied done via permit function
* see: https://eips.ethereum.org/EIPS/eip-2612 and https://eips.ethereum.org/EIPS/eip-713
* @param asset The address of the underlying asset to supply
* @param amount The amount to be supplied
* @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user
* wants to receive them on his own wallet, or a different address if the beneficiary of aTokens
* is a different wallet
* @param deadline The deadline timestamp that the permit is valid
* @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
* @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,
address onBehalfOf,
uint16 referralCode,
uint256 deadline,
uint8 permitV,
bytes32 permitR,
bytes32 permitS
) external;
/**
* @notice Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned
* E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC
* @param asset The address of the underlying asset to withdraw
* @param amount The underlying amount to be withdrawn
* - Send the value type(uint256).max in order to withdraw the whole aToken balance
* @param to The address that will receive the underlying, same as msg.sender if the user
* 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, address to) external returns (uint256);
/**
* @notice Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower
* already supplied enough collateral, or he was given enough allowance by a credit delegator on the VariableDebtToken
* - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet
* and 100 variable debt tokens
* @param asset The address of the underlying asset to borrow
* @param amount The amount to be borrowed
* @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0
* @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
* @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,
uint256 interestRateMode,
uint16 referralCode,
address onBehalfOf
) external;
/**
* @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned
* - E.g. User repays 100 USDC, burning 100 variable debt tokens of the `onBehalfOf` address
* @param asset The address of the borrowed underlying asset previously borrowed
* @param amount The amount to repay
* - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`
* @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0
* @param onBehalfOf The address of the user who will get his debt reduced/removed. Should be the address of the
* 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,
uint256 interestRateMode,
address onBehalfOf
) external returns (uint256);
/**
* @notice Repay with transfer approval of asset to be repaid done via permit function
* see: https://eips.ethereum.org/EIPS/eip-2612 and https://eips.ethereum.org/EIPS/eip-713
* @param asset The address of the borrowed underlying asset previously borrowed
* @param amount The amount to repay
* - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`
* @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0
* @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the
* 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
* @param deadline The deadline timestamp that the permit is valid
* @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
* @return The final amount repaid
*/
function repayWithPermit(
address asset,
uint256 amount,
uint256 interestRateMode,
address onBehalfOf,
uint256 deadline,
uint8 permitV,
bytes32 permitR,
bytes32 permitS
) external returns (uint256);
/**
* @notice Repays a borrowed `amount` on a specific reserve using the reserve aTokens, burning the
* equivalent debt tokens
* - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable debt tokens
* @dev Passing uint256.max as amount will clean up any residual aToken dust balance, if the user aToken
* balance is not enough to cover the whole debt
* @param asset The address of the borrowed underlying asset previously borrowed
* @param amount The amount to repay
* - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`
* @param interestRateMode DEPRECATED in v3.2.0
* @return The final amount repaid
*/
function repayWithATokens(
address asset,
uint256 amount,
uint256 interestRateMode
) external returns (uint256);
/**
* @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;
/**
* @notice Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1
* - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives
* a proportionally amount of the `collateralAsset` plus a bonus to cover market risk
* @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation
* @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation
* @param borrower The address of the borrower getting liquidated
* @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,
address borrower,
uint256 debtToCover,
bool receiveAToken
) external;
/**
* @notice Allows smartcontracts to access the liquidity of the pool within one transaction,
* as long as the amount taken plus a fee is returned.
* @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept
* into consideration. For further details please visit https://docs.aave.com/developers/
* @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanReceiver interface
* @param assets The addresses of the assets being flash-borrowed
* @param amounts The amounts of the assets being flash-borrowed
* @param interestRateModes Types of the debt to open if the flash loan is not returned:
* 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver
* 1 -> Deprecated on v3.2.0
* 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address
* @param onBehalfOf The address that will receive the debt in the case of using 2 on `modes`
* @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,
uint256[] calldata amounts,
uint256[] calldata interestRateModes,
address onBehalfOf,
bytes calldata params,
uint16 referralCode
) external;
/**
* @notice Allows smartcontracts to access the liquidity of the pool within one transaction,
* as long as the amount taken plus a fee is returned.
* @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept
* into consideration. For further details please visit https://docs.aave.com/developers/
* @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanSimpleReceiver interface
* @param asset The address of the asset being flash-borrowed
* @param amount The amount of the asset being flash-borrowed
* @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,
uint256 amount,
bytes calldata params,
uint16 referralCode
) external;
/**
* @notice Returns the user account data across all the reserves
* @param user The address of the user
* @return totalCollateralBase The total collateral of the user in the base currency used by the price feed
* @return totalDebtBase The total debt of the user in the base currency used by the price feed
* @return availableBorrowsBase The borrowing power left of the user in the base currency used by the price feed
* @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
returns (
uint256 totalCollateralBase,
uint256 totalDebtBase,
uint256 availableBorrowsBase,
uint256 currentLiquidationThreshold,
uint256 ltv,
uint256 healthFactor
);
/**
* @notice Initializes a reserve, activating it, assigning an aToken and debt tokens
* @dev Only callable by the PoolConfigurator contract
* @param asset The address of the underlying asset of the reserve
* @param aTokenAddress The address of the aToken that will be assigned to the reserve
* @param variableDebtAddress The address of the VariableDebtToken that will be assigned to the reserve
*/
function initReserve(address asset, address aTokenAddress, address variableDebtAddress) external;
/**
* @notice Accumulates interest to all indexes of the reserve
* @dev Only callable by the PoolConfigurator contract
* @dev To be used when required by the configurator, for example when updating interest rates strategy data
* @param asset The address of the underlying asset of the reserve
*/
function syncIndexesState(address asset) external;
/**
* @notice Updates interest rates on the reserve data
* @dev Only callable by the PoolConfigurator contract
* @dev To be used when required by the configurator, for example when updating interest rates strategy data
* @param asset The address of the underlying asset of the reserve
*/
function syncRatesState(address asset) external;
/**
* @notice Sets the configuration bitmap of the reserve as a whole
* @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;
/**
* @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 returns (DataTypes.ReserveConfigurationMap memory);
/**
* @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 returns (DataTypes.UserConfigurationMap memory);
/**
* @notice Returns the normalized income of the reserve
* @param asset The address of the underlying asset of the reserve
* @return The reserve's normalized income
*/
function getReserveNormalizedIncome(address asset) external view returns (uint256);
/**
* @notice Returns the normalized variable debt per unit of asset
* @dev WARNING: This function is intended to be used primarily by the protocol itself to get a
* "dynamic" variable index based on time, current stored index and virtual rate at the current
* moment (approx. a borrower would get if opening a position). This means that is always used in
* combination with variable debt supply/balances.
* If using this function externally, consider that is possible to have an increasing normalized
* variable debt that is not equivalent to how the variable debt index would be updated in storage
* (e.g. only updates with non-zero variable debt supply)
* @param asset The address of the underlying asset of the reserve
* @return The reserve normalized variable debt
*/
function getReserveNormalizedVariableDebt(address asset) external view returns (uint256);
/**
* @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.ReserveDataLegacy memory);
/**
* @notice Returns the virtual underlying balance of the reserve
* @param asset The address of the underlying asset of the reserve
* @return The reserve virtual underlying balance
*/
function getVirtualUnderlyingBalance(address asset) external view returns (uint128);
/**
* @notice Validates and finalizes an aToken transfer
* @dev Only callable by the overlying aToken of the `asset`
* @param asset The address of the underlying asset of the aToken
* @param from The user from which the aTokens are transferred
* @param to The user receiving the aTokens
* @param scaledAmount The scaled amount being transferred/withdrawn
* @param scaledBalanceFromBefore The aToken scaled balance of the `from` user before the transfer
*/
function finalizeTransfer(
address asset,
address from,
address to,
uint256 scaledAmount,
uint256 scaledBalanceFromBefore
) external;
/**
* @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 number of initialized reserves
* @dev It includes dropped reserves
* @return The count
*/
function getReservesCount() external view returns (uint256);
/**
* @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);
/**
* @notice Returns the ReserveInterestRateStrategy connected to all the reserves
* @return The address of the ReserveInterestRateStrategy contract
*/
function RESERVE_INTEREST_RATE_STRATEGY() external view returns (address);
/**
* @notice Updates flash loan premium. All this premium is collected by the protocol treasury.
* @dev The premium is calculated on the total borrowed amount
* @dev Only callable by the PoolConfigurator contract
* @param flashLoanPremium The flash loan premium, expressed in bps
*/
function updateFlashloanPremium(uint128 flashLoanPremium) external;
/**
* @notice Configures a new or alters an existing collateral configuration of an eMode.
* @dev In eMode, the protocol allows very high borrowing power to borrow assets of the same category.
* The category 0 is reserved as it's the default for volatile assets
* @param id The id of the category
* @param config The configuration of the category
*/
function configureEModeCategory(
uint8 id,
DataTypes.EModeCategoryBaseConfiguration memory config
) external;
/**
* @notice Replaces the current eMode collateralBitmap.
* @param id The id of the category
* @param collateralBitmap The collateralBitmap of the category
*/
function configureEModeCategoryCollateralBitmap(uint8 id, uint128 collateralBitmap) external;
/**
* @notice Replaces the current eMode borrowableBitmap.
* @param id The id of the category
* @param borrowableBitmap The borrowableBitmap of the category
*/
function configureEModeCategoryBorrowableBitmap(uint8 id, uint128 borrowableBitmap) external;
/**
* @notice Replaces the current eMode ltvzeroBitmap.
* @param id The id of the category
* @param ltvzeroBitmap The ltvzeroBitmap of the category
*/
function configureEModeCategoryLtvzeroBitmap(uint8 id, uint128 ltvzeroBitmap) external;
/**
* @notice Sets the isolated flag of an eMode category.
* @param id The id of the category
* @param isolated True if the eMode should be isolated
*/
function configureEModeCategoryIsolated(uint8 id, bool isolated) external;
/**
* @notice Returns the data of an eMode category
* @dev DEPRECATED use independent getters instead
* @param id The id of the category
* @return The configuration data of the category
*/
function getEModeCategoryData(
uint8 id
) external view returns (DataTypes.EModeCategoryLegacy memory);
/**
* @notice Returns the label of an eMode category
* @dev This function is deprecated and will be removed in a future version.
* @custom:deprecated
* @param id The id of the category
* @return The label of the category
*/
function getEModeCategoryLabel(uint8 id) external view returns (string memory);
/**
* @notice Returns the collateral config of an eMode category
* @param id The id of the category
* @return The ltv,lt,lb of the category
*/
function getEModeCategoryCollateralConfig(
uint8 id
) external view returns (DataTypes.CollateralConfig memory);
/**
* @notice Returns the collateralBitmap of an eMode category
* @param id The id of the category
* @return The collateralBitmap of the category
*/
function getEModeCategoryCollateralBitmap(uint8 id) external view returns (uint128);
/**
* @notice Returns the borrowableBitmap of an eMode category
* @param id The id of the category
* @return The borrowableBitmap of the category
*/
function getEModeCategoryBorrowableBitmap(uint8 id) external view returns (uint128);
/**
* @notice Returns the ltvzero of an eMode category
* @param id The id of the category
* @return The ltvzeroBitmap of the category
*/
function getEModeCategoryLtvzeroBitmap(uint8 id) external view returns (uint128);
/**
* @notice Returns the isolated flag of an eMode category
* @param id The id of the category
* @return True if the eMode category is isolated
*/
function getIsEModeCategoryIsolated(uint8 id) external view returns (bool);
/**
* @notice Allows a user to use the protocol in eMode
* @param categoryId The id of the category
*/
function setUserEMode(uint8 categoryId) external;
/**
* @notice Returns the eMode the user is using
* @param user The address of the user
* @return The eMode id
*/
function getUserEMode(address user) external view returns (uint256);
/**
* @notice Sets the liquidation grace period of the given asset
* @dev To enable a liquidation grace period, a timestamp in the future should be set,
* To disable a liquidation grace period, any timestamp in the past works, like 0
* @param asset The address of the underlying asset to set the liquidationGracePeriod
* @param until Timestamp when the liquidation grace period will end
**/
function setLiquidationGracePeriod(address asset, uint40 until) external;
/**
* @notice Returns the liquidation grace period of the given asset
* @param asset The address of the underlying asset
* @return Timestamp when the liquidation grace period will end
**/
function getLiquidationGracePeriod(address asset) external view returns (uint40);
/**
* @notice Returns the total fee on flash loans.
* @dev From v3.4 all flashloan fees will be send to the treasury.
* @return The total fee on flashloans
*/
function FLASHLOAN_PREMIUM_TOTAL() external view returns (uint128);
/**
* @notice Returns the part of the flashloan fees sent to protocol
* @dev From v3.4 all flashloan fees will be send to the treasury and this value
* is always 100_00.
* @return The flashloan fee sent to the protocol treasury
*/
function FLASHLOAN_PREMIUM_TO_PROTOCOL() external view returns (uint128);
/**
* @notice Returns the maximum number of reserves supported to be listed in this Pool
* @return The maximum number of reserves supported
*/
function MAX_NUMBER_RESERVES() external view returns (uint16);
/**
* @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;
/**
* @notice Rescue and transfer tokens locked in this contract
* @param token The address of the token
* @param to The address of the recipient
* @param amount The amount of token to transfer
*/
function rescueTokens(address token, address to, uint256 amount) external;
/**
* @notice Supplies an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.
* - E.g. User supplies 100 USDC and gets in return 100 aUSDC
* @dev Deprecated: Use the `supply` function instead
* @param asset The address of the underlying asset to supply
* @param amount The amount to be supplied
* @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user
* wants to receive them on his own wallet, or a different address if the beneficiary of aTokens
* 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, address onBehalfOf, uint16 referralCode) external;
/**
* @notice It covers the deficit of a specified reserve by burning the equivalent aToken `amount` for assets
* @dev The deficit of a reserve can occur due to situations where borrowed assets are not repaid, leading to bad debt.
* @param asset The address of the underlying asset to cover the deficit.
* @param amount The amount to be covered, in aToken
* @return The amount of tokens burned
*/
function eliminateReserveDeficit(address asset, uint256 amount) external returns (uint256);
/**
* @notice Approves or disapproves a position manager. This position manager will be able
* to call the `setUserUseReserveAsCollateralOnBehalfOf` and the
* `setUserEModeOnBehalfOf` function on behalf of the user.
* @param positionManager The address of the position manager
* @param approve True if the position manager should be approved, false otherwise
*/
function approvePositionManager(address positionManager, bool approve) external;
/**
* @notice Renounces a position manager role for a given user.
* @param user The address of the user
*/
function renouncePositionManagerRole(address user) external;
/**
* @notice Sets the use as collateral flag for the user on the specific reserve on behalf of the user.
* @param asset The address of the underlying asset of the reserve
* @param useAsCollateral True if the user wants to use the reserve as collateral, false otherwise
* @param onBehalfOf The address of the user
*/
function setUserUseReserveAsCollateralOnBehalfOf(
address asset,
bool useAsCollateral,
address onBehalfOf
) external;
/**
* @notice Sets the eMode category for the user on the specific reserve on behalf of the user.
* @param categoryId The id of the category
* @param onBehalfOf The address of the user
*/
function setUserEModeOnBehalfOf(uint8 categoryId, address onBehalfOf) external;
/**
* @notice Returns true if the `positionManager` address is approved to use the position manager role on behalf of the user.
* @param user The address of the user
* @param positionManager The address of the position manager
* @return True if the user is approved to use the position manager, false otherwise
*/
function isApprovedPositionManager(
address user,
address positionManager
) external view returns (bool);
/**
* @notice Returns the current deficit of a reserve.
* @param asset The address of the underlying asset of the reserve
* @return The current deficit of the reserve
*/
function getReserveDeficit(address asset) external view returns (uint256);
/**
* @notice Returns the aToken address of a reserve.
* @param asset The address of the underlying asset of the reserve
* @return The address of the aToken
*/
function getReserveAToken(address asset) external view returns (address);
/**
* @notice Returns the variableDebtToken address of a reserve.
* @param asset The address of the underlying asset of the reserve
* @return The address of the variableDebtToken
*/
function getReserveVariableDebtToken(address asset) external view returns (address);
/**
* @notice Gets the address of the external FlashLoanLogic
*/
function getFlashLoanLogic() external view returns (address);
/**
* @notice Gets the address of the external BorrowLogic
*/
function getBorrowLogic() external view returns (address);
/**
* @notice Gets the address of the external LiquidationLogic
*/
function getLiquidationLogic() external view returns (address);
/**
* @notice Gets the address of the external PoolLogic
*/
function getPoolLogic() external view returns (address);
/**
* @notice Gets the address of the external SupplyLogic
*/
function getSupplyLogic() external view returns (address);
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPoolAddressesProvider.sol
// SPDX-License-Identifier: MIT
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.
* @param oldMarketId The old id of the market
* @param newMarketId The new id of the market
*/
event MarketIdSet(string indexed oldMarketId, string indexed newMarketId);
/**
* @dev Emitted when the pool is updated.
* @param oldAddress The old address of the Pool
* @param newAddress The new address of the Pool
*/
event PoolUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the pool configurator is updated.
* @param oldAddress The old address of the PoolConfigurator
* @param newAddress The new address of the PoolConfigurator
*/
event PoolConfiguratorUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the price oracle is updated.
* @param oldAddress The old address of the PriceOracle
* @param newAddress The new address of the PriceOracle
*/
event PriceOracleUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the ACL manager is updated.
* @param oldAddress The old address of the ACLManager
* @param newAddress The new address of the ACLManager
*/
event ACLManagerUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the ACL admin is updated.
* @param oldAddress The old address of the ACLAdmin
* @param newAddress The new address of the ACLAdmin
*/
event ACLAdminUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the price oracle sentinel is updated.
* @param oldAddress The old address of the PriceOracleSentinel
* @param newAddress The new address of the PriceOracleSentinel
*/
event PriceOracleSentinelUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the pool data provider is updated.
* @param oldAddress The old address of the PoolDataProvider
* @param newAddress The new address of the PoolDataProvider
*/
event PoolDataProviderUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when a new proxy is created.
* @param id The identifier of the proxy
* @param proxyAddress The address of the created proxy contract
* @param implementationAddress The address of the implementation contract
*/
event ProxyCreated(
bytes32 indexed id,
address indexed proxyAddress,
address indexed implementationAddress
);
/**
* @dev Emitted when a new non-proxied contract address is registered.
* @param id The identifier of the contract
* @param oldAddress The address of the old contract
* @param newAddress The address of the new contract
*/
event AddressSet(bytes32 indexed id, address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the implementation of the proxy registered with id is updated
* @param id The identifier of the contract
* @param proxyAddress The address of the proxy contract
* @param oldImplementationAddress The address of the old implementation contract
* @param newImplementationAddress The address of the new implementation contract
*/
event AddressSetAsProxy(
bytes32 indexed id,
address indexed proxyAddress,
address oldImplementationAddress,
address indexed newImplementationAddress
);
/**
* @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);
/**
* @notice Associates an id with a specific PoolAddressesProvider.
* @dev This can be used to create an onchain registry of PoolAddressesProviders to
* identify and validate multiple Aave markets.
* @param newMarketId The market id
*/
function setMarketId(string calldata newMarketId) external;
/**
* @notice Returns an address by its identifier.
* @dev The returned address might be an EOA or a contract, potentially proxied
* @dev It returns ZERO if there is no registered address with the given id
* @param id The id
* @return The address of the registered for the specified id
*/
function getAddress(bytes32 id) external view returns (address);
/**
* @notice General function to update the implementation of a proxy registered with
* certain `id`. If there is no proxy registered, it will instantiate one and
* set as implementation the `newImplementationAddress`.
* @dev IMPORTANT Use this function carefully, only for ids that don't have an explicit
* setter function, in order to avoid unexpected consequences
* @param id The id
* @param newImplementationAddress The address of the new implementation
*/
function setAddressAsProxy(bytes32 id, address newImplementationAddress) external;
/**
* @notice Sets an address for an id replacing the address saved in the addresses map.
* @dev IMPORTANT Use this function carefully, as it will do a hard replacement
* @param id The id
* @param newAddress The address to set
*/
function setAddress(bytes32 id, address newAddress) external;
/**
* @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;
/**
* @notice Returns the address of the price oracle.
* @return The address of the PriceOracle
*/
function getPriceOracle() external view returns (address);
/**
* @notice Updates the address of the price oracle.
* @param newPriceOracle The address of the new PriceOracle
*/
function setPriceOracle(address newPriceOracle) external;
/**
* @notice Returns the address of the ACL manager.
* @return The address of the ACLManager
*/
function getACLManager() external view returns (address);
/**
* @notice Updates the address of the ACL manager.
* @param newAclManager The address of the new ACLManager
*/
function setACLManager(address newAclManager) external;
/**
* @notice Returns the address of the ACL admin.
* @return The address of the ACL admin
*/
function getACLAdmin() external view returns (address);
/**
* @notice Updates the address of the ACL admin.
* @param newAclAdmin The address of the new ACL admin
*/
function setACLAdmin(address newAclAdmin) external;
/**
* @notice Returns the address of the price oracle sentinel.
* @return The address of the PriceOracleSentinel
*/
function getPriceOracleSentinel() external view returns (address);
/**
* @notice Updates the address of the price oracle sentinel.
* @param newPriceOracleSentinel The address of the new PriceOracleSentinel
*/
function setPriceOracleSentinel(address newPriceOracleSentinel) external;
/**
* @notice Returns the address of the data provider.
* @return The address of the DataProvider
*/
function getPoolDataProvider() external view returns (address);
/**
* @notice Updates the address of the data provider.
* @param newDataProvider The address of the new DataProvider
*/
function setPoolDataProvider(address newDataProvider) external;
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPoolConfigurator.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {ConfiguratorInputTypes} from '../protocol/libraries/types/ConfiguratorInputTypes.sol';
/**
* @title IPoolConfigurator
* @author Aave
* @notice Defines the basic interface for a Pool configurator.
*/
interface IPoolConfigurator {
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
* @param aToken The address of the associated aToken contract
* @param stableDebtToken, DEPRECATED in v3.2.0
* @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,
address stableDebtToken,
address variableDebtToken,
address interestRateStrategyAddress
);
/**
* @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);
/**
* @dev Emitted when flashloans are enabled or disabled on a reserve.
* @param asset The address of the underlying asset of the reserve
* @param enabled True if flashloans are enabled, false otherwise
*/
event ReserveFlashLoaning(address indexed asset, bool enabled);
/**
* @dev Emitted when the ltv is set for the frozen asset.
* @param asset The address of the underlying asset of the reserve
* @param ltv The loan to value of the asset when used as collateral
*/
event PendingLtvChanged(address indexed asset, uint256 ltv);
/**
* @dev Emitted when the collateralization risk parameters for the specified asset are updated.
* @param asset The address of the underlying asset of the reserve
* @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,
uint256 liquidationThreshold,
uint256 liquidationBonus
);
/**
* @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 factor is updated.
* @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,
uint256 newReserveFactor
);
/**
* @dev Emitted when the borrow cap of a reserve is updated.
* @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);
/**
* @dev Emitted when the supply cap of a reserve is updated.
* @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);
/**
* @dev Emitted when the liquidation protocol fee of a reserve is updated.
* @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);
/**
* @dev Emitted when the liquidation grace period is updated.
* @param asset The address of the underlying asset of the reserve
* @param gracePeriodUntil Timestamp until when liquidations will not be allowed post-unpause
*/
event LiquidationGracePeriodChanged(address indexed asset, uint40 gracePeriodUntil);
/**
* @dev Emitted when the liquidation grace period is disabled.
* @param asset The address of the underlying asset of the reserve
*/
event LiquidationGracePeriodDisabled(address indexed asset);
/**
* @dev Emitted when an collateral configuration of an asset in an eMode is changed.
* @param asset The address of the underlying asset of the reserve
* @param categoryId The eMode category
* @param collateral True if the asset is enabled as collateral in the eMode, false otherwise.
*/
event AssetCollateralInEModeChanged(address indexed asset, uint8 categoryId, bool collateral);
/**
* @dev Emitted when the borrowable configuration of an asset in an eMode changed.
* @param asset The address of the underlying asset of the reserve
* @param categoryId The eMode category
* @param borrowable True if the asset is enabled as borrowable in the eMode, false otherwise.
*/
event AssetBorrowableInEModeChanged(address indexed asset, uint8 categoryId, bool borrowable);
/**
* @dev Emitted when the ltvzero configuration of an asset in an eMode changed.
* @param asset The address of the underlying asset of the reserve
* @param categoryId The eMode category
* @param ltvzero True if the asset is enabled as ltvzero in the eMode, false otherwise.
*/
event AssetLtvzeroInEModeChanged(address indexed asset, uint8 categoryId, bool ltvzero);
/**
* @dev Emitted when a new eMode category is added or an existing category is altered.
* @param categoryId The new eMode category id
* @param ltv The ltv for the asset category in eMode
* @param liquidationThreshold The liquidationThreshold for the asset category in eMode
* @param liquidationBonus The liquidationBonus for the asset category in eMode
* @param oracle DEPRECATED in v3.2.0
* @param label A human readable identifier for the category
*/
event EModeCategoryAdded(
uint8 indexed categoryId,
uint256 ltv,
uint256 liquidationThreshold,
uint256 liquidationBonus,
address oracle,
string label
);
/**
* @dev Emitted when the isolated flag of an eMode category is changed.
* @param categoryId The eMode category id
* @param isolated True if the eMode is isolated (only eMode collateral contributes LTV)
*/
event EModeCategoryIsolationChanged(uint8 indexed categoryId, bool isolated);
/**
* @dev Emitted when a reserve interest strategy contract is updated.
* @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,
address newStrategy
);
/**
* @dev Emitted when the data of a reserve interest strategy contract is updated.
* @param asset The address of the underlying asset of the reserve
* @param data abi encoded data
*/
event ReserveInterestRateDataChanged(address indexed asset, address indexed strategy, bytes data);
/**
* @dev Emitted when an aToken implementation is upgraded.
* @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,
address indexed implementation
);
/**
* @dev Emitted when the implementation of a variable debt token is upgraded.
* @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,
address indexed implementation
);
/**
* @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
);
/**
* @dev Emitted when the part of the premium that goes to protocol is updated.
Deprecated, from the v3.4 version the `flashloanPremiumToProtocol` value
is always 100%.
* @param oldFlashloanPremiumToProtocol The old premium, expressed in bps
* @param newFlashloanPremiumToProtocol The new premium, expressed in bps
*/
event FlashloanPremiumToProtocolUpdated(
uint128 oldFlashloanPremiumToProtocol,
uint128 newFlashloanPremiumToProtocol
);
/**
* @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 variable debt token implementation for the asset.
* @param input The variableDebtToken update parameters
*/
function updateVariableDebtToken(
ConfiguratorInputTypes.UpdateDebtTokenInput calldata input
) external;
/**
* @notice Configures borrowing on a reserve.
* @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;
/**
* @notice Configures the reserve collateralization parameters.
* @dev All the values are expressed in bps. A value of 10000, results in 100.00%
* @dev The `liquidationBonus` is always above 100%. A value of 105% means the liquidator will receive a 5% bonus
* @param asset The address of the underlying asset of the reserve
* @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,
uint256 liquidationThreshold,
uint256 liquidationBonus
) external;
/**
* @notice Enable or disable flashloans on a reserve
* @param asset The address of the underlying asset of the reserve
* @param enabled True if flashloans need to be enabled, false otherwise
*/
function setReserveFlashLoaning(address asset, bool enabled) external;
/**
* @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;
/**
* @notice Freeze or unfreeze a reserve. A frozen reserve doesn't allow any new supply, borrow
* or rate swap but allows repayments, liquidations, rate rebalances and withdrawals.
* Also sets ltvzero on affected eModes and reserve ltv to 0.
* Stores the current reserve ltv in pendingLtv[asset].
* @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;
/**
* @notice Restores the pending ltv for a reserve in non-emode (emode 0), if it is non-zero.
* @param asset The address of the underlying asset of the reserve
* @param ltvzero True if the reserve should be flagged as ltvzero, false otherwise
*/
function setReserveLtvzero(address asset, bool ltvzero) external;
/**
* @notice Pauses a reserve. A paused reserve does not allow any interaction (supply, borrow, repay,
* 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
* @param gracePeriod Count of seconds after unpause during which liquidations will not be available
* - Only applicable whenever unpausing (`paused` as false)
* - Passing 0 means no grace period
* - Capped to maximum MAX_GRACE_PERIOD
*/
function setReservePause(address asset, bool paused, uint40 gracePeriod) external;
/**
* @notice Pauses a reserve. A paused reserve does not allow any interaction (supply, borrow, repay,
* swap interest rate, liquidate, atoken transfers).
* @dev Version with no grace period
* @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 Disables liquidation grace period for the asset. The liquidation grace period is set in the past
* so that liquidations are allowed for the asset.
* @param asset The address of the underlying asset of the reserve
*/
function disableLiquidationGracePeriod(address asset) 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 interest rate data for a reserve
* @param asset The address of the underlying asset of the reserve
* @param rateData bytes-encoded rate data. In this format in order to allow the rate strategy contract
* to de-structure custom data
*/
function setReserveInterestRateData(address asset, bytes calldata rateData) external;
/**
* @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
* @param gracePeriod Count of seconds after unpause during which liquidations will not be available
* - Only applicable whenever unpausing (`paused` as false)
* - Passing 0 means no grace period
* - Capped to maximum MAX_GRACE_PERIOD
*/
function setPoolPause(bool paused, uint40 gracePeriod) external;
/**
* @notice Pauses or unpauses all the protocol reserves. In the paused state all the protocol interactions
* are suspended.
* @dev Version with no grace period
* @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 Enables/disables an asset to be borrowable in a selected eMode.
* @param asset The address of the underlying asset of the reserve
* @param categoryId The eMode categoryId
* @param borrowable True if the asset should be borrowable in the given eMode category, false otherwise.
*/
function setAssetBorrowableInEMode(address asset, uint8 categoryId, bool borrowable) external;
/**
* @notice Enables/disables an asset to be collateral in a selected eMode.
* @param asset The address of the underlying asset of the reserve
* @param categoryId The eMode categoryId
* @param collateral True if the asset should be collateral in the given eMode category, false otherwise.
*/
function setAssetCollateralInEMode(address asset, uint8 categoryId, bool collateral) external;
/**
* @notice Enables/disables an asset to be ltvzero in a selected eMode.
* @param asset The address of the underlying asset of the reserve
* @param categoryId The eMode categoryId
* @param ltvzero True if the asset should be ltvzero in the given eMode category, false otherwise.
*/
function setAssetLtvzeroInEMode(address asset, uint8 categoryId, bool ltvzero) external;
/**
* @notice Sets the isolated flag of an eMode category.
* @param categoryId The eMode category id
* @param isolated When true, users with non-eMode collateral enabled cannot enter the eMode,
* and non-eMode assets get LTV=0 (liquidation threshold is unaffected, preserving health factor of existing positions)
*/
function setEModeCategoryIsolated(uint8 categoryId, bool isolated) external;
/**
* @notice Adds a new efficiency mode (eMode) category or alters a existing one.
* @param categoryId The id of the category to be configured
* @param ltv The ltv associated with the category
* @param liquidationThreshold The liquidation threshold associated with the category
* @param liquidationBonus The liquidation bonus associated with the category
* @param label A label identifying the category
* @param isolated When true, users with non-eMode collateral enabled cannot enter the eMode,
* and non-eMode assets get LTV=0 (liquidation threshold is unaffected, preserving health factor of existing positions)
*/
function setEModeCategory(
uint8 categoryId,
uint16 ltv,
uint16 liquidationThreshold,
uint16 liquidationBonus,
string calldata label,
bool isolated
) external;
/**
* @notice Updates the flash loan premium. All this premium
* will be collected by the treasury.
* @dev Expressed in bps
* @dev The premium is calculated on the total amount borrowed
* @param newFlashloanPremium The flashloan premium
*/
function updateFlashloanPremium(uint128 newFlashloanPremium) external;
/**
* @notice Gets pending ltv value
* @param asset The address of the underlying asset of the reserve
*/
function getPendingLtv(address asset) external view returns (uint256);
/**
* @notice Gets the maximum liquidations grace period allowed, in seconds
*/
function MAX_GRACE_PERIOD() external view returns (uint40);
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPoolDataProvider.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';
import {IPool} from './IPool.sol';
/**
* @title IPoolDataProvider
* @author Aave
* @notice Defines the basic interface of a PoolDataProvider
*/
interface IPoolDataProvider {
struct TokenData {
string symbol;
address tokenAddress;
}
/**
* @notice Returns the address for the PoolAddressesProvider contract.
* @return The address for the PoolAddressesProvider contract
*/
function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);
/**
* @notice Returns the address for the Pool contract.
* @return The address for the Pool contract
*/
function POOL() external view returns (IPool);
/**
* @notice Returns the list of the existing reserves in the pool.
* @dev Handling MKR and ETH in a different way since they do not have standard `symbol` functions.
* @return The list of reserves, pairs of symbols and addresses
*/
function getAllReservesTokens() external view returns (TokenData[] memory);
/**
* @notice Returns the list of the existing ATokens in the pool.
* @return The list of ATokens, pairs of symbols and addresses
*/
function getAllATokens() external view returns (TokenData[] memory);
/**
* @notice Returns the configuration data of the reserve
* @dev Not returning borrow and supply caps for compatibility, nor pause flag
* @param asset The address of the underlying asset of the reserve
* @return decimals The number of decimals of the reserve
* @return ltv The ltv of the reserve
* @return liquidationThreshold The liquidationThreshold of the reserve
* @return liquidationBonus The liquidationBonus of the reserve
* @return reserveFactor The reserveFactor of the reserve
* @return usageAsCollateralEnabled True if the usage as collateral is enabled, false otherwise
* @return borrowingEnabled True if borrowing is enabled, false otherwise
* @return stableBorrowRateEnabled True if stable rate borrowing is enabled, false otherwise
* @return isActive True if it is active, false otherwise
* @return isFrozen True if it is frozen, false otherwise
*/
function getReserveConfigurationData(
address asset
)
external
view
returns (
uint256 decimals,
uint256 ltv,
uint256 liquidationThreshold,
uint256 liquidationBonus,
uint256 reserveFactor,
bool usageAsCollateralEnabled,
bool borrowingEnabled,
bool stableBorrowRateEnabled,
bool isActive,
bool isFrozen
);
/**
* @notice Returns the caps parameters of the reserve
* @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 returns (uint256 borrowCap, uint256 supplyCap);
/**
* @notice Returns if the pool is paused
* @param asset The address of the underlying asset of the reserve
* @return isPaused True if the pool is paused, false otherwise
*/
function getPaused(address asset) external view returns (bool isPaused);
/**
* @notice Returns the siloed borrowing flag
* @param asset The address of the underlying asset of the reserve
* @return false, DEPRECATED in v3.7.0
*/
function getSiloedBorrowing(address asset) external view returns (bool);
/**
* @notice Returns the protocol fee on the liquidation bonus
* @param asset The address of the underlying asset of the reserve
* @return The protocol fee on liquidation
*/
function getLiquidationProtocolFee(address asset) external view returns (uint256);
/**
* @notice Returns the unbacked mint cap of the reserve
* @param asset The address of the underlying asset of the reserve
* @return 0, DEPRECATED in v3.4.0
*/
function getUnbackedMintCap(address asset) external view returns (uint256);
/**
* @notice Returns the debt ceiling of the reserve
* @param asset The address of the underlying asset of the reserve
* @return 0, DEPRECATED in v3.7.0
*/
function getDebtCeiling(address asset) external view returns (uint256);
/**
* @notice Returns the debt ceiling decimals
* @return 2, DEPRECATED in v3.7.0
*/
function getDebtCeilingDecimals() external pure returns (uint256);
/**
* @notice Returns the reserve data
* @param asset The address of the underlying asset of the reserve
* @return unbacked The amount of unbacked tokens
* @return accruedToTreasuryScaled The scaled amount of tokens accrued to treasury that is to be minted
* @return totalAToken The total supply of the aToken
* @return totalStableDebt The total stable debt of the reserve
* @return totalVariableDebt The total variable debt of the reserve
* @return liquidityRate The liquidity rate of the reserve
* @return variableBorrowRate The variable borrow rate of the reserve
* @return stableBorrowRate The stable borrow rate of the reserve
* @return averageStableBorrowRate The average stable borrow rate of the reserve
* @return liquidityIndex The liquidity index of the reserve
* @return variableBorrowIndex The variable borrow index of the reserve
* @return lastUpdateTimestamp The timestamp of the last update of the reserve
*/
function getReserveData(
address asset
)
external
view
returns (
uint256 unbacked,
uint256 accruedToTreasuryScaled,
uint256 totalAToken,
uint256 totalStableDebt,
uint256 totalVariableDebt,
uint256 liquidityRate,
uint256 variableBorrowRate,
uint256 stableBorrowRate,
uint256 averageStableBorrowRate,
uint256 liquidityIndex,
uint256 variableBorrowIndex,
uint40 lastUpdateTimestamp
);
/**
* @notice Returns the total supply of aTokens for a given asset
* @param asset The address of the underlying asset of the reserve
* @return The total supply of the aToken
*/
function getATokenTotalSupply(address asset) external view returns (uint256);
/**
* @notice Returns the total debt for a given asset
* @param asset The address of the underlying asset of the reserve
* @return The total debt for asset
*/
function getTotalDebt(address asset) external view returns (uint256);
/**
* @notice Returns the user data in a reserve
* @param asset The address of the underlying asset of the reserve
* @param user The address of the user
* @return currentATokenBalance The current AToken balance of the user
* @return currentStableDebt The current stable debt of the user
* @return currentVariableDebt The current variable debt of the user
* @return principalStableDebt The principal stable debt of the user
* @return scaledVariableDebt The scaled variable debt of the user
* @return stableBorrowRate The stable borrow rate of the user
* @return liquidityRate The liquidity rate of the reserve
* @return stableRateLastUpdated The timestamp of the last update of the user stable rate
* @return usageAsCollateralEnabled True if the user is using the asset as collateral, false
* otherwise
*/
function getUserReserveData(
address asset,
address user
)
external
view
returns (
uint256 currentATokenBalance,
uint256 currentStableDebt,
uint256 currentVariableDebt,
uint256 principalStableDebt,
uint256 scaledVariableDebt,
uint256 stableBorrowRate,
uint256 liquidityRate,
uint40 stableRateLastUpdated,
bool usageAsCollateralEnabled
);
/**
* @notice Returns the token addresses of the reserve
* @param asset The address of the underlying asset of the reserve
* @return aTokenAddress The AToken address of the reserve
* @return stableDebtTokenAddress DEPRECATED in v3.2.0
* @return variableDebtTokenAddress The VariableDebtToken address of the reserve
*/
function getReserveTokensAddresses(
address asset
)
external
view
returns (
address aTokenAddress,
address stableDebtTokenAddress,
address variableDebtTokenAddress
);
/**
* @notice Returns the address of the Interest Rate strategy
* @param asset The address of the underlying asset of the reserve
* @return irStrategyAddress The address of the Interest Rate strategy
*/
function getInterestRateStrategyAddress(
address asset
) external view returns (address irStrategyAddress);
/**
* @notice Returns whether the reserve has FlashLoans enabled or disabled
* @param asset The address of the underlying asset of the reserve
* @return True if FlashLoans are enabled, false otherwise
*/
function getFlashLoanEnabled(address asset) external view returns (bool);
/**
* @notice Returns whether virtual accounting is enabled/not for a reserve
* @param asset The address of the underlying asset of the reserve
* @return True, DEPRECATED in v3.4.0 as all reserves have virtual accounting set as active
*/
function getIsVirtualAccActive(address asset) external view returns (bool);
/**
* @notice Returns the virtual underlying balance of the reserve
* @param asset The address of the underlying asset of the reserve
* @return The reserve virtual underlying balance
*/
function getVirtualUnderlyingBalance(address asset) external view returns (uint256);
/**
* @notice Returns the deficit of the reserve
* @param asset The address of the underlying asset of the reserve
* @return The reserve deficit
*/
function getReserveDeficit(address asset) external view returns (uint256);
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPriceOracleGetter.sol
// SPDX-License-Identifier: MIT
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);
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IReserveInterestRateStrategy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {DataTypes} from '../protocol/libraries/types/DataTypes.sol';
/**
* @title IReserveInterestRateStrategy
* @author BGD Labs
* @notice Basic interface for any rate strategy used by the Aave protocol
*/
interface IReserveInterestRateStrategy {
/**
* @notice Sets interest rate data for an Aave rate strategy
* @param reserve The reserve to update
* @param rateData The abi encoded reserve interest rate data to apply to the given reserve
* Abstracted this way as rate strategies can be custom
*/
function setInterestRateParams(address reserve, bytes calldata rateData) external;
/**
* @notice Calculates the interest rates depending on the reserve's state and configurations
* @param params The parameters needed to calculate interest rates
* @return liquidityRate The liquidity rate expressed in ray
* @return variableBorrowRate The variable borrow rate expressed in ray
*/
function calculateInterestRates(
DataTypes.CalculateInterestRatesParams memory params
) external view returns (uint256, uint256);
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IScaledBalanceToken.sol
// SPDX-License-Identifier: MIT
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
* @param caller The address performing the mint
* @param onBehalfOf The address of the user that will receive the minted tokens
* @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,
uint256 value,
uint256 balanceIncrease,
uint256 index
);
/**
* @dev Emitted after the burn action
* @dev If the burn function does not involve a transfer of the underlying asset, the target defaults to zero address
* @param from The address from which the tokens will be burned
* @param target The address that will receive the underlying, if any
* @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,
uint256 value,
uint256 balanceIncrease,
uint256 index
);
/**
* @notice Returns the scaled balance of the user.
* @dev The scaled balance is the sum of all the updated stored balance divided by the reserve's liquidity index
* 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);
/**
* @notice Returns the scaled balance of the user and the scaled total supply.
* @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);
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/helpers/Errors.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title Errors library
* @author Aave
* @notice Defines the error messages emitted by the different contracts of the Aave protocol
*/
library Errors {
error CallerNotPoolAdmin(); // 'The caller of the function is not a pool admin'
error CallerNotPoolOrEmergencyAdmin(); // 'The caller of the function is not a pool or emergency admin'
error CallerNotRiskOrPoolAdmin(); // 'The caller of the function is not a risk or pool admin'
error CallerNotAssetListingOrPoolAdmin(); // 'The caller of the function is not an asset listing or pool admin'
error AddressesProviderNotRegistered(); // 'Pool addresses provider is not registered'
error InvalidAddressesProviderId(); // 'Invalid id for the pool addresses provider'
error NotContract(); // 'Address is not a contract'
error CallerNotPoolConfigurator(); // 'The caller of the function is not the pool configurator'
error CallerNotAToken(); // 'The caller of the function is not an AToken'
error InvalidAddressesProvider(); // 'The address of the pool addresses provider is invalid'
error InvalidFlashloanExecutorReturn(); // 'Invalid return value of the flashloan executor function'
error ReserveAlreadyAdded(); // 'Reserve has already been added to reserve list'
error NoMoreReservesAllowed(); // 'Maximum amount of reserves in the pool reached'
error EModeCategoryReserved(); // 'Zero eMode category is reserved for volatile heterogeneous assets'
error ReserveLiquidityNotZero(); // 'The liquidity of the reserve needs to be 0'
error FlashloanPremiumInvalid(); // 'Invalid flashloan premium'
error InvalidReserveParams(); // 'Invalid risk parameters for the reserve'
error InvalidEmodeCategoryParams(); // 'Invalid risk parameters for the eMode category'
error CallerMustBePool(); // 'The caller of this function must be a pool'
error InvalidMintAmount(); // 'Invalid amount to mint'
error InvalidBurnAmount(); // 'Invalid amount to burn'
error InvalidAmount(); // 'Amount must be greater than 0'
error ReserveInactive(); // 'Action requires an active reserve'
error ReserveFrozen(); // 'Action cannot be performed because the reserve is frozen'
error ReservePaused(); // 'Action cannot be performed because the reserve is paused'
error BorrowingNotEnabled(); // 'Borrowing is not enabled'
error NotEnoughAvailableUserBalance(); // 'User cannot withdraw more than the available balance'
error InvalidInterestRateModeSelected(); // 'Invalid interest rate mode selected'
error HealthFactorLowerThanLiquidationThreshold(); // 'Health factor is below the liquidation threshold'
error CollateralCannotCoverNewBorrow(); // 'There is not enough collateral to cover a new borrow'
error NoDebtOfSelectedType(); // 'For repayment of a specific type of debt, the user needs to have debt that type'
error NoExplicitAmountToRepayOnBehalf(); // 'To repay on behalf of a user an explicit amount to repay is needed'
error UnderlyingBalanceZero(); // 'The underlying balance needs to be greater than 0'
error HealthFactorNotBelowThreshold(); // 'Health factor is not below the threshold'
error CollateralCannotBeLiquidated(); // 'The collateral chosen cannot be liquidated'
error SpecifiedCurrencyNotBorrowedByUser(); // 'User did not borrow the specified currency'
error InconsistentFlashloanParams(); // 'Inconsistent flashloan parameters'
error BorrowCapExceeded(); // 'Borrow cap is exceeded'
error SupplyCapExceeded(); // 'Supply cap is exceeded'
error LtvValidationFailed(); // 'Ltv validation failed'
error InconsistentEModeCategory(); // 'Inconsistent eMode category'
error ReserveAlreadyInitialized(); // 'Reserve has already been initialized'
error UserHasAssetWithZeroLtv(); // 'User has asset with ltv being zero'
error InvalidLtv(); // 'Invalid ltv parameter for the reserve'
error InvalidLiquidationThreshold(); // 'Invalid liquidity threshold parameter for the reserve'
error InvalidLiquidationBonus(); // 'Invalid liquidity bonus parameter for the reserve'
error InvalidDecimals(); // 'Invalid decimals parameter of the underlying asset of the reserve'
error InvalidReserveFactor(); // 'Invalid reserve factor parameter for the reserve'
error InvalidBorrowCap(); // 'Invalid borrow cap for the reserve'
error InvalidSupplyCap(); // 'Invalid supply cap for the reserve'
error InvalidLiquidationProtocolFee(); // 'Invalid liquidation protocol fee for the reserve'
error InvalidReserveIndex(); // 'Invalid reserve index'
error AclAdminCannotBeZero(); // 'ACL admin cannot be set to the zero address'
error InconsistentParamsLength(); // 'Array parameters that should be equal length are not'
error ZeroAddressNotValid(); // 'Zero address not valid'
error InvalidExpiration(); // 'Invalid expiration'
error InvalidSignature(); // 'Invalid signature'
error OperationNotSupported(); // 'Operation not supported'
error AssetNotListed(); // 'Asset is not listed'
error InvalidOptimalUsageRatio(); // 'Invalid optimal usage ratio'
error UnderlyingCannotBeRescued(); // 'The underlying asset cannot be rescued'
error AddressesProviderAlreadyAdded(); // 'Reserve has already been added to reserve list'
error PoolAddressesDoNotMatch(); // 'The token implementation pool address and the pool address provided by the initializing pool do not match'
error ReserveDebtNotZero(); // the total debt of the reserve needs to be 0
error FlashloanDisabled(); // FlashLoaning for this asset is disabled
error InvalidMaxRate(); // The expect maximum borrow rate is invalid
error WithdrawToAToken(); // Withdrawing to the aToken is not allowed
error SupplyToAToken(); // Supplying to the aToken is not allowed
error Slope2MustBeGteSlope1(); // Variable interest rate slope 2 can not be lower than slope 1
error CallerNotRiskOrPoolOrEmergencyAdmin(); // 'The caller of the function is not a risk, pool or emergency admin'
error LiquidationGraceSentinelCheckFailed(); // 'Liquidation grace sentinel validation failed'
error InvalidGracePeriod(); // Grace period above a valid range
error InvalidFreezeState(); // Reserve is already in the passed freeze state
error InvalidLtvzeroState(); // Reserve is already in the passed ltvzero state
error NotBorrowableInEMode(); // Asset not borrowable in eMode
error CallerNotUmbrella(); // The caller of the function is not the umbrella contract
error ReserveNotInDeficit(); // The reserve is not in deficit
error MustNotLeaveDust(); // Below a certain threshold liquidators need to take the full position
error UserCannotHaveDebt(); // Thrown when a user tries to interact with a method that requires a position without debt
error SelfLiquidation(); // Thrown when a user tries to liquidate themselves
error CallerNotPositionManager(); // Thrown when the caller has not been enabled as a position manager of the on-behalf-of user
error InvalidCollateralInEmode(address reserve, uint256 categoryId); /// Thrown when trying to enter an eMode with an invalid collateral asset
error InvalidDebtInEmode(address reserve, uint256 categoryId); /// Thrown when trying to enter an eMode with an invalid debt asset
error MustBeEmodeCollateral(address reserve, uint256 categoryId); /// Thrown when trying to configure an asset as eMode-ltvzero that is not an eMode collateral
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/math/WadRayMath.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
/**
* @title WadRayMath library
* @author Aave
* @notice Provides functions to perform calculations with Wad and Ray units
* @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 Default operations round half up (if a value is >= .5, it will be rounded up, otherwise rounded down).
* @dev For specific rounding behaviors, functions with `Floor` and `Ceil` suffixes or a `Rounding` parameter are available.
*/
library WadRayMath {
enum Rounding {
Floor,
Ceil
}
// HALF_WAD and HALF_RAY expressed with extended notation as constant with operations are not supported in Yul assembly
uint256 internal constant WAD = 1e18;
uint256 internal constant HALF_WAD = 0.5e18;
uint256 internal constant RAY = 1e27;
uint256 internal constant HALF_RAY = 0.5e27;
uint256 internal constant WAD_RAY_RATIO = 1e9;
/**
* @dev Multiplies two wad, rounding half up to the nearest wad
* @dev assembly optimized for improved gas savings, see https://twitter.com/transmissions11/status/1451131036377571328
* @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 {
if iszero(or(iszero(b), iszero(gt(a, div(sub(not(0), HALF_WAD), b))))) {
revert(0, 0)
}
c := div(add(mul(a, b), HALF_WAD), WAD)
}
}
/**
* @dev Divides two wad, rounding half up to the nearest wad
* @dev assembly optimized for improved gas savings, see https://twitter.com/transmissions11/status/1451131036377571328
* @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 {
if or(iszero(b), iszero(iszero(gt(a, div(sub(not(0), div(b, 2)), WAD))))) {
revert(0, 0)
}
c := div(add(mul(a, WAD), div(b, 2)), b)
}
}
function rayMul(uint256 a, uint256 b) internal pure returns (uint256 c) {
assembly {
// to avoid overflow, a <= (type(uint256).max - HALF_RAY) / b
if iszero(or(iszero(b), iszero(gt(a, div(sub(not(0), HALF_RAY), b))))) {
revert(0, 0)
}
c := div(add(mul(a, b), HALF_RAY), RAY)
}
}
function rayMulFloor(uint256 a, uint256 b) internal pure returns (uint256 c) {
assembly {
// Overflow check: Ensure a * b does not exceed uint256 max
if iszero(or(iszero(b), iszero(gt(a, div(not(0), b))))) {
revert(0, 0)
}
c := div(mul(a, b), RAY)
}
}
function rayMulCeil(uint256 a, uint256 b) internal pure returns (uint256 c) {
assembly {
// Overflow check: Ensure a * b does not exceed uint256 max
if iszero(or(iszero(b), iszero(gt(a, div(not(0), b))))) {
revert(0, 0)
}
let product := mul(a, b)
c := add(div(product, RAY), iszero(iszero(mod(product, RAY))))
}
}
/**
* @notice Divides two ray, rounding half up to the nearest ray
* @dev assembly optimized for improved gas savings, see https://twitter.com/transmissions11/status/1451131036377571328
* @param a Ray
* @param b Ray
* @return c = a raydiv b
*/
function rayDiv(uint256 a, uint256 b) internal pure returns (uint256 c) {
assembly {
// to avoid overflow, a <= (type(uint256).max - b / 2) / RAY
if or(iszero(b), iszero(iszero(gt(a, div(sub(not(0), div(b, 2)), RAY))))) {
revert(0, 0)
}
c := div(add(mul(a, RAY), div(b, 2)), b)
}
}
function rayDivCeil(uint256 a, uint256 b) internal pure returns (uint256 c) {
assembly {
// Overflow check: Ensure a * RAY does not exceed uint256 max
if or(iszero(b), iszero(iszero(gt(a, div(not(0), RAY))))) {
revert(0, 0)
}
let scaled := mul(a, RAY)
c := add(div(scaled, b), iszero(iszero(mod(scaled, b))))
}
}
function rayDivFloor(uint256 a, uint256 b) internal pure returns (uint256 c) {
assembly {
// Overflow check: Ensure a * RAY does not exceed uint256 max
if or(iszero(b), iszero(iszero(gt(a, div(not(0), RAY))))) {
revert(0, 0)
}
c := div(mul(a, RAY), b)
}
}
/**
* @dev Casts ray down to wad
* @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)
let remainder := mod(a, WAD_RAY_RATIO)
if iszero(lt(remainder, div(WAD_RAY_RATIO, 2))) {
b := add(b, 1)
}
}
}
/**
* @dev Converts wad up to ray
* @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 {
b := mul(a, WAD_RAY_RATIO)
if iszero(eq(div(b, WAD_RAY_RATIO), a)) {
revert(0, 0)
}
}
}
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/types/ConfiguratorInputTypes.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
library ConfiguratorInputTypes {
struct InitReserveInput {
address aTokenImpl;
address variableDebtTokenImpl;
address underlyingAsset;
string aTokenName;
string aTokenSymbol;
string variableDebtTokenName;
string variableDebtTokenSymbol;
bytes params;
bytes interestRateData;
}
struct UpdateATokenInput {
address asset;
string name;
string symbol;
address implementation;
bytes params;
}
struct UpdateDebtTokenInput {
address asset;
string name;
string symbol;
address implementation;
bytes params;
}
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/types/DataTypes.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
library DataTypes {
/**
* This exists specifically to maintain the `getReserveData()` interface, since the new, internal
* `ReserveData` struct includes the reserve's `virtualUnderlyingBalance`.
*/
struct ReserveDataLegacy {
//stores the reserve configuration
ReserveConfigurationMap configuration;
//the liquidity index. Expressed in ray
uint128 liquidityIndex;
//the current supply rate. Expressed in ray
uint128 currentLiquidityRate;
//variable borrow index. Expressed in ray
uint128 variableBorrowIndex;
//the current variable borrow rate. Expressed in ray
uint128 currentVariableBorrowRate;
// DEPRECATED on v3.2.0
uint128 currentStableBorrowRate;
//timestamp of last update
uint40 lastUpdateTimestamp;
//the id of the reserve. Represents the position in the list of the active reserves
uint16 id;
//aToken address
address aTokenAddress;
// DEPRECATED on v3.2.0
address stableDebtTokenAddress;
//variableDebtToken address
address variableDebtTokenAddress;
// DEPRECATED on v3.4.0, should use the `RESERVE_INTEREST_RATE_STRATEGY` variable from the Pool contract
address interestRateStrategyAddress;
//the current treasury balance, scaled
uint128 accruedToTreasury;
// DEPRECATED on v3.4.0
uint128 unbacked;
// DEPRECATED on v3.7.0
uint128 isolationModeTotalDebt;
}
struct ReserveData {
//stores the reserve configuration
ReserveConfigurationMap configuration;
//the liquidity index. Expressed in ray
uint128 liquidityIndex;
//the current supply rate. Expressed in ray
uint128 currentLiquidityRate;
//variable borrow index. Expressed in ray
uint128 variableBorrowIndex;
//the current variable borrow rate. Expressed in ray
uint128 currentVariableBorrowRate;
/// @notice reused `__deprecatedStableBorrowRate` storage from pre 3.2
// the current accumulate deficit in underlying tokens
uint128 deficit;
//timestamp of last update
uint40 lastUpdateTimestamp;
//the id of the reserve. Represents the position in the list of the active reserves
uint16 id;
//timestamp until when liquidations are not allowed on the reserve, if set to past liquidations will be allowed
uint40 liquidationGracePeriodUntil;
//aToken address
address aTokenAddress;
// DEPRECATED on v3.2.0
address __deprecatedStableDebtTokenAddress;
//variableDebtToken address
address variableDebtTokenAddress;
// DEPRECATED on v3.4.0, should use the `RESERVE_INTEREST_RATE_STRATEGY` variable from the Pool contract
address __deprecatedInterestRateStrategyAddress;
//the current treasury balance, scaled
uint128 accruedToTreasury;
// In aave 3.3.0 this storage slot contained the `unbacked`
uint128 virtualUnderlyingBalance;
//the outstanding debt borrowed against this asset in isolation mode
uint128 __deprecatedIsolationModeTotalDebt;
//the amount of underlying accounted for by the protocol
// DEPRECATED on v3.4.0. Moved into the same slot as accruedToTreasury for optimized storage access.
uint128 __deprecatedVirtualUnderlyingBalance;
}
struct ReserveConfigurationMap {
//bit 0-15: LTV
//bit 16-31: Liq. threshold
//bit 32-47: Liq. bonus
//bit 48-55: Decimals
//bit 56: reserve is active
//bit 57: reserve is frozen
//bit 58: borrowing is enabled
//bit 59: DEPRECATED: stable rate borrowing enabled
//bit 60: asset is paused
//bit 61: DEPRECATED: borrowing in isolation mode is enabled
//bit 62: DEPRECATED: siloed borrowing enabled
//bit 63: flashloaning enabled
//bit 64-79: reserve factor
//bit 80-115: borrow cap in whole tokens, borrowCap == 0 => no cap
//bit 116-151: supply cap in whole tokens, supplyCap == 0 => no cap
//bit 152-167: liquidation protocol fee
//bit 168-175: DEPRECATED: eMode category
//bit 176-211: DEPRECATED: unbacked mint cap
//bit 212-251: DEPRECATED: debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals
//bit 252: DEPRECATED: virtual accounting is enabled for the reserve
//bit 253-255 unused
uint256 data;
}
struct UserConfigurationMap {
/**
* @dev Bitmap of the users collaterals and borrows. It is divided in pairs of bits, one pair per asset.
* The first bit indicates if an asset is used as collateral by the user, the second whether an
* asset is borrowed by the user.
*/
uint256 data;
}
// DEPRECATED: kept for backwards compatibility, might be removed in a future version
struct EModeCategoryLegacy {
// each eMode category has a custom ltv and liquidation threshold
uint16 ltv;
uint16 liquidationThreshold;
uint16 liquidationBonus;
// DEPRECATED
address priceSource;
string label;
}
struct CollateralConfig {
uint16 ltv;
uint16 liquidationThreshold;
uint16 liquidationBonus;
}
struct EModeCategoryBaseConfiguration {
uint16 ltv;
uint16 liquidationThreshold;
uint16 liquidationBonus;
bool isolated;
string label;
}
struct EModeCategory {
// each eMode category has a custom ltv and liquidation threshold
uint16 ltv;
uint16 liquidationThreshold;
uint16 liquidationBonus;
uint128 collateralBitmap;
bool isolated; // if true, only assets in collateralBitmap can be used as collateral, and all others will have ltv0 rules applying
string label;
uint128 borrowableBitmap;
uint128 ltvzeroBitmap; // if true, the asset will be treated as ltv0 and ltv0 rules apply
}
enum InterestRateMode {
NONE,
__DEPRECATED,
VARIABLE
}
struct ReserveCache {
uint256 currScaledVariableDebt;
uint256 nextScaledVariableDebt;
uint256 currLiquidityIndex;
uint256 nextLiquidityIndex;
uint256 currVariableBorrowIndex;
uint256 nextVariableBorrowIndex;
uint256 currLiquidityRate;
uint256 currVariableBorrowRate;
uint256 reserveFactor;
ReserveConfigurationMap reserveConfiguration;
address aTokenAddress;
address variableDebtTokenAddress;
uint40 reserveLastUpdateTimestamp;
}
struct ExecuteLiquidationCallParams {
address liquidator;
uint256 debtToCover;
address collateralAsset;
address debtAsset;
address borrower;
bool receiveAToken;
address priceOracle;
uint8 borrowerEModeCategory;
address interestRateStrategyAddress;
}
struct ExecuteSupplyParams {
address user;
address asset;
address interestRateStrategyAddress;
uint256 amount;
address onBehalfOf;
uint16 referralCode;
uint8 supplierEModeCategory;
}
struct ExecuteBorrowParams {
address asset;
address user;
address onBehalfOf;
address interestRateStrategyAddress;
uint256 amount;
InterestRateMode interestRateMode;
uint16 referralCode;
bool releaseUnderlying;
address oracle;
uint8 userEModeCategory;
}
struct ExecuteRepayParams {
address asset;
address user;
address interestRateStrategyAddress;
uint256 amount;
InterestRateMode interestRateMode;
address onBehalfOf;
bool useATokens;
address oracle;
uint8 userEModeCategory;
}
struct ExecuteWithdrawParams {
address user;
address asset;
address interestRateStrategyAddress;
uint256 amount;
address to;
address oracle;
uint8 userEModeCategory;
}
struct ExecuteEliminateDeficitParams {
address user;
address asset;
address interestRateStrategyAddress;
uint256 amount;
}
struct FinalizeTransferParams {
address asset;
address from;
address to;
uint256 scaledAmount;
uint256 scaledBalanceFromBefore;
address oracle;
uint8 fromEModeCategory;
}
struct FlashloanParams {
address user;
address receiverAddress;
address[] assets;
uint256[] amounts;
uint256[] interestRateModes;
address interestRateStrategyAddress;
address onBehalfOf;
bytes params;
uint16 referralCode;
uint256 flashLoanPremium;
address addressesProvider;
address pool;
bool isAuthorizedFlashBorrower;
}
struct FlashloanSimpleParams {
address user;
address receiverAddress;
address asset;
address interestRateStrategyAddress;
uint256 amount;
bytes params;
uint16 referralCode;
uint256 flashLoanPremium;
}
struct FlashLoanRepaymentParams {
address user;
uint256 amount;
uint256 totalPremium;
address asset;
address interestRateStrategyAddress;
address receiverAddress;
uint16 referralCode;
}
struct CalculateUserAccountDataParams {
UserConfigurationMap userConfig;
address user;
address oracle;
uint8 userEModeCategory;
}
struct ValidateBorrowParams {
ReserveCache reserveCache;
address asset;
uint256 amountScaled;
InterestRateMode interestRateMode;
uint8 userEModeCategory;
}
struct ValidateLiquidationCallParams {
ReserveCache debtReserveCache;
uint256 totalDebt;
uint256 healthFactor;
address borrower;
address liquidator;
}
struct CalculateInterestRatesParams {
uint256 unbacked;
uint256 liquidityAdded;
uint256 liquidityTaken;
uint256 totalDebt;
uint256 reserveFactor;
address reserve;
// @notice DEPRECATED in 3.4, but kept for backwards compatibility
bool usingVirtualBalance;
uint256 virtualUnderlyingBalance;
}
struct InitReserveParams {
address asset;
address aTokenAddress;
address variableDebtAddress;
uint16 reservesCount;
uint16 maxNumberReserves;
}
}
lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/treasury/ICollector.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IERC20} from 'openzeppelin-contracts/contracts/token/ERC20/IERC20.sol';
interface ICollector {
struct Stream {
uint256 deposit;
uint256 ratePerSecond;
uint256 remainingBalance;
uint256 startTime;
uint256 stopTime;
address recipient;
address sender;
address tokenAddress;
bool isEntity;
}
/**
* @dev Withdraw amount exceeds available balance
*/
error BalanceExceeded();
/**
* @dev Deposit smaller than time delta
*/
error DepositSmallerTimeDelta();
/**
* @dev Deposit not multiple of time delta
*/
error DepositNotMultipleTimeDelta();
/**
* @dev Recipient cannot be the contract itself or msg.sender
*/
error InvalidRecipient();
/**
* @dev Start time cannot be before block.timestamp
*/
error InvalidStartTime();
/**
* @dev Stop time must be greater than startTime
*/
error InvalidStopTime();
/**
* @dev Provided address cannot be the zero-address
*/
error InvalidZeroAddress();
/**
* @dev Amount cannot be zero
*/
error InvalidZeroAmount();
/**
* @dev Only caller with FUNDS_ADMIN role can call
*/
error OnlyFundsAdmin();
/**
* @dev Only caller with FUNDS_ADMIN role or stream recipient can call
*/
error OnlyFundsAdminOrRecipient();
/**
* @dev The provided ID does not belong to an existing stream
*/
error StreamDoesNotExist();
/** @notice Emitted when the new stream is created
* @param streamId The identifier of the stream.
* @param sender The address of the collector.
* @param recipient The address towards which the money is streamed.
* @param deposit The amount of money to be streamed.
* @param tokenAddress The ERC20 token to use as streaming currency.
* @param startTime The unix timestamp for when the stream starts.
* @param stopTime The unix timestamp for when the stream stops.
**/
event CreateStream(
uint256 indexed streamId,
address indexed sender,
address indexed recipient,
uint256 deposit,
address tokenAddress,
uint256 startTime,
uint256 stopTime
);
/**
* @notice Emmitted when withdraw happens from the contract to the recipient's account.
* @param streamId The id of the stream to withdraw tokens from.
* @param recipient The address towards which the money is streamed.
* @param amount The amount of tokens to withdraw.
*/
event WithdrawFromStream(uint256 indexed streamId, address indexed recipient, uint256 amount);
/**
* @notice Emmitted when the stream is canceled.
* @param streamId The id of the stream to withdraw tokens from.
* @param sender The address of the collector.
* @param recipient The address towards which the money is streamed.
* @param senderBalance The sender's balance at the moment of cancelling.
* @param recipientBalance The recipient's balance at the moment of cancelling.
*/
event CancelStream(
uint256 indexed streamId,
address indexed sender,
address indexed recipient,
uint256 senderBalance,
uint256 recipientBalance
);
/**
* @notice FUNDS_ADMIN role granted by ACL Manager
**/
function FUNDS_ADMIN_ROLE() external view returns (bytes32);
/** @notice Returns the mock ETH reference address
* @return address The address
**/
function ETH_MOCK_ADDRESS() external pure returns (address);
/**
* @notice Checks if address is funds admin
* @return bool If the address has the funds admin role
**/
function isFundsAdmin(address admin) external view returns (bool);
/**
* @notice Returns the available funds for the given stream id and address.
* @param streamId The id of the stream for which to query the balance.
* @param who The address for which to query the balance.
* @notice Returns the total funds allocated to `who` as uint256.
**/
function balanceOf(uint256 streamId, address who) external view returns (uint256 balance);
/**
* @dev Function for the funds admin to give ERC20 allowance to other parties
* @param token The address of the token to give allowance from
* @param recipient Allowance's recipient
* @param amount Allowance to approve
**/
function approve(IERC20 token, address recipient, uint256 amount) external;
/**
* @notice Function for the funds admin to transfer ERC20 tokens to other parties
* @param token The address of the token to transfer
* @param recipient Transfer's recipient
* @param amount Amount to transfer
**/
function transfer(IERC20 token, address recipient, uint256 amount) external;
/**
* @notice Creates a new stream funded by this contracts itself and paid towards `recipient`.
* @param recipient The address towards which the money is streamed.
* @param deposit The amount of money to be streamed.
* @param tokenAddress The ERC20 token to use as streaming currency.
* @param startTime The unix timestamp for when the stream starts.
* @param stopTime The unix timestamp for when the stream stops.
* @return streamId the uint256 id of the newly created stream.
*/
function createStream(
address recipient,
uint256 deposit,
address tokenAddress,
uint256 startTime,
uint256 stopTime
) external returns (uint256 streamId);
/**
* @notice Returns the stream with all its properties.
* @dev Throws if the id does not point to a valid stream.
* @param streamId The id of the stream to query.
* @notice Returns the stream object.
*/
function getStream(
uint256 streamId
)
external
view
returns (
address sender,
address recipient,
uint256 deposit,
address tokenAddress,
uint256 startTime,
uint256 stopTime,
uint256 remainingBalance,
uint256 ratePerSecond
);
/**
* @notice Withdraws from the contract to the recipient's account.
* @param streamId The id of the stream to withdraw tokens from.
* @param amount The amount of tokens to withdraw.
* @return bool Returns true if successful.
*/
function withdrawFromStream(uint256 streamId, uint256 amount) external returns (bool);
/**
* @notice Cancels the stream and transfers the tokens back on a pro rata basis.
* @param streamId The id of the stream to cancel.
* @return bool Returns true if successful.
*/
function cancelStream(uint256 streamId) external returns (bool);
/**
* @notice Returns the next available stream id
* @return nextStreamId Returns the stream id.
*/
function getNextStreamId() external view returns (uint256);
}
lib/aave-helpers/lib/aave-address-book/src/AaveV3.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;
import {DataTypes} from 'aave-v3-origin/contracts/protocol/libraries/types/DataTypes.sol';
import {Errors} from 'aave-v3-origin/contracts/protocol/libraries/helpers/Errors.sol';
import {ConfiguratorInputTypes} from 'aave-v3-origin/contracts/protocol/libraries/types/ConfiguratorInputTypes.sol';
import {IPoolAddressesProvider} from 'aave-v3-origin/contracts/interfaces/IPoolAddressesProvider.sol';
import {IAToken} from 'aave-v3-origin/contracts/interfaces/IAToken.sol';
import {IPool} from 'aave-v3-origin/contracts/interfaces/IPool.sol';
import {IPoolConfigurator} from 'aave-v3-origin/contracts/interfaces/IPoolConfigurator.sol';
import {IPriceOracleGetter} from 'aave-v3-origin/contracts/interfaces/IPriceOracleGetter.sol';
import {IAaveOracle} from 'aave-v3-origin/contracts/interfaces/IAaveOracle.sol';
import {IACLManager as BasicIACLManager} from 'aave-v3-origin/contracts/interfaces/IACLManager.sol';
import {IPoolDataProvider} from 'aave-v3-origin/contracts/interfaces/IPoolDataProvider.sol';
import {IDefaultInterestRateStrategyV2} from 'aave-v3-origin/contracts/interfaces/IDefaultInterestRateStrategyV2.sol';
import {IReserveInterestRateStrategy} from 'aave-v3-origin/contracts/interfaces/IReserveInterestRateStrategy.sol';
import {IPoolDataProvider as IAaveProtocolDataProvider} from 'aave-v3-origin/contracts/interfaces/IPoolDataProvider.sol';
import {AggregatorInterface} from 'aave-v3-origin/contracts/dependencies/chainlink/AggregatorInterface.sol';
import {ICollector} from 'aave-v3-origin/contracts/treasury/ICollector.sol';
interface IACLManager is BasicIACLManager {
function hasRole(bytes32 role, address account) external view returns (bool);
function DEFAULT_ADMIN_ROLE() external pure returns (bytes32);
function renounceRole(bytes32 role, address account) external;
function getRoleAdmin(bytes32 role) external view returns (bytes32);
function grantRole(bytes32 role, address account) external;
function revokeRole(bytes32 role, address account) external;
}
lib/aave-helpers/lib/aave-address-book/src/AaveV3Ethereum.sol
// AUTOGENERATED - MANUAL CHANGES WILL BE REVERTED BY THE GENERATOR
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;
import {IPoolAddressesProvider, IPool, IPoolConfigurator, IAaveOracle, IPoolDataProvider, IACLManager, ICollector} from './AaveV3.sol';
library AaveV3Ethereum {
// https://etherscan.io/address/0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e
IPoolAddressesProvider internal constant POOL_ADDRESSES_PROVIDER =
IPoolAddressesProvider(0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e);
// https://etherscan.io/address/0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2
IPool internal constant POOL = IPool(0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2);
// https://etherscan.io/address/0x64b761D848206f447Fe2dd461b0c635Ec39EbB27
IPoolConfigurator internal constant POOL_CONFIGURATOR =
IPoolConfigurator(0x64b761D848206f447Fe2dd461b0c635Ec39EbB27);
// https://etherscan.io/address/0x54586bE62E3c3580375aE3723C145253060Ca0C2
IAaveOracle internal constant ORACLE = IAaveOracle(0x54586bE62E3c3580375aE3723C145253060Ca0C2);
// https://etherscan.io/address/0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A
address internal constant ACL_ADMIN = 0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A;
// https://etherscan.io/address/0xc2aaCf6553D20d1e9d78E365AAba8032af9c85b0
IACLManager internal constant ACL_MANAGER =
IACLManager(0xc2aaCf6553D20d1e9d78E365AAba8032af9c85b0);
// https://etherscan.io/address/0x0a16f2FCC0D44FaE41cc54e079281D84A363bECD
IPoolDataProvider internal constant AAVE_PROTOCOL_DATA_PROVIDER =
IPoolDataProvider(0x0a16f2FCC0D44FaE41cc54e079281D84A363bECD);
// https://etherscan.io/address/0x4295Fe69b3e978Eb511e4558B4407AD871612fCb
address internal constant POOL_IMPL = 0x4295Fe69b3e978Eb511e4558B4407AD871612fCb;
// https://etherscan.io/address/0xFF42Ce30054dcE7dc7C1282a9a497aa58eaBCe99
address internal constant POOL_CONFIGURATOR_IMPL = 0xFF42Ce30054dcE7dc7C1282a9a497aa58eaBCe99;
// https://etherscan.io/address/0x8164Cc65827dcFe994AB23944CBC90e0aa80bFcb
address internal constant DEFAULT_INCENTIVES_CONTROLLER =
0x8164Cc65827dcFe994AB23944CBC90e0aa80bFcb;
// https://etherscan.io/address/0x223d844fc4B006D67c0cDbd39371A9F73f69d974
address internal constant EMISSION_MANAGER = 0x223d844fc4B006D67c0cDbd39371A9F73f69d974;
// https://etherscan.io/address/0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c
ICollector internal constant COLLECTOR = ICollector(0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c);
// https://etherscan.io/address/0xadC45Df3cf1584624C97338BEF33363BF5b97AdA
address internal constant DEFAULT_A_TOKEN_IMPL = 0xadC45Df3cf1584624C97338BEF33363BF5b97AdA;
// https://etherscan.io/address/0xb27C52c7f84819e3157993489741cB60786aE330
address internal constant DEFAULT_VARIABLE_DEBT_TOKEN_IMPL =
0xb27C52c7f84819e3157993489741cB60786aE330;
// https://etherscan.io/address/0x13a9CC64344b02bACC5AD9Cf38B5711F1B9ec3d4
address internal constant RISK_STEWARD = 0x13a9CC64344b02bACC5AD9Cf38B5711F1B9ec3d4;
// https://etherscan.io/address/0x47c71dFEB55Ebaa431Ae3fbF99Ea50e0D3d30fA8
address internal constant RISK_COUNCIL = 0x47c71dFEB55Ebaa431Ae3fbF99Ea50e0D3d30fA8;
// https://etherscan.io/address/0xd7852E139a7097E119623de0751AE53a61efb442
address internal constant DEBT_SWAP_ADAPTER = 0xd7852E139a7097E119623de0751AE53a61efb442;
// https://etherscan.io/address/0x21714092D90c7265F52fdfDae068EC11a23C6248
address internal constant DELEGATION_AWARE_A_TOKEN_IMPL_REV_1 =
0x21714092D90c7265F52fdfDae068EC11a23C6248;
// https://etherscan.io/address/0xEaFAeFa93c6aaBd5ab7E76F4c37Aebe9da1e8318
address internal constant CONFIG_ENGINE = 0xEaFAeFa93c6aaBd5ab7E76F4c37Aebe9da1e8318;
// https://etherscan.io/address/0xbaA999AC55EAce41CcAE355c77809e68Bb345170
address internal constant POOL_ADDRESSES_PROVIDER_REGISTRY =
0xbaA999AC55EAce41CcAE355c77809e68Bb345170;
// https://etherscan.io/address/0x35bb522b102326ea3F1141661dF4626C87000e3E
address internal constant REPAY_WITH_COLLATERAL_ADAPTER =
0x35bb522b102326ea3F1141661dF4626C87000e3E;
// https://etherscan.io/address/0x411D79b8cC43384FDE66CaBf9b6a17180c842511
address internal constant LEGACY_STATIC_A_TOKEN_FACTORY =
0x411D79b8cC43384FDE66CaBf9b6a17180c842511;
// https://etherscan.io/address/0xADC0A53095A0af87F3aa29FE0715B5c28016364e
address internal constant SWAP_COLLATERAL_ADAPTER = 0xADC0A53095A0af87F3aa29FE0715B5c28016364e;
// https://etherscan.io/address/0xe3dFf4052F0bF6134ACb73bEaE8fe2317d71F047
address internal constant UI_INCENTIVE_DATA_PROVIDER = 0xe3dFf4052F0bF6134ACb73bEaE8fe2317d71F047;
// https://etherscan.io/address/0x2dAd8162A989cd99D673dE4425Bb2298Db1E1aA2
address internal constant UI_POOL_DATA_PROVIDER = 0x2dAd8162A989cd99D673dE4425Bb2298Db1E1aA2;
// https://etherscan.io/address/0xC7be5307ba715ce89b152f3Df0658295b3dbA8E2
address internal constant WALLET_BALANCE_PROVIDER = 0xC7be5307ba715ce89b152f3Df0658295b3dbA8E2;
// https://etherscan.io/address/0xd01607c3C5eCABa394D8be377a08590149325722
address internal constant WETH_GATEWAY = 0xd01607c3C5eCABa394D8be377a08590149325722;
// https://etherscan.io/address/0x78F8Bd884C3D738B74B420540659c82f392820e0
address internal constant WITHDRAW_SWAP_ADAPTER = 0x78F8Bd884C3D738B74B420540659c82f392820e0;
// https://etherscan.io/address/0xE28E2c8d240dd5eBd0adcab86fbD79df7a052034
address internal constant SAVINGS_DAI_TOKEN_WRAPPER = 0xE28E2c8d240dd5eBd0adcab86fbD79df7a052034;
// https://etherscan.io/address/0xCb0b5cA20b6C5C02A9A3B2cE433650768eD2974F
address internal constant STATA_FACTORY = 0xCb0b5cA20b6C5C02A9A3B2cE433650768eD2974F;
// https://etherscan.io/address/0x5513224daaEABCa31af5280727878d52097afA05
address internal constant GHO_DIRECT_MINTER = 0x5513224daaEABCa31af5280727878d52097afA05;
// https://etherscan.io/address/0x31a0Ba3C2242a095dBF58A7C53751eCBd27dBA9b
address internal constant DUST_BIN = 0x31a0Ba3C2242a095dBF58A7C53751eCBd27dBA9b;
// https://etherscan.io/address/0xf00E2de0E78DFf055A92AD4719a179CE275b6Ef7
address internal constant CLINIC_STEWARD = 0xf00E2de0E78DFf055A92AD4719a179CE275b6Ef7;
// https://etherscan.io/address/0x8b493f416F5F7933cC146b1899c069F2361cad60
address internal constant SVR_STEWARD = 0x8b493f416F5F7933cC146b1899c069F2361cad60;
// https://etherscan.io/address/0x22aC12a6937BBBC0a301AF9154d08EaD95673122
address internal constant POOL_EXPOSURE_STEWARD = 0x22aC12a6937BBBC0a301AF9154d08EaD95673122;
// https://etherscan.io/address/0x7ABB46C690C52E919687D19ebF89C81A6136C1F2
address internal constant EDGE_RISK_ORACLE = 0x7ABB46C690C52E919687D19ebF89C81A6136C1F2;
// https://etherscan.io/address/0xf721bE7AA57a987F3e4D05DAc6fcb5aBF9F7cE9A
address internal constant EDGE_RISK_STEWARD_PENDLE_EMODE =
0xf721bE7AA57a987F3e4D05DAc6fcb5aBF9F7cE9A;
// https://etherscan.io/address/0x9F76954f5b55B4908d178f31C07F9537AC8328E7
address internal constant EDGE_RISK_STEWARD_DISCOUNT_RATE =
0x9F76954f5b55B4908d178f31C07F9537AC8328E7;
// https://etherscan.io/address/0x83ab600cE8a61b43e1757b89C0589928f765c1C4
address internal constant EDGE_INJECTOR_PENDLE_EMODE = 0x83ab600cE8a61b43e1757b89C0589928f765c1C4;
// https://etherscan.io/address/0x15885A83936EB943e98EeFFb91e9A49040d93993
address internal constant EDGE_INJECTOR_DISCOUNT_RATE =
0x15885A83936EB943e98EeFFb91e9A49040d93993;
// https://etherscan.io/address/0x80CFd14236409107c220d1D0a3dE845b48fdcDfc
address internal constant EDGE_RISK_STEWARD_RATES = 0x80CFd14236409107c220d1D0a3dE845b48fdcDfc;
// https://etherscan.io/address/0x74dc6321A338420238CBD77abA5fEa8679393A66
address internal constant EDGE_INJECTOR_RATES = 0x74dc6321A338420238CBD77abA5fEa8679393A66;
// https://etherscan.io/address/0xb7D402138Cb01BfE97d95181C849379d6AD14d19
address internal constant COLLECTOR_SWAP_STEWARD = 0xb7D402138Cb01BfE97d95181C849379d6AD14d19;
// https://etherscan.io/address/0xD2CC30cB0e77B80a34b879ccB6da67799e4ecD83
address internal constant COW_ADAPTER_FACTORY = 0xD2CC30cB0e77B80a34b879ccB6da67799e4ecD83;
// https://etherscan.io/address/0xa1138627412212e53C208e220696f14b0185a82c
address internal constant COW_COLLATERAL_SWAP_ADAPTER =
0xa1138627412212e53C208e220696f14b0185a82c;
// https://etherscan.io/address/0xC898f87b572018ED25F501FFD620894a32dCa1AC
address internal constant COW_DEBT_SWAP_ADAPTER = 0xC898f87b572018ED25F501FFD620894a32dCa1AC;
// https://etherscan.io/address/0x4AE46995af9ED4f4EdFC6FF1523b114EE4D7053a
address internal constant COW_REPAY_WITH_COLLATERAL_ADAPTER =
0x4AE46995af9ED4f4EdFC6FF1523b114EE4D7053a;
// https://etherscan.io/address/0xaEE8B0666BF8a584e9D67bFaa65007E74c70b26a
address internal constant COW_LEVERAGE_ADAPTER = 0xaEE8B0666BF8a584e9D67bFaa65007E74c70b26a;
}
library AaveV3EthereumAssets {
// https://etherscan.io/address/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
address internal constant WETH_UNDERLYING = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
uint8 internal constant WETH_DECIMALS = 18;
// https://etherscan.io/address/0x4d5F47FA6A74757f35C14fD3a6Ef8E3C9BC514E8
address internal constant WETH_A_TOKEN = 0x4d5F47FA6A74757f35C14fD3a6Ef8E3C9BC514E8;
// https://etherscan.io/address/0xeA51d7853EEFb32b6ee06b1C12E6dcCA88Be0fFE
address internal constant WETH_V_TOKEN = 0xeA51d7853EEFb32b6ee06b1C12E6dcCA88Be0fFE;
// https://etherscan.io/address/0x5424384B256154046E9667dDFaaa5e550145215e
address internal constant WETH_ORACLE = 0x5424384B256154046E9667dDFaaa5e550145215e;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant WETH_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x252231882FB38481497f3C767469106297c8d93b
address internal constant WETH_STATIC_A_TOKEN = 0x252231882FB38481497f3C767469106297c8d93b;
// https://etherscan.io/address/0x0bfc9d54Fc184518A81162F8fB99c2eACa081202
address internal constant WETH_STATA_TOKEN = 0x0bfc9d54Fc184518A81162F8fB99c2eACa081202;
// https://etherscan.io/address/0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0
address internal constant wstETH_UNDERLYING = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0;
uint8 internal constant wstETH_DECIMALS = 18;
// https://etherscan.io/address/0x0B925eD163218f6662a35e0f0371Ac234f9E9371
address internal constant wstETH_A_TOKEN = 0x0B925eD163218f6662a35e0f0371Ac234f9E9371;
// https://etherscan.io/address/0xC96113eED8cAB59cD8A66813bCB0cEb29F06D2e4
address internal constant wstETH_V_TOKEN = 0xC96113eED8cAB59cD8A66813bCB0cEb29F06D2e4;
// https://etherscan.io/address/0xe1D97bF61901B075E9626c8A2340a7De385861Ef
address internal constant wstETH_ORACLE = 0xe1D97bF61901B075E9626c8A2340a7De385861Ef;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant wstETH_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x322AA5F5Be95644d6c36544B6c5061F072D16DF5
address internal constant wstETH_STATIC_A_TOKEN = 0x322AA5F5Be95644d6c36544B6c5061F072D16DF5;
// https://etherscan.io/address/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599
address internal constant WBTC_UNDERLYING = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599;
uint8 internal constant WBTC_DECIMALS = 8;
// https://etherscan.io/address/0x5Ee5bf7ae06D1Be5997A1A72006FE6C607eC6DE8
address internal constant WBTC_A_TOKEN = 0x5Ee5bf7ae06D1Be5997A1A72006FE6C607eC6DE8;
// https://etherscan.io/address/0x40aAbEf1aa8f0eEc637E0E7d92fbfFB2F26A8b7B
address internal constant WBTC_V_TOKEN = 0x40aAbEf1aa8f0eEc637E0E7d92fbfFB2F26A8b7B;
// https://etherscan.io/address/0xDaa4B74C6bAc4e25188e64ebc68DB5050b690cAc
address internal constant WBTC_ORACLE = 0xDaa4B74C6bAc4e25188e64ebc68DB5050b690cAc;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant WBTC_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xB07E357cc262E92eee03D8B81464D596B258eA7a
address internal constant WBTC_STATIC_A_TOKEN = 0xB07E357cc262E92eee03D8B81464D596B258eA7a;
// https://etherscan.io/address/0x2A5D51e22A8010701674E0c3D45E9aCf7b9C8a62
address internal constant WBTC_STATA_TOKEN = 0x2A5D51e22A8010701674E0c3D45E9aCf7b9C8a62;
// https://etherscan.io/address/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
address internal constant USDC_UNDERLYING = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
uint8 internal constant USDC_DECIMALS = 6;
// https://etherscan.io/address/0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c
address internal constant USDC_A_TOKEN = 0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c;
// https://etherscan.io/address/0x72E95b8931767C79bA4EeE721354d6E99a61D004
address internal constant USDC_V_TOKEN = 0x72E95b8931767C79bA4EeE721354d6E99a61D004;
// https://etherscan.io/address/0x3f73F03aa83B2A48ed27E964eD0fDb590332095B
address internal constant USDC_ORACLE = 0x3f73F03aa83B2A48ed27E964eD0fDb590332095B;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant USDC_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x73edDFa87C71ADdC275c2b9890f5c3a8480bC9E6
address internal constant USDC_STATIC_A_TOKEN = 0x73edDFa87C71ADdC275c2b9890f5c3a8480bC9E6;
// https://etherscan.io/address/0xD4fa2D31b7968E448877f69A96DE69f5de8cD23E
address internal constant USDC_STATA_TOKEN = 0xD4fa2D31b7968E448877f69A96DE69f5de8cD23E;
// https://etherscan.io/address/0x6B175474E89094C44Da98b954EedeAC495271d0F
address internal constant DAI_UNDERLYING = 0x6B175474E89094C44Da98b954EedeAC495271d0F;
uint8 internal constant DAI_DECIMALS = 18;
// https://etherscan.io/address/0x018008bfb33d285247A21d44E50697654f754e63
address internal constant DAI_A_TOKEN = 0x018008bfb33d285247A21d44E50697654f754e63;
// https://etherscan.io/address/0xcF8d0c70c850859266f5C338b38F9D663181C314
address internal constant DAI_V_TOKEN = 0xcF8d0c70c850859266f5C338b38F9D663181C314;
// https://etherscan.io/address/0x5c66322CA59bB61e867B28195576DbD8dA4b08dE
address internal constant DAI_ORACLE = 0x5c66322CA59bB61e867B28195576DbD8dA4b08dE;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant DAI_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xaf270C38fF895EA3f95Ed488CEACe2386F038249
address internal constant DAI_STATIC_A_TOKEN = 0xaf270C38fF895EA3f95Ed488CEACe2386F038249;
// https://etherscan.io/address/0x5caF5a86f39073637Ac7c8A7b5290871de80cb9b
address internal constant DAI_STATA_TOKEN = 0x5caF5a86f39073637Ac7c8A7b5290871de80cb9b;
// https://etherscan.io/address/0x514910771AF9Ca656af840dff83E8264EcF986CA
address internal constant LINK_UNDERLYING = 0x514910771AF9Ca656af840dff83E8264EcF986CA;
uint8 internal constant LINK_DECIMALS = 18;
// https://etherscan.io/address/0x5E8C8A7243651DB1384C0dDfDbE39761E8e7E51a
address internal constant LINK_A_TOKEN = 0x5E8C8A7243651DB1384C0dDfDbE39761E8e7E51a;
// https://etherscan.io/address/0x4228F8895C7dDA20227F6a5c6751b8Ebf19a6ba8
address internal constant LINK_V_TOKEN = 0x4228F8895C7dDA20227F6a5c6751b8Ebf19a6ba8;
// https://etherscan.io/address/0xC7e9b623ed51F033b32AE7f1282b1AD62C28C183
address internal constant LINK_ORACLE = 0xC7e9b623ed51F033b32AE7f1282b1AD62C28C183;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant LINK_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x57bd8C73838d1781b4f6E0d5Cf89eb676488d3df
address internal constant LINK_STATIC_A_TOKEN = 0x57bd8C73838d1781b4f6E0d5Cf89eb676488d3df;
// https://etherscan.io/address/0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9
address internal constant AAVE_UNDERLYING = 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9;
uint8 internal constant AAVE_DECIMALS = 18;
// https://etherscan.io/address/0xA700b4eB416Be35b2911fd5Dee80678ff64fF6C9
address internal constant AAVE_A_TOKEN = 0xA700b4eB416Be35b2911fd5Dee80678ff64fF6C9;
// https://etherscan.io/address/0xBae535520Abd9f8C85E58929e0006A2c8B372F74
address internal constant AAVE_V_TOKEN = 0xBae535520Abd9f8C85E58929e0006A2c8B372F74;
// https://etherscan.io/address/0xF02C1e2A3B77c1cacC72f72B44f7d0a4c62e4a85
address internal constant AAVE_ORACLE = 0xF02C1e2A3B77c1cacC72f72B44f7d0a4c62e4a85;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant AAVE_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xFEB859A50f92C6D5ad7C9eF7C2c060D164B3280f
address internal constant AAVE_STATIC_A_TOKEN = 0xFEB859A50f92C6D5ad7C9eF7C2c060D164B3280f;
// https://etherscan.io/address/0xBe9895146f7AF43049ca1c1AE358B0541Ea49704
address internal constant cbETH_UNDERLYING = 0xBe9895146f7AF43049ca1c1AE358B0541Ea49704;
uint8 internal constant cbETH_DECIMALS = 18;
// https://etherscan.io/address/0x977b6fc5dE62598B08C85AC8Cf2b745874E8b78c
address internal constant cbETH_A_TOKEN = 0x977b6fc5dE62598B08C85AC8Cf2b745874E8b78c;
// https://etherscan.io/address/0x0c91bcA95b5FE69164cE583A2ec9429A569798Ed
address internal constant cbETH_V_TOKEN = 0x0c91bcA95b5FE69164cE583A2ec9429A569798Ed;
// https://etherscan.io/address/0x889399C34461b25d70d43931e6cE9E40280E617B
address internal constant cbETH_ORACLE = 0x889399C34461b25d70d43931e6cE9E40280E617B;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant cbETH_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xe2a6863C8f043457B497667Ef3c43073e2D69089
address internal constant cbETH_STATIC_A_TOKEN = 0xe2a6863C8f043457B497667Ef3c43073e2D69089;
// https://etherscan.io/address/0xdAC17F958D2ee523a2206206994597C13D831ec7
address internal constant USDT_UNDERLYING = 0xdAC17F958D2ee523a2206206994597C13D831ec7;
uint8 internal constant USDT_DECIMALS = 6;
// https://etherscan.io/address/0x23878914EFE38d27C4D67Ab83ed1b93A74D4086a
address internal constant USDT_A_TOKEN = 0x23878914EFE38d27C4D67Ab83ed1b93A74D4086a;
// https://etherscan.io/address/0x6df1C1E379bC5a00a7b4C6e67A203333772f45A8
address internal constant USDT_V_TOKEN = 0x6df1C1E379bC5a00a7b4C6e67A203333772f45A8;
// https://etherscan.io/address/0x260326c220E469358846b187eE53328303Efe19C
address internal constant USDT_ORACLE = 0x260326c220E469358846b187eE53328303Efe19C;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant USDT_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x862c57d48becB45583AEbA3f489696D22466Ca1b
address internal constant USDT_STATIC_A_TOKEN = 0x862c57d48becB45583AEbA3f489696D22466Ca1b;
// https://etherscan.io/address/0x7Bc3485026Ac48b6cf9BaF0A377477Fff5703Af8
address internal constant USDT_STATA_TOKEN = 0x7Bc3485026Ac48b6cf9BaF0A377477Fff5703Af8;
// https://etherscan.io/address/0xae78736Cd615f374D3085123A210448E74Fc6393
address internal constant rETH_UNDERLYING = 0xae78736Cd615f374D3085123A210448E74Fc6393;
uint8 internal constant rETH_DECIMALS = 18;
// https://etherscan.io/address/0xCc9EE9483f662091a1de4795249E24aC0aC2630f
address internal constant rETH_A_TOKEN = 0xCc9EE9483f662091a1de4795249E24aC0aC2630f;
// https://etherscan.io/address/0xae8593DD575FE29A9745056aA91C4b746eee62C8
address internal constant rETH_V_TOKEN = 0xae8593DD575FE29A9745056aA91C4b746eee62C8;
// https://etherscan.io/address/0x6929706c42d637DF5Ebf7F0BcfF2aF47F84Ea69D
address internal constant rETH_ORACLE = 0x6929706c42d637DF5Ebf7F0BcfF2aF47F84Ea69D;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant rETH_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x867Cf025B5dA438c4e215c60B59bBB3aFe896Fda
address internal constant rETH_STATIC_A_TOKEN = 0x867Cf025B5dA438c4e215c60B59bBB3aFe896Fda;
// https://etherscan.io/address/0x5f98805A4E8be255a32880FDeC7F6728C6568bA0
address internal constant LUSD_UNDERLYING = 0x5f98805A4E8be255a32880FDeC7F6728C6568bA0;
uint8 internal constant LUSD_DECIMALS = 18;
// https://etherscan.io/address/0x3Fe6a295459FAe07DF8A0ceCC36F37160FE86AA9
address internal constant LUSD_A_TOKEN = 0x3Fe6a295459FAe07DF8A0ceCC36F37160FE86AA9;
// https://etherscan.io/address/0x33652e48e4B74D18520f11BfE58Edd2ED2cEc5A2
address internal constant LUSD_V_TOKEN = 0x33652e48e4B74D18520f11BfE58Edd2ED2cEc5A2;
// https://etherscan.io/address/0xc6E7e1ff334313CeBDe98b7a8A487119CFb6e654
address internal constant LUSD_ORACLE = 0xc6E7e1ff334313CeBDe98b7a8A487119CFb6e654;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant LUSD_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xDBf5E36569798D1E39eE9d7B1c61A7409a74F23A
address internal constant LUSD_STATIC_A_TOKEN = 0xDBf5E36569798D1E39eE9d7B1c61A7409a74F23A;
// https://etherscan.io/address/0xD533a949740bb3306d119CC777fa900bA034cd52
address internal constant CRV_UNDERLYING = 0xD533a949740bb3306d119CC777fa900bA034cd52;
uint8 internal constant CRV_DECIMALS = 18;
// https://etherscan.io/address/0x7B95Ec873268a6BFC6427e7a28e396Db9D0ebc65
address internal constant CRV_A_TOKEN = 0x7B95Ec873268a6BFC6427e7a28e396Db9D0ebc65;
// https://etherscan.io/address/0x1b7D3F4b3c032a5AE656e30eeA4e8E1Ba376068F
address internal constant CRV_V_TOKEN = 0x1b7D3F4b3c032a5AE656e30eeA4e8E1Ba376068F;
// https://etherscan.io/address/0xCd627aA160A6fA45Eb793D19Ef54f5062F20f33f
address internal constant CRV_ORACLE = 0xCd627aA160A6fA45Eb793D19Ef54f5062F20f33f;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant CRV_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x149EE12310D499F701B6A5714eDAd2C832008fd2
address internal constant CRV_STATIC_A_TOKEN = 0x149EE12310D499F701B6A5714eDAd2C832008fd2;
// https://etherscan.io/address/0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2
address internal constant MKR_UNDERLYING = 0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2;
uint8 internal constant MKR_DECIMALS = 18;
// https://etherscan.io/address/0x8A458A9dc9048e005d22849F470891b840296619
address internal constant MKR_A_TOKEN = 0x8A458A9dc9048e005d22849F470891b840296619;
// https://etherscan.io/address/0x6Efc73E54E41b27d2134fF9f98F15550f30DF9B1
address internal constant MKR_V_TOKEN = 0x6Efc73E54E41b27d2134fF9f98F15550f30DF9B1;
// https://etherscan.io/address/0x44Bb2a64bAf94210B583338D3D97b1e8288Bd478
address internal constant MKR_ORACLE = 0x44Bb2a64bAf94210B583338D3D97b1e8288Bd478;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant MKR_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F
address internal constant SNX_UNDERLYING = 0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F;
uint8 internal constant SNX_DECIMALS = 18;
// https://etherscan.io/address/0xC7B4c17861357B8ABB91F25581E7263E08DCB59c
address internal constant SNX_A_TOKEN = 0xC7B4c17861357B8ABB91F25581E7263E08DCB59c;
// https://etherscan.io/address/0x8d0de040e8aAd872eC3c33A3776dE9152D3c34ca
address internal constant SNX_V_TOKEN = 0x8d0de040e8aAd872eC3c33A3776dE9152D3c34ca;
// https://etherscan.io/address/0xDC3EA94CD0AC27d9A86C180091e7f78C683d3699
address internal constant SNX_ORACLE = 0xDC3EA94CD0AC27d9A86C180091e7f78C683d3699;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant SNX_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xaECEbdfE454d869A626cAb38226C52a1575D1866
address internal constant SNX_STATIC_A_TOKEN = 0xaECEbdfE454d869A626cAb38226C52a1575D1866;
// https://etherscan.io/address/0xba100000625a3754423978a60c9317c58a424e3D
address internal constant BAL_UNDERLYING = 0xba100000625a3754423978a60c9317c58a424e3D;
uint8 internal constant BAL_DECIMALS = 18;
// https://etherscan.io/address/0x2516E7B3F76294e03C42AA4c5b5b4DCE9C436fB8
address internal constant BAL_A_TOKEN = 0x2516E7B3F76294e03C42AA4c5b5b4DCE9C436fB8;
// https://etherscan.io/address/0x3D3efceb4Ff0966D34d9545D3A2fa2dcdBf451f2
address internal constant BAL_V_TOKEN = 0x3D3efceb4Ff0966D34d9545D3A2fa2dcdBf451f2;
// https://etherscan.io/address/0xfFa88E79E6be7AB1048F44112f56C8F1Cfc33F66
address internal constant BAL_ORACLE = 0xfFa88E79E6be7AB1048F44112f56C8F1Cfc33F66;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant BAL_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984
address internal constant UNI_UNDERLYING = 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984;
uint8 internal constant UNI_DECIMALS = 18;
// https://etherscan.io/address/0xF6D2224916DDFbbab6e6bd0D1B7034f4Ae0CaB18
address internal constant UNI_A_TOKEN = 0xF6D2224916DDFbbab6e6bd0D1B7034f4Ae0CaB18;
// https://etherscan.io/address/0xF64178Ebd2E2719F2B1233bCb5Ef6DB4bCc4d09a
address internal constant UNI_V_TOKEN = 0xF64178Ebd2E2719F2B1233bCb5Ef6DB4bCc4d09a;
// https://etherscan.io/address/0x553303d460EE0afB37EdFf9bE42922D8FF63220e
address internal constant UNI_ORACLE = 0x553303d460EE0afB37EdFf9bE42922D8FF63220e;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant UNI_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x78fb5E79D5cb59729D0cd72bEA7879aD2683454D
address internal constant UNI_STATIC_A_TOKEN = 0x78fb5E79D5cb59729D0cd72bEA7879aD2683454D;
// https://etherscan.io/address/0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32
address internal constant LDO_UNDERLYING = 0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32;
uint8 internal constant LDO_DECIMALS = 18;
// https://etherscan.io/address/0x9A44fd41566876A39655f74971a3A6eA0a17a454
address internal constant LDO_A_TOKEN = 0x9A44fd41566876A39655f74971a3A6eA0a17a454;
// https://etherscan.io/address/0xc30808705C01289A3D306ca9CAB081Ba9114eC82
address internal constant LDO_V_TOKEN = 0xc30808705C01289A3D306ca9CAB081Ba9114eC82;
// https://etherscan.io/address/0xb01e6C9af83879B8e06a092f0DD94309c0D497E4
address internal constant LDO_ORACLE = 0xb01e6C9af83879B8e06a092f0DD94309c0D497E4;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant LDO_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x1eA6E1ba21601258401d0B9DB24eA0a07948458e
address internal constant LDO_STATIC_A_TOKEN = 0x1eA6E1ba21601258401d0B9DB24eA0a07948458e;
// https://etherscan.io/address/0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72
address internal constant ENS_UNDERLYING = 0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72;
uint8 internal constant ENS_DECIMALS = 18;
// https://etherscan.io/address/0x545bD6c032eFdde65A377A6719DEF2796C8E0f2e
address internal constant ENS_A_TOKEN = 0x545bD6c032eFdde65A377A6719DEF2796C8E0f2e;
// https://etherscan.io/address/0xd180D7fdD4092f07428eFE801E17BC03576b3192
address internal constant ENS_V_TOKEN = 0xd180D7fdD4092f07428eFE801E17BC03576b3192;
// https://etherscan.io/address/0x5C00128d4d1c2F4f652C267d7bcdD7aC99C16E16
address internal constant ENS_ORACLE = 0x5C00128d4d1c2F4f652C267d7bcdD7aC99C16E16;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant ENS_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x2767C27Eeaf3566082E74b963B6A0f5c9a46C8a1
address internal constant ENS_STATIC_A_TOKEN = 0x2767C27Eeaf3566082E74b963B6A0f5c9a46C8a1;
// https://etherscan.io/address/0x111111111117dC0aa78b770fA6A738034120C302
address internal constant ONE_INCH_UNDERLYING = 0x111111111117dC0aa78b770fA6A738034120C302;
uint8 internal constant ONE_INCH_DECIMALS = 18;
// https://etherscan.io/address/0x71Aef7b30728b9BB371578f36c5A1f1502a5723e
address internal constant ONE_INCH_A_TOKEN = 0x71Aef7b30728b9BB371578f36c5A1f1502a5723e;
// https://etherscan.io/address/0xA38fCa8c6Bf9BdA52E76EB78f08CaA3BE7c5A970
address internal constant ONE_INCH_V_TOKEN = 0xA38fCa8c6Bf9BdA52E76EB78f08CaA3BE7c5A970;
// https://etherscan.io/address/0xc929ad75B72593967DE83E7F7Cda0493458261D9
address internal constant ONE_INCH_ORACLE = 0xc929ad75B72593967DE83E7F7Cda0493458261D9;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant ONE_INCH_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xB490fF18e55b8881C9527FE7E358dd363780449F
address internal constant ONE_INCH_STATIC_A_TOKEN = 0xB490fF18e55b8881C9527FE7E358dd363780449F;
// https://etherscan.io/address/0x853d955aCEf822Db058eb8505911ED77F175b99e
address internal constant FRAX_UNDERLYING = 0x853d955aCEf822Db058eb8505911ED77F175b99e;
uint8 internal constant FRAX_DECIMALS = 18;
// https://etherscan.io/address/0xd4e245848d6E1220DBE62e155d89fa327E43CB06
address internal constant FRAX_A_TOKEN = 0xd4e245848d6E1220DBE62e155d89fa327E43CB06;
// https://etherscan.io/address/0x88B8358F5BC87c2D7E116cCA5b65A9eEb2c5EA3F
address internal constant FRAX_V_TOKEN = 0x88B8358F5BC87c2D7E116cCA5b65A9eEb2c5EA3F;
// https://etherscan.io/address/0xE7A4a6fCB1E7d5052e64E70aEd37b0fD2548bAE7
address internal constant FRAX_ORACLE = 0xE7A4a6fCB1E7d5052e64E70aEd37b0fD2548bAE7;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant FRAX_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xEE66abD4D0f9908A48E08AE354B0f425De3e237E
address internal constant FRAX_STATIC_A_TOKEN = 0xEE66abD4D0f9908A48E08AE354B0f425De3e237E;
// https://etherscan.io/address/0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f
address internal constant GHO_UNDERLYING = 0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f;
uint8 internal constant GHO_DECIMALS = 18;
// https://etherscan.io/address/0x00907f9921424583e7ffBfEdf84F92B7B2Be4977
address internal constant GHO_A_TOKEN = 0x00907f9921424583e7ffBfEdf84F92B7B2Be4977;
// https://etherscan.io/address/0x786dBff3f1292ae8F92ea68Cf93c30b34B1ed04B
address internal constant GHO_V_TOKEN = 0x786dBff3f1292ae8F92ea68Cf93c30b34B1ed04B;
// https://etherscan.io/address/0xD110cac5d8682A3b045D5524a9903E031d70FCCd
address internal constant GHO_ORACLE = 0xD110cac5d8682A3b045D5524a9903E031d70FCCd;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant GHO_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x048459E4fb3402e58d8900aF7283Ad574B91d742
address internal constant GHO_STATIC_A_TOKEN = 0x048459E4fb3402e58d8900aF7283Ad574B91d742;
// https://etherscan.io/address/0xD33526068D116cE69F19A9ee46F0bd304F21A51f
address internal constant RPL_UNDERLYING = 0xD33526068D116cE69F19A9ee46F0bd304F21A51f;
uint8 internal constant RPL_DECIMALS = 18;
// https://etherscan.io/address/0xB76CF92076adBF1D9C39294FA8e7A67579FDe357
address internal constant RPL_A_TOKEN = 0xB76CF92076adBF1D9C39294FA8e7A67579FDe357;
// https://etherscan.io/address/0x8988ECA19D502fd8b9CCd03fA3bD20a6f599bc2A
address internal constant RPL_V_TOKEN = 0x8988ECA19D502fd8b9CCd03fA3bD20a6f599bc2A;
// https://etherscan.io/address/0x3455c45D29f022Ba9367c2c2Ad95432A5d1E9Ed0
address internal constant RPL_ORACLE = 0x3455c45D29f022Ba9367c2c2Ad95432A5d1E9Ed0;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant RPL_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x95EF7cb3494e65dA4926bA330dBf540a13afFD17
address internal constant RPL_STATIC_A_TOKEN = 0x95EF7cb3494e65dA4926bA330dBf540a13afFD17;
// https://etherscan.io/address/0x91ad1f5443cF356010D2171D6D26B11C309c4b16
address internal constant RPL_STATA_TOKEN = 0x91ad1f5443cF356010D2171D6D26B11C309c4b16;
// https://etherscan.io/address/0x83F20F44975D03b1b09e64809B757c47f942BEeA
address internal constant sDAI_UNDERLYING = 0x83F20F44975D03b1b09e64809B757c47f942BEeA;
uint8 internal constant sDAI_DECIMALS = 18;
// https://etherscan.io/address/0x4C612E3B15b96Ff9A6faED838F8d07d479a8dD4c
address internal constant sDAI_A_TOKEN = 0x4C612E3B15b96Ff9A6faED838F8d07d479a8dD4c;
// https://etherscan.io/address/0x8Db9D35e117d8b93C6Ca9b644b25BaD5d9908141
address internal constant sDAI_V_TOKEN = 0x8Db9D35e117d8b93C6Ca9b644b25BaD5d9908141;
// https://etherscan.io/address/0xf83B85205241c3BCCA0a09D32FaE65c16e0CF236
address internal constant sDAI_ORACLE = 0xf83B85205241c3BCCA0a09D32FaE65c16e0CF236;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant sDAI_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xFa7E3571786CE9489bBC58d9Cb8ecE8aAe6B56F3
address internal constant sDAI_STATIC_A_TOKEN = 0xFa7E3571786CE9489bBC58d9Cb8ecE8aAe6B56F3;
// https://etherscan.io/address/0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6
address internal constant STG_UNDERLYING = 0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6;
uint8 internal constant STG_DECIMALS = 18;
// https://etherscan.io/address/0x1bA9843bD4327c6c77011406dE5fA8749F7E3479
address internal constant STG_A_TOKEN = 0x1bA9843bD4327c6c77011406dE5fA8749F7E3479;
// https://etherscan.io/address/0x655568bDd6168325EC7e58Bf39b21A856F906Dc2
address internal constant STG_V_TOKEN = 0x655568bDd6168325EC7e58Bf39b21A856F906Dc2;
// https://etherscan.io/address/0x30efE459B6A08a8E92b41e0563bdB15a29DA377e
address internal constant STG_ORACLE = 0x30efE459B6A08a8E92b41e0563bdB15a29DA377e;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant STG_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202
address internal constant KNC_UNDERLYING = 0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202;
uint8 internal constant KNC_DECIMALS = 18;
// https://etherscan.io/address/0x5b502e3796385E1e9755d7043B9C945C3aCCeC9C
address internal constant KNC_A_TOKEN = 0x5b502e3796385E1e9755d7043B9C945C3aCCeC9C;
// https://etherscan.io/address/0x253127Ffc04981cEA8932F406710661c2f2c3fD2
address internal constant KNC_V_TOKEN = 0x253127Ffc04981cEA8932F406710661c2f2c3fD2;
// https://etherscan.io/address/0xfbBa1Fd5dFce36860e46738dc9b83bb0A99551e2
address internal constant KNC_ORACLE = 0xfbBa1Fd5dFce36860e46738dc9b83bb0A99551e2;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant KNC_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0
address internal constant FXS_UNDERLYING = 0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0;
uint8 internal constant FXS_DECIMALS = 18;
// https://etherscan.io/address/0x82F9c5ad306BBa1AD0De49bB5FA6F01bf61085ef
address internal constant FXS_A_TOKEN = 0x82F9c5ad306BBa1AD0De49bB5FA6F01bf61085ef;
// https://etherscan.io/address/0x68e9f0aD4e6f8F5DB70F6923d4d6d5b225B83b16
address internal constant FXS_V_TOKEN = 0x68e9f0aD4e6f8F5DB70F6923d4d6d5b225B83b16;
// https://etherscan.io/address/0x4124b23341FcEa31CF098FE9d801D59BB9F4B3F7
address internal constant FXS_ORACLE = 0x4124b23341FcEa31CF098FE9d801D59BB9F4B3F7;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant FXS_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E
address internal constant crvUSD_UNDERLYING = 0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E;
uint8 internal constant crvUSD_DECIMALS = 18;
// https://etherscan.io/address/0xb82fa9f31612989525992FCfBB09AB22Eff5c85A
address internal constant crvUSD_A_TOKEN = 0xb82fa9f31612989525992FCfBB09AB22Eff5c85A;
// https://etherscan.io/address/0x028f7886F3e937f8479efaD64f31B3fE1119857a
address internal constant crvUSD_V_TOKEN = 0x028f7886F3e937f8479efaD64f31B3fE1119857a;
// https://etherscan.io/address/0x9Dc30dc58c72f5B669aEa01d02A2e4da194eE893
address internal constant crvUSD_ORACLE = 0x9Dc30dc58c72f5B669aEa01d02A2e4da194eE893;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant crvUSD_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x848107491E029AFDe0AC543779c7790382f15929
address internal constant crvUSD_STATIC_A_TOKEN = 0x848107491E029AFDe0AC543779c7790382f15929;
// https://etherscan.io/address/0x6c3ea9036406852006290770BEdFcAbA0e23A0e8
address internal constant PYUSD_UNDERLYING = 0x6c3ea9036406852006290770BEdFcAbA0e23A0e8;
uint8 internal constant PYUSD_DECIMALS = 6;
// https://etherscan.io/address/0x0C0d01AbF3e6aDfcA0989eBbA9d6e85dD58EaB1E
address internal constant PYUSD_A_TOKEN = 0x0C0d01AbF3e6aDfcA0989eBbA9d6e85dD58EaB1E;
// https://etherscan.io/address/0x57B67e4DE077085Fd0AF2174e9c14871BE664546
address internal constant PYUSD_V_TOKEN = 0x57B67e4DE077085Fd0AF2174e9c14871BE664546;
// https://etherscan.io/address/0x36964C0579D02E0a5AaAb89E24Cf8d7CDF3549EE
address internal constant PYUSD_ORACLE = 0x36964C0579D02E0a5AaAb89E24Cf8d7CDF3549EE;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PYUSD_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x00F2a835758B33f3aC53516Ebd69f3dc77B0D152
address internal constant PYUSD_STATIC_A_TOKEN = 0x00F2a835758B33f3aC53516Ebd69f3dc77B0D152;
// https://etherscan.io/address/0xb51EDdDD8c47856D81C8681EA71404Cec93E92c6
address internal constant PYUSD_STATA_TOKEN = 0xb51EDdDD8c47856D81C8681EA71404Cec93E92c6;
// https://etherscan.io/address/0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee
address internal constant weETH_UNDERLYING = 0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee;
uint8 internal constant weETH_DECIMALS = 18;
// https://etherscan.io/address/0xBdfa7b7893081B35Fb54027489e2Bc7A38275129
address internal constant weETH_A_TOKEN = 0xBdfa7b7893081B35Fb54027489e2Bc7A38275129;
// https://etherscan.io/address/0x77ad9BF13a52517AD698D65913e8D381300c8Bf3
address internal constant weETH_V_TOKEN = 0x77ad9BF13a52517AD698D65913e8D381300c8Bf3;
// https://etherscan.io/address/0x87625393534d5C102cADB66D37201dF24cc26d4C
address internal constant weETH_ORACLE = 0x87625393534d5C102cADB66D37201dF24cc26d4C;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant weETH_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x867b0CDC4B39a19945E616c29639b0390b39db3B
address internal constant weETH_STATIC_A_TOKEN = 0x867b0CDC4B39a19945E616c29639b0390b39db3B;
// https://etherscan.io/address/0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38
address internal constant osETH_UNDERLYING = 0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38;
uint8 internal constant osETH_DECIMALS = 18;
// https://etherscan.io/address/0x927709711794F3De5DdBF1D176bEE2D55Ba13c21
address internal constant osETH_A_TOKEN = 0x927709711794F3De5DdBF1D176bEE2D55Ba13c21;
// https://etherscan.io/address/0x8838eefF2af391863E1Bb8b1dF563F86743a8470
address internal constant osETH_V_TOKEN = 0x8838eefF2af391863E1Bb8b1dF563F86743a8470;
// https://etherscan.io/address/0x2b86D519eF34f8Adfc9349CDeA17c09Aa9dB60E2
address internal constant osETH_ORACLE = 0x2b86D519eF34f8Adfc9349CDeA17c09Aa9dB60E2;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant osETH_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xE5248968166206d14ab57345971E32facD839aDA
address internal constant osETH_STATIC_A_TOKEN = 0xE5248968166206d14ab57345971E32facD839aDA;
// https://etherscan.io/address/0x4c9EDD5852cd905f086C759E8383e09bff1E68B3
address internal constant USDe_UNDERLYING = 0x4c9EDD5852cd905f086C759E8383e09bff1E68B3;
uint8 internal constant USDe_DECIMALS = 18;
// https://etherscan.io/address/0x4F5923Fc5FD4a93352581b38B7cD26943012DECF
address internal constant USDe_A_TOKEN = 0x4F5923Fc5FD4a93352581b38B7cD26943012DECF;
// https://etherscan.io/address/0x015396E1F286289aE23a762088E863b3ec465145
address internal constant USDe_V_TOKEN = 0x015396E1F286289aE23a762088E863b3ec465145;
// https://etherscan.io/address/0xC26D4a1c46d884cfF6dE9800B6aE7A8Cf48B4Ff8
address internal constant USDe_ORACLE = 0xC26D4a1c46d884cfF6dE9800B6aE7A8Cf48B4Ff8;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant USDe_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x46e5d6A33C8Bd8eD38F3c95991C78C9B2FF3bC99
address internal constant USDe_STATIC_A_TOKEN = 0x46e5d6A33C8Bd8eD38F3c95991C78C9B2FF3bC99;
// https://etherscan.io/address/0x5F9D59db355b4A60501544637b00e94082cA575b
address internal constant USDe_STATA_TOKEN = 0x5F9D59db355b4A60501544637b00e94082cA575b;
// https://etherscan.io/address/0xA35b1B31Ce002FBF2058D22F30f95D405200A15b
address internal constant ETHx_UNDERLYING = 0xA35b1B31Ce002FBF2058D22F30f95D405200A15b;
uint8 internal constant ETHx_DECIMALS = 18;
// https://etherscan.io/address/0x1c0E06a0b1A4c160c17545FF2A951bfcA57C0002
address internal constant ETHx_A_TOKEN = 0x1c0E06a0b1A4c160c17545FF2A951bfcA57C0002;
// https://etherscan.io/address/0x08a8Dc81AeA67F84745623aC6c72CDA3967aab8b
address internal constant ETHx_V_TOKEN = 0x08a8Dc81AeA67F84745623aC6c72CDA3967aab8b;
// https://etherscan.io/address/0xd7b163B671f8cE9379DF8Ff7F75fA72Ccec1841c
address internal constant ETHx_ORACLE = 0xd7b163B671f8cE9379DF8Ff7F75fA72Ccec1841c;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant ETHx_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x7CC6694CF75C18D488d16FB4bf3c71A3B31cc7FB
address internal constant ETHx_STATIC_A_TOKEN = 0x7CC6694CF75C18D488d16FB4bf3c71A3B31cc7FB;
// https://etherscan.io/address/0x9D39A5DE30e57443BfF2A8307A4256c8797A3497
address internal constant sUSDe_UNDERLYING = 0x9D39A5DE30e57443BfF2A8307A4256c8797A3497;
uint8 internal constant sUSDe_DECIMALS = 18;
// https://etherscan.io/address/0x4579a27aF00A62C0EB156349f31B345c08386419
address internal constant sUSDe_A_TOKEN = 0x4579a27aF00A62C0EB156349f31B345c08386419;
// https://etherscan.io/address/0xeFFDE9BFA8EC77c14C364055a200746d6e12BeD6
address internal constant sUSDe_V_TOKEN = 0xeFFDE9BFA8EC77c14C364055a200746d6e12BeD6;
// https://etherscan.io/address/0x42bc86f2f08419280a99d8fbEa4672e7c30a86ec
address internal constant sUSDe_ORACLE = 0x42bc86f2f08419280a99d8fbEa4672e7c30a86ec;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant sUSDe_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x54D612b000697bd8B0094889D7d6A92bA0Bf2DEa
address internal constant sUSDe_STATIC_A_TOKEN = 0x54D612b000697bd8B0094889D7d6A92bA0Bf2DEa;
// https://etherscan.io/address/0x18084fbA666a33d37592fA2633fD49a74DD93a88
address internal constant tBTC_UNDERLYING = 0x18084fbA666a33d37592fA2633fD49a74DD93a88;
uint8 internal constant tBTC_DECIMALS = 18;
// https://etherscan.io/address/0x10Ac93971cdb1F5c778144084242374473c350Da
address internal constant tBTC_A_TOKEN = 0x10Ac93971cdb1F5c778144084242374473c350Da;
// https://etherscan.io/address/0xAC50890a80A2731eb1eA2e9B4F29569CeB06D960
address internal constant tBTC_V_TOKEN = 0xAC50890a80A2731eb1eA2e9B4F29569CeB06D960;
// https://etherscan.io/address/0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A
address internal constant tBTC_ORACLE = 0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant tBTC_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf
address internal constant cbBTC_UNDERLYING = 0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf;
uint8 internal constant cbBTC_DECIMALS = 8;
// https://etherscan.io/address/0x5c647cE0Ae10658ec44FA4E11A51c96e94efd1Dd
address internal constant cbBTC_A_TOKEN = 0x5c647cE0Ae10658ec44FA4E11A51c96e94efd1Dd;
// https://etherscan.io/address/0xeB284A70557EFe3591b9e6D9D720040E02c54a4d
address internal constant cbBTC_V_TOKEN = 0xeB284A70557EFe3591b9e6D9D720040E02c54a4d;
// https://etherscan.io/address/0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A
address internal constant cbBTC_ORACLE = 0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant cbBTC_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xdC035D45d973E3EC169d2276DDab16f1e407384F
address internal constant USDS_UNDERLYING = 0xdC035D45d973E3EC169d2276DDab16f1e407384F;
uint8 internal constant USDS_DECIMALS = 18;
// https://etherscan.io/address/0x32a6268f9Ba3642Dda7892aDd74f1D34469A4259
address internal constant USDS_A_TOKEN = 0x32a6268f9Ba3642Dda7892aDd74f1D34469A4259;
// https://etherscan.io/address/0x490E0E6255bF65b43E2e02F7acB783c5e04572Ff
address internal constant USDS_V_TOKEN = 0x490E0E6255bF65b43E2e02F7acB783c5e04572Ff;
// https://etherscan.io/address/0x94C7FD62fd0506e71d8142E9D36687fC72A86B02
address internal constant USDS_ORACLE = 0x94C7FD62fd0506e71d8142E9D36687fC72A86B02;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant USDS_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xb80B3215EA8183a064073f9892eb64236160a4dF
address internal constant USDS_STATA_TOKEN = 0xb80B3215EA8183a064073f9892eb64236160a4dF;
// https://etherscan.io/address/0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7
address internal constant rsETH_UNDERLYING = 0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7;
uint8 internal constant rsETH_DECIMALS = 18;
// https://etherscan.io/address/0x2D62109243b87C4bA3EE7bA1D91B0dD0A074d7b1
address internal constant rsETH_A_TOKEN = 0x2D62109243b87C4bA3EE7bA1D91B0dD0A074d7b1;
// https://etherscan.io/address/0x6De3E52A1B7294A34e271a508082b1Ff4a37E30e
address internal constant rsETH_V_TOKEN = 0x6De3E52A1B7294A34e271a508082b1Ff4a37E30e;
// https://etherscan.io/address/0x7292C95A5f6A501a9c4B34f6393e221F2A0139c3
address internal constant rsETH_ORACLE = 0x7292C95A5f6A501a9c4B34f6393e221F2A0139c3;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant rsETH_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x8236a87084f8B84306f72007F36F2618A5634494
address internal constant LBTC_UNDERLYING = 0x8236a87084f8B84306f72007F36F2618A5634494;
uint8 internal constant LBTC_DECIMALS = 8;
// https://etherscan.io/address/0x65906988ADEe75306021C417a1A3458040239602
address internal constant LBTC_A_TOKEN = 0x65906988ADEe75306021C417a1A3458040239602;
// https://etherscan.io/address/0x68aeB290C7727D899B47c56d1c96AEAC475cD0dD
address internal constant LBTC_V_TOKEN = 0x68aeB290C7727D899B47c56d1c96AEAC475cD0dD;
// https://etherscan.io/address/0xf8c04B50499872A5B5137219DEc0F791f7f620D0
address internal constant LBTC_ORACLE = 0xf8c04B50499872A5B5137219DEc0F791f7f620D0;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant LBTC_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x657e8C867D8B37dCC18fA4Caead9C45EB088C642
address internal constant eBTC_UNDERLYING = 0x657e8C867D8B37dCC18fA4Caead9C45EB088C642;
uint8 internal constant eBTC_DECIMALS = 8;
// https://etherscan.io/address/0x5fefd7069a7D91d01f269DADE14526CCF3487810
address internal constant eBTC_A_TOKEN = 0x5fefd7069a7D91d01f269DADE14526CCF3487810;
// https://etherscan.io/address/0x47eD0509e64615c0d5C6d39AF1B38D02Bc9fE58f
address internal constant eBTC_V_TOKEN = 0x47eD0509e64615c0d5C6d39AF1B38D02Bc9fE58f;
// https://etherscan.io/address/0x03bB418e89B75407585f8198178f253DA3216218
address internal constant eBTC_ORACLE = 0x03bB418e89B75407585f8198178f253DA3216218;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant eBTC_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x8292Bb45bf1Ee4d140127049757C2E0fF06317eD
address internal constant RLUSD_UNDERLYING = 0x8292Bb45bf1Ee4d140127049757C2E0fF06317eD;
uint8 internal constant RLUSD_DECIMALS = 18;
// https://etherscan.io/address/0xFa82580c16A31D0c1bC632A36F82e83EfEF3Eec0
address internal constant RLUSD_A_TOKEN = 0xFa82580c16A31D0c1bC632A36F82e83EfEF3Eec0;
// https://etherscan.io/address/0xBdFe7aD7976d5d7E0965ea83a81Ca1bCfF7e84a9
address internal constant RLUSD_V_TOKEN = 0xBdFe7aD7976d5d7E0965ea83a81Ca1bCfF7e84a9;
// https://etherscan.io/address/0xf0eaC18E908B34770FDEe46d069c846bDa866759
address internal constant RLUSD_ORACLE = 0xf0eaC18E908B34770FDEe46d069c846bDa866759;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant RLUSD_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x6A1792a91C08e9f0bFe7a990871B786643237f0F
address internal constant RLUSD_STATA_TOKEN = 0x6A1792a91C08e9f0bFe7a990871B786643237f0F;
// https://etherscan.io/address/0x50D2C7992b802Eef16c04FeADAB310f31866a545
address internal constant PT_eUSDE_29MAY2025_UNDERLYING =
0x50D2C7992b802Eef16c04FeADAB310f31866a545;
uint8 internal constant PT_eUSDE_29MAY2025_DECIMALS = 18;
// https://etherscan.io/address/0x4B0821e768Ed9039a70eD1E80E15E76a5bE5Df5F
address internal constant PT_eUSDE_29MAY2025_A_TOKEN = 0x4B0821e768Ed9039a70eD1E80E15E76a5bE5Df5F;
// https://etherscan.io/address/0x3c20fbFD32243Dd9899301C84bCe17413EeE0A0C
address internal constant PT_eUSDE_29MAY2025_V_TOKEN = 0x3c20fbFD32243Dd9899301C84bCe17413EeE0A0C;
// https://etherscan.io/address/0x5292AB3292D076271f853Ed8e05e61cc02F0A2C6
address internal constant PT_eUSDE_29MAY2025_ORACLE = 0x5292AB3292D076271f853Ed8e05e61cc02F0A2C6;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_eUSDE_29MAY2025_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x3b3fB9C57858EF816833dC91565EFcd85D96f634
address internal constant PT_sUSDE_31JUL2025_UNDERLYING =
0x3b3fB9C57858EF816833dC91565EFcd85D96f634;
uint8 internal constant PT_sUSDE_31JUL2025_DECIMALS = 18;
// https://etherscan.io/address/0xDE6eF6CB4aBd3A473ffC2942eEf5D84536F8E864
address internal constant PT_sUSDE_31JUL2025_A_TOKEN = 0xDE6eF6CB4aBd3A473ffC2942eEf5D84536F8E864;
// https://etherscan.io/address/0x8C6FeaF5d58BA1A6541F9c4aF685f62bFCBaC3b1
address internal constant PT_sUSDE_31JUL2025_V_TOKEN = 0x8C6FeaF5d58BA1A6541F9c4aF685f62bFCBaC3b1;
// https://etherscan.io/address/0x759B9B72700A129CD7AD8e53F9c99cb48Fd57105
address internal constant PT_sUSDE_31JUL2025_ORACLE = 0x759B9B72700A129CD7AD8e53F9c99cb48Fd57105;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_sUSDE_31JUL2025_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xC139190F447e929f090Edeb554D95AbB8b18aC1C
address internal constant USDtb_UNDERLYING = 0xC139190F447e929f090Edeb554D95AbB8b18aC1C;
uint8 internal constant USDtb_DECIMALS = 18;
// https://etherscan.io/address/0xEc4ef66D4fCeEba34aBB4dE69dB391Bc5476ccc8
address internal constant USDtb_A_TOKEN = 0xEc4ef66D4fCeEba34aBB4dE69dB391Bc5476ccc8;
// https://etherscan.io/address/0xeA85a065F87FE28Aa8Fbf0D6C7deC472b106252C
address internal constant USDtb_V_TOKEN = 0xeA85a065F87FE28Aa8Fbf0D6C7deC472b106252C;
// https://etherscan.io/address/0x88025072A7dB6Db5e54E46d43850bb44CA93D6C0
address internal constant USDtb_ORACLE = 0x88025072A7dB6Db5e54E46d43850bb44CA93D6C0;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant USDtb_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x2FE4dC166ADbc0B39EdB47F4324F00A7374daBF7
address internal constant USDtb_STATA_TOKEN = 0x2FE4dC166ADbc0B39EdB47F4324F00A7374daBF7;
// https://etherscan.io/address/0x917459337CaAC939D41d7493B3999f571D20D667
address internal constant PT_USDe_31JUL2025_UNDERLYING =
0x917459337CaAC939D41d7493B3999f571D20D667;
uint8 internal constant PT_USDe_31JUL2025_DECIMALS = 18;
// https://etherscan.io/address/0x312ffC57778CEfa11989733e6E08143E7E229c1c
address internal constant PT_USDe_31JUL2025_A_TOKEN = 0x312ffC57778CEfa11989733e6E08143E7E229c1c;
// https://etherscan.io/address/0xd90DA2Df915B87fE1621A7F2201FbF4ff2cCA031
address internal constant PT_USDe_31JUL2025_V_TOKEN = 0xd90DA2Df915B87fE1621A7F2201FbF4ff2cCA031;
// https://etherscan.io/address/0x6b99e86B48Fee533B7Bee602e7959f024051Eca0
address internal constant PT_USDe_31JUL2025_ORACLE = 0x6b99e86B48Fee533B7Bee602e7959f024051Eca0;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_USDe_31JUL2025_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x14Bdc3A3AE09f5518b923b69489CBcAfB238e617
address internal constant PT_eUSDE_14AUG2025_UNDERLYING =
0x14Bdc3A3AE09f5518b923b69489CBcAfB238e617;
uint8 internal constant PT_eUSDE_14AUG2025_DECIMALS = 18;
// https://etherscan.io/address/0x2eDff5AF94334fBd7C38ae318edf1c40e072b73B
address internal constant PT_eUSDE_14AUG2025_A_TOKEN = 0x2eDff5AF94334fBd7C38ae318edf1c40e072b73B;
// https://etherscan.io/address/0x22517fE16DEd08e52E7EA3423A2EA4995b1f1731
address internal constant PT_eUSDE_14AUG2025_V_TOKEN = 0x22517fE16DEd08e52E7EA3423A2EA4995b1f1731;
// https://etherscan.io/address/0x03f9bA9A897241985c1f12bCe97fAC1B0bd4a7A7
address internal constant PT_eUSDE_14AUG2025_ORACLE = 0x03f9bA9A897241985c1f12bCe97fAC1B0bd4a7A7;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_eUSDE_14AUG2025_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x90D2af7d622ca3141efA4d8f1F24d86E5974Cc8F
address internal constant eUSDe_UNDERLYING = 0x90D2af7d622ca3141efA4d8f1F24d86E5974Cc8F;
uint8 internal constant eUSDe_DECIMALS = 18;
// https://etherscan.io/address/0x5F9190496e0DFC831C3bd307978de4a245E2F5cD
address internal constant eUSDe_A_TOKEN = 0x5F9190496e0DFC831C3bd307978de4a245E2F5cD;
// https://etherscan.io/address/0x48351fCc9536dA440AE9471220F6dC921b0eB703
address internal constant eUSDe_V_TOKEN = 0x48351fCc9536dA440AE9471220F6dC921b0eB703;
// https://etherscan.io/address/0xc7Ad695ac0ae38Ae308640897E51468977A862a2
address internal constant eUSDe_ORACLE = 0xc7Ad695ac0ae38Ae308640897E51468977A862a2;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant eUSDe_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xC96dE26018A54D51c097160568752c4E3BD6C364
address internal constant FBTC_UNDERLYING = 0xC96dE26018A54D51c097160568752c4E3BD6C364;
uint8 internal constant FBTC_DECIMALS = 8;
// https://etherscan.io/address/0xcCA43ceF272c30415866914351fdfc3E881bb7c2
address internal constant FBTC_A_TOKEN = 0xcCA43ceF272c30415866914351fdfc3E881bb7c2;
// https://etherscan.io/address/0x4A35FD7F93324Cc48bc12190D3F37493437b1Eff
address internal constant FBTC_V_TOKEN = 0x4A35FD7F93324Cc48bc12190D3F37493437b1Eff;
// https://etherscan.io/address/0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A
address internal constant FBTC_ORACLE = 0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant FBTC_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c
address internal constant EURC_UNDERLYING = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;
uint8 internal constant EURC_DECIMALS = 6;
// https://etherscan.io/address/0xAA6e91C82942aeAE040303Bf96c15a6dBcB82CA0
address internal constant EURC_A_TOKEN = 0xAA6e91C82942aeAE040303Bf96c15a6dBcB82CA0;
// https://etherscan.io/address/0x6c82c66622Eb360FC973D3F492f9D8E9eA538b08
address internal constant EURC_V_TOKEN = 0x6c82c66622Eb360FC973D3F492f9D8E9eA538b08;
// https://etherscan.io/address/0xa6aB031A4d189B24628EC9Eb155F0a0f1A0E55a3
address internal constant EURC_ORACLE = 0xa6aB031A4d189B24628EC9Eb155F0a0f1A0E55a3;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant EURC_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x476a2D04AB8A7fb93E13aC14f2c077866ff13500
address internal constant EURC_STATA_TOKEN = 0x476a2D04AB8A7fb93E13aC14f2c077866ff13500;
// https://etherscan.io/address/0x9F56094C450763769BA0EA9Fe2876070c0fD5F77
address internal constant PT_sUSDE_25SEP2025_UNDERLYING =
0x9F56094C450763769BA0EA9Fe2876070c0fD5F77;
uint8 internal constant PT_sUSDE_25SEP2025_DECIMALS = 18;
// https://etherscan.io/address/0x5f4a0873a3A02f7C0CB0e13a1d4362a1AD90e751
address internal constant PT_sUSDE_25SEP2025_A_TOKEN = 0x5f4a0873a3A02f7C0CB0e13a1d4362a1AD90e751;
// https://etherscan.io/address/0xc9AD8Dd111e6384128146467aAf92B81EC422848
address internal constant PT_sUSDE_25SEP2025_V_TOKEN = 0xc9AD8Dd111e6384128146467aAf92B81EC422848;
// https://etherscan.io/address/0x7585693910f39df4959912B27D09EAEef06C1a93
address internal constant PT_sUSDE_25SEP2025_ORACLE = 0x7585693910f39df4959912B27D09EAEef06C1a93;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_sUSDE_25SEP2025_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xBC6736d346a5eBC0dEbc997397912CD9b8FAe10a
address internal constant PT_USDe_25SEP2025_UNDERLYING =
0xBC6736d346a5eBC0dEbc997397912CD9b8FAe10a;
uint8 internal constant PT_USDe_25SEP2025_DECIMALS = 18;
// https://etherscan.io/address/0x38A5357Ce55c81add62aBc84Fb32981e2626ADEf
address internal constant PT_USDe_25SEP2025_A_TOKEN = 0x38A5357Ce55c81add62aBc84Fb32981e2626ADEf;
// https://etherscan.io/address/0x0D8486E1CAbf3C9407B3DdA0cfc4d9C3101fB683
address internal constant PT_USDe_25SEP2025_V_TOKEN = 0x0D8486E1CAbf3C9407B3DdA0cfc4d9C3101fB683;
// https://etherscan.io/address/0x8B17C02d22EE7D6B8D6829ceB710A458de41E84a
address internal constant PT_USDe_25SEP2025_ORACLE = 0x8B17C02d22EE7D6B8D6829ceB710A458de41E84a;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_USDe_25SEP2025_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xD11c452fc99cF405034ee446803b6F6c1F6d5ED8
address internal constant tETH_UNDERLYING = 0xD11c452fc99cF405034ee446803b6F6c1F6d5ED8;
uint8 internal constant tETH_DECIMALS = 18;
// https://etherscan.io/address/0x481a2acf3A72ffDc602A9541896Ca1DB87f86cf7
address internal constant tETH_A_TOKEN = 0x481a2acf3A72ffDc602A9541896Ca1DB87f86cf7;
// https://etherscan.io/address/0x7EC9Afe70f8FD603282eBAcbc9058A83623E2899
address internal constant tETH_V_TOKEN = 0x7EC9Afe70f8FD603282eBAcbc9058A83623E2899;
// https://etherscan.io/address/0x85968026294b8f8Fb86d6bF3Cda079f9376aD05A
address internal constant tETH_ORACLE = 0x85968026294b8f8Fb86d6bF3Cda079f9376aD05A;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant tETH_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xbf5495Efe5DB9ce00f80364C8B423567e58d2110
address internal constant ezETH_UNDERLYING = 0xbf5495Efe5DB9ce00f80364C8B423567e58d2110;
uint8 internal constant ezETH_DECIMALS = 18;
// https://etherscan.io/address/0x4E2a4d9B3DF7Aae73b418Bd39F3af9e148E3F479
address internal constant ezETH_A_TOKEN = 0x4E2a4d9B3DF7Aae73b418Bd39F3af9e148E3F479;
// https://etherscan.io/address/0x730318dB7b830d324fC3fEDDB1d212Ec64bD3141
address internal constant ezETH_V_TOKEN = 0x730318dB7b830d324fC3fEDDB1d212Ec64bD3141;
// https://etherscan.io/address/0xF3d49021fF3bbBFDfC1992A4b09E5D1d141D044C
address internal constant ezETH_ORACLE = 0xF3d49021fF3bbBFDfC1992A4b09E5D1d141D044C;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant ezETH_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x68749665FF8D2d112Fa859AA293F07A622782F38
address internal constant XAUt_UNDERLYING = 0x68749665FF8D2d112Fa859AA293F07A622782F38;
uint8 internal constant XAUt_DECIMALS = 6;
// https://etherscan.io/address/0x8A2b6f94Ff3A89a03E8c02Ee92b55aF90c9454A2
address internal constant XAUt_A_TOKEN = 0x8A2b6f94Ff3A89a03E8c02Ee92b55aF90c9454A2;
// https://etherscan.io/address/0xa665bB258D2a732C170dFD505924214c0b1AC74F
address internal constant XAUt_V_TOKEN = 0xa665bB258D2a732C170dFD505924214c0b1AC74F;
// https://etherscan.io/address/0x214eD9Da11D2fbe465a6fc601a91E62EbEc1a0D6
address internal constant XAUt_ORACLE = 0x214eD9Da11D2fbe465a6fc601a91E62EbEc1a0D6;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant XAUt_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xe6A934089BBEe34F832060CE98848359883749B3
address internal constant PT_sUSDE_27NOV2025_UNDERLYING =
0xe6A934089BBEe34F832060CE98848359883749B3;
uint8 internal constant PT_sUSDE_27NOV2025_DECIMALS = 18;
// https://etherscan.io/address/0x285866acB0d60105B4Ed350a463361c2d9afA0E2
address internal constant PT_sUSDE_27NOV2025_A_TOKEN = 0x285866acB0d60105B4Ed350a463361c2d9afA0E2;
// https://etherscan.io/address/0x690Df181701C11C53EA33bBF303C25834b66bD14
address internal constant PT_sUSDE_27NOV2025_V_TOKEN = 0x690Df181701C11C53EA33bBF303C25834b66bD14;
// https://etherscan.io/address/0x8B8B73598a2c4b1de6d3b075618434CfC4826632
address internal constant PT_sUSDE_27NOV2025_ORACLE = 0x8B8B73598a2c4b1de6d3b075618434CfC4826632;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_sUSDE_27NOV2025_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x62C6E813b9589C3631Ba0Cdb013acdB8544038B7
address internal constant PT_USDe_27NOV2025_UNDERLYING =
0x62C6E813b9589C3631Ba0Cdb013acdB8544038B7;
uint8 internal constant PT_USDe_27NOV2025_DECIMALS = 18;
// https://etherscan.io/address/0x38C503a438185cDE29b5cF4dC1442FD6F074F1cc
address internal constant PT_USDe_27NOV2025_A_TOKEN = 0x38C503a438185cDE29b5cF4dC1442FD6F074F1cc;
// https://etherscan.io/address/0x2CE7e7b238985A8aD3863De03F200B245B0c1216
address internal constant PT_USDe_27NOV2025_V_TOKEN = 0x2CE7e7b238985A8aD3863De03F200B245B0c1216;
// https://etherscan.io/address/0x6A196A7B498C4EFBFEfB55364106EC80CceF0C3F
address internal constant PT_USDe_27NOV2025_ORACLE = 0x6A196A7B498C4EFBFEfB55364106EC80CceF0C3F;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_USDe_27NOV2025_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x1F84a51296691320478c98b8d77f2Bbd17D34350
address internal constant PT_USDe_5FEB2026_UNDERLYING =
0x1F84a51296691320478c98b8d77f2Bbd17D34350;
uint8 internal constant PT_USDe_5FEB2026_DECIMALS = 18;
// https://etherscan.io/address/0xE728577e9a1Fe7032bc309B4541F58f45443866e
address internal constant PT_USDe_5FEB2026_A_TOKEN = 0xE728577e9a1Fe7032bc309B4541F58f45443866e;
// https://etherscan.io/address/0x9D244A99801dc05cbC04183769c17056B8A1Ad53
address internal constant PT_USDe_5FEB2026_V_TOKEN = 0x9D244A99801dc05cbC04183769c17056B8A1Ad53;
// https://etherscan.io/address/0xc35D319FA5FEc2BBE0eB4d0a826465b60f821F81
address internal constant PT_USDe_5FEB2026_ORACLE = 0xc35D319FA5FEc2BBE0eB4d0a826465b60f821F81;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_USDe_5FEB2026_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xE8483517077afa11A9B07f849cee2552f040d7b2
address internal constant PT_sUSDE_5FEB2026_UNDERLYING =
0xE8483517077afa11A9B07f849cee2552f040d7b2;
uint8 internal constant PT_sUSDE_5FEB2026_DECIMALS = 18;
// https://etherscan.io/address/0xbe54767735fB7Acca2aa7E2d209a6f705073536D
address internal constant PT_sUSDE_5FEB2026_A_TOKEN = 0xbe54767735fB7Acca2aa7E2d209a6f705073536D;
// https://etherscan.io/address/0xA803414f84fCEF00e745bE7CC2A315908927f15D
address internal constant PT_sUSDE_5FEB2026_V_TOKEN = 0xA803414f84fCEF00e745bE7CC2A315908927f15D;
// https://etherscan.io/address/0x4e89f87F24C13819bBDDb56f99b38746C91677D8
address internal constant PT_sUSDE_5FEB2026_ORACLE = 0x4e89f87F24C13819bBDDb56f99b38746C91677D8;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_sUSDE_5FEB2026_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xacA92E438df0B2401fF60dA7E4337B687a2435DA
address internal constant mUSD_UNDERLYING = 0xacA92E438df0B2401fF60dA7E4337B687a2435DA;
uint8 internal constant mUSD_DECIMALS = 6;
// https://etherscan.io/address/0xAa0200d169fF3ba9385c12E073c5d1d30434AE7b
address internal constant mUSD_A_TOKEN = 0xAa0200d169fF3ba9385c12E073c5d1d30434AE7b;
// https://etherscan.io/address/0xE35e6A0D3AbC28289f5d4C2d262a133Df936b98D
address internal constant mUSD_V_TOKEN = 0xE35e6A0D3AbC28289f5d4C2d262a133Df936b98D;
// https://etherscan.io/address/0x8adb5187695F773513dEC4b569d21db0341931dA
address internal constant mUSD_ORACLE = 0x8adb5187695F773513dEC4b569d21db0341931dA;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant mUSD_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x356B8d89c1e1239Cbbb9dE4815c39A1474d5BA7D
address internal constant syrupUSDT_UNDERLYING = 0x356B8d89c1e1239Cbbb9dE4815c39A1474d5BA7D;
uint8 internal constant syrupUSDT_DECIMALS = 6;
// https://etherscan.io/address/0x24Ab03a9a5Bc2C49E5523e8d915A3536ac38B91D
address internal constant syrupUSDT_A_TOKEN = 0x24Ab03a9a5Bc2C49E5523e8d915A3536ac38B91D;
// https://etherscan.io/address/0xAEf73b04654931B94920a3D7AE62032b79fB6d0c
address internal constant syrupUSDT_V_TOKEN = 0xAEf73b04654931B94920a3D7AE62032b79fB6d0c;
// https://etherscan.io/address/0x982aC260B5a4e5bCAb6A437e79168390cFbDe70D
address internal constant syrupUSDT_ORACLE = 0x982aC260B5a4e5bCAb6A437e79168390cFbDe70D;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant syrupUSDT_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xe343167631d89B6Ffc58B88d6b7fB0228795491D
address internal constant USDG_UNDERLYING = 0xe343167631d89B6Ffc58B88d6b7fB0228795491D;
uint8 internal constant USDG_DECIMALS = 6;
// https://etherscan.io/address/0x7c0477d085ECb607CF8429f3eC91Ae5E1e460F4F
address internal constant USDG_A_TOKEN = 0x7c0477d085ECb607CF8429f3eC91Ae5E1e460F4F;
// https://etherscan.io/address/0x4f97B950a30321c181E974971E156E19fAD184A3
address internal constant USDG_V_TOKEN = 0x4f97B950a30321c181E974971E156E19fAD184A3;
// https://etherscan.io/address/0x83D20dEEdcd4aC1313496c8CBcAad0fa298c0CE4
address internal constant USDG_ORACLE = 0x83D20dEEdcd4aC1313496c8CBcAad0fa298c0CE4;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant USDG_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x2DF6DfbD281F127a3690c87E4572076778a9EDa5
address internal constant USDG_STATA_TOKEN = 0x2DF6DfbD281F127a3690c87E4572076778a9EDa5;
// https://etherscan.io/address/0xAeBf0Bb9f57E89260d57f31AF34eB58657d96Ce0
address internal constant PT_USDe_7MAY2026_UNDERLYING =
0xAeBf0Bb9f57E89260d57f31AF34eB58657d96Ce0;
uint8 internal constant PT_USDe_7MAY2026_DECIMALS = 18;
// https://etherscan.io/address/0xE036478Da9A7ed89b56FE39A06e1FC1a4b38D4Ea
address internal constant PT_USDe_7MAY2026_A_TOKEN = 0xE036478Da9A7ed89b56FE39A06e1FC1a4b38D4Ea;
// https://etherscan.io/address/0x04142fc546D59838852873bba5C8827601A13FC8
address internal constant PT_USDe_7MAY2026_V_TOKEN = 0x04142fc546D59838852873bba5C8827601A13FC8;
// https://etherscan.io/address/0x0a72df02CE3E4185b6CEDf561f0AE651E9BeE235
address internal constant PT_USDe_7MAY2026_ORACLE = 0x0a72df02CE3E4185b6CEDf561f0AE651E9BeE235;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_USDe_7MAY2026_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x3de0ff76E8b528C092d47b9DaC775931cef80F49
address internal constant PT_sUSDE_7MAY2026_UNDERLYING =
0x3de0ff76E8b528C092d47b9DaC775931cef80F49;
uint8 internal constant PT_sUSDE_7MAY2026_DECIMALS = 18;
// https://etherscan.io/address/0x81b76ff3FeD28BA0B4a5D4c76Bd5C13Bd0641d86
address internal constant PT_sUSDE_7MAY2026_A_TOKEN = 0x81b76ff3FeD28BA0B4a5D4c76Bd5C13Bd0641d86;
// https://etherscan.io/address/0x762Edb8D79b97487F82093f85059e42EeEf61E9e
address internal constant PT_sUSDE_7MAY2026_V_TOKEN = 0x762Edb8D79b97487F82093f85059e42EeEf61E9e;
// https://etherscan.io/address/0xa0dc0249c32fa79e8B9b17c735908a60b1141B40
address internal constant PT_sUSDE_7MAY2026_ORACLE = 0xa0dc0249c32fa79e8B9b17c735908a60b1141B40;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_sUSDE_7MAY2026_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x9Bf45ab47747F4B4dD09B3C2c73953484b4eB375
address internal constant PT_srUSDe_2APR2026_UNDERLYING =
0x9Bf45ab47747F4B4dD09B3C2c73953484b4eB375;
uint8 internal constant PT_srUSDe_2APR2026_DECIMALS = 18;
// https://etherscan.io/address/0x1241ec22C9BdF16BA1Eb636F2a8de7e28A4343Cf
address internal constant PT_srUSDe_2APR2026_A_TOKEN = 0x1241ec22C9BdF16BA1Eb636F2a8de7e28A4343Cf;
// https://etherscan.io/address/0xacD3d3FaCeA0424984F662827B988f4581a3cE31
address internal constant PT_srUSDe_2APR2026_V_TOKEN = 0xacD3d3FaCeA0424984F662827B988f4581a3cE31;
// https://etherscan.io/address/0xB539C6C0fc36ff1572B13ACec343B854937db576
address internal constant PT_srUSDe_2APR2026_ORACLE = 0xB539C6C0fc36ff1572B13ACec343B854937db576;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_srUSDe_2APR2026_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0xB0F70C0bD6FD87dbEb7C10dC692a2a6106817072
address internal constant BTCb_UNDERLYING = 0xB0F70C0bD6FD87dbEb7C10dC692a2a6106817072;
uint8 internal constant BTCb_DECIMALS = 8;
// https://etherscan.io/address/0x12b70410D60f926558245f769059eA3Fc7A7353E
address internal constant BTCb_A_TOKEN = 0x12b70410D60f926558245f769059eA3Fc7A7353E;
// https://etherscan.io/address/0x6C67e666BB954d4bE23e9F1cE20e7E8699d29339
address internal constant BTCb_V_TOKEN = 0x6C67e666BB954d4bE23e9F1cE20e7E8699d29339;
// https://etherscan.io/address/0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A
address internal constant BTCb_ORACLE = 0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant BTCb_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x619D75E3b790eBC21c289f2805Bb7177A7D732E2
address internal constant PT_srUSDe_25JUN2026_UNDERLYING =
0x619D75E3b790eBC21c289f2805Bb7177A7D732E2;
uint8 internal constant PT_srUSDe_25JUN2026_DECIMALS = 18;
// https://etherscan.io/address/0xA78Eba24D89e70A03ddB7AC195A15E53315aA5b4
address internal constant PT_srUSDe_25JUN2026_A_TOKEN =
0xA78Eba24D89e70A03ddB7AC195A15E53315aA5b4;
// https://etherscan.io/address/0x9Ba896531F878Ed5f0A4F73E82d63bA7b424F910
address internal constant PT_srUSDe_25JUN2026_V_TOKEN =
0x9Ba896531F878Ed5f0A4F73E82d63bA7b424F910;
// https://etherscan.io/address/0x9f336eB940730596548C342A8BF1fC530B10cc96
address internal constant PT_srUSDe_25JUN2026_ORACLE = 0x9f336eB940730596548C342A8BF1fC530B10cc96;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_srUSDe_25JUN2026_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x9db38D74a0D29380899aD354121DfB521aDb0548
address internal constant PT_USDG_28MAY2026_UNDERLYING =
0x9db38D74a0D29380899aD354121DfB521aDb0548;
uint8 internal constant PT_USDG_28MAY2026_DECIMALS = 6;
// https://etherscan.io/address/0xA9ecb0503075124cc0B786096849A331FBe9EE6D
address internal constant PT_USDG_28MAY2026_A_TOKEN = 0xA9ecb0503075124cc0B786096849A331FBe9EE6D;
// https://etherscan.io/address/0x1a83eCA2d3b0cea2595Fb11Ec60cb2D428217C2e
address internal constant PT_USDG_28MAY2026_V_TOKEN = 0x1a83eCA2d3b0cea2595Fb11Ec60cb2D428217C2e;
// https://etherscan.io/address/0x83D20dEEdcd4aC1313496c8CBcAad0fa298c0CE4
address internal constant PT_USDG_28MAY2026_ORACLE = 0x83D20dEEdcd4aC1313496c8CBcAad0fa298c0CE4;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_USDG_28MAY2026_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x59bC9FaE5D62B19d4f8d07D758047aCb9EE19d34
address internal constant PT_srUSDe_22OCT2026_UNDERLYING =
0x59bC9FaE5D62B19d4f8d07D758047aCb9EE19d34;
uint8 internal constant PT_srUSDe_22OCT2026_DECIMALS = 18;
// https://etherscan.io/address/0x01E69a58ca3ddc695820ce6f66FBdf3fA55D0545
address internal constant PT_srUSDe_22OCT2026_A_TOKEN =
0x01E69a58ca3ddc695820ce6f66FBdf3fA55D0545;
// https://etherscan.io/address/0x4Af166c6F2CF882f7B196E3625c3E8f2Fe2a8083
address internal constant PT_srUSDe_22OCT2026_V_TOKEN =
0x4Af166c6F2CF882f7B196E3625c3E8f2Fe2a8083;
// https://etherscan.io/address/0xBD1bc41479D0b58167584980fE57fDA913d4fB73
address internal constant PT_srUSDe_22OCT2026_ORACLE = 0xBD1bc41479D0b58167584980fE57fDA913d4fB73;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant PT_srUSDe_22OCT2026_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
// https://etherscan.io/address/0x72DFB2E44f59C5AD2bAFE84314E5b99a7cd5075E
address internal constant cirBTC_UNDERLYING = 0x72DFB2E44f59C5AD2bAFE84314E5b99a7cd5075E;
uint8 internal constant cirBTC_DECIMALS = 8;
// https://etherscan.io/address/0x0914FC8025D04739AA9BF2FA6c454DB159E78e35
address internal constant cirBTC_A_TOKEN = 0x0914FC8025D04739AA9BF2FA6c454DB159E78e35;
// https://etherscan.io/address/0xE5E56b2Db3d13687b791004004F3C29776d97816
address internal constant cirBTC_V_TOKEN = 0xE5E56b2Db3d13687b791004004F3C29776d97816;
// https://etherscan.io/address/0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A
address internal constant cirBTC_ORACLE = 0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A;
// https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB
address internal constant cirBTC_INTEREST_RATE_STRATEGY =
0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB;
}
library AaveV3EthereumEModes {
uint8 internal constant NONE = 0;
uint8 internal constant WETH_wstETH_cbETH_rETH_weETH_osETH_ETHx__WETH = 1;
uint8 internal constant USDe_sUSDe__USDC_USDT = 2;
uint8 internal constant rsETH__WETH_wstETH_ETHx = 3;
uint8 internal constant LBTC__WBTC = 4;
uint8 internal constant LBTC__cbBTC = 5;
uint8 internal constant LBTC__tBTC = 6;
uint8 internal constant eBTC__WBTC = 7;
uint8 internal constant sUSDe_PT_sUSDE_31JUL2025__USDC_USDT = 8;
uint8 internal constant PT_eUSDE_29MAY2025_eUSDe__USDC_USDT = 9;
uint8 internal constant USDe_PT_USDe_31JUL2025__USDC_USDT = 10;
uint8 internal constant USDe__USDC_USDT = 11;
uint8 internal constant USDe_PT_USDe_31JUL2025__USDe = 12;
uint8 internal constant PT_eUSDE_14AUG2025_eUSDe__USDC_USDT = 13;
uint8 internal constant PT_eUSDE_14AUG2025_eUSDe__USDe = 14;
uint8 internal constant eUSDe__USDC_USDT = 15;
uint8 internal constant FBTC__WBTC = 16;
uint8 internal constant sUSDe_PT_sUSDE_31JUL2025_PT_sUSDE_25SEP2025__USDC_USDT_USDe_USDtb = 17;
uint8 internal constant PT_sUSDE_25SEP2025__USDe = 18;
uint8
internal constant USDe_PT_USDe_31JUL2025_PT_eUSDE_14AUG2025_PT_USDe_25SEP2025__USDC_USDT_USDe =
19;
uint8 internal constant USDe_PT_USDe_31JUL2025_PT_eUSDE_14AUG2025_PT_USDe_25SEP2025__USDe = 20;
uint8 internal constant tETH__USDC_USDT = 21;
uint8 internal constant ezETH__wstETH = 22;
uint8 internal constant ezETH__USDC_USDT = 23;
uint8 internal constant sUSDe_PT_sUSDE_25SEP2025_PT_sUSDE_27NOV2025__USDC_USDT_USDe_USDtb = 24;
uint8 internal constant PT_sUSDE_25SEP2025_PT_sUSDE_27NOV2025__USDe = 25;
uint8 internal constant weETH__WETH_wstETH = 26;
uint8 internal constant PT_USDe_25SEP2025_PT_USDe_27NOV2025__USDC_USDT_USDe_USDtb = 27;
uint8 internal constant PT_USDe_25SEP2025_PT_USDe_27NOV2025__USDe = 28;
uint8 internal constant USDe_PT_USDe_27NOV2025_PT_USDe_5FEB2026__USDC_USDT_USDe_USDtb = 29;
uint8 internal constant USDe_PT_USDe_27NOV2025_PT_USDe_5FEB2026__USDe = 30;
uint8 internal constant sUSDe_PT_sUSDE_27NOV2025_PT_sUSDE_5FEB2026__USDC_USDT_USDe_USDtb = 31;
uint8 internal constant sUSDe_PT_sUSDE_27NOV2025_PT_sUSDE_5FEB2026__USDe = 32;
uint8 internal constant syrupUSDT__USDT_GHO = 33;
uint8 internal constant USDe_PT_USDe_5FEB2026_PT_USDe_7MAY2026__USDC_USDT_USDe_USDtb = 34;
uint8 internal constant USDe_PT_USDe_5FEB2026_PT_USDe_7MAY2026__USDe = 35;
uint8 internal constant sUSDe_PT_sUSDE_5FEB2026_PT_sUSDE_7MAY2026__USDC_USDT_USDe_USDtb = 36;
uint8 internal constant sUSDe_PT_sUSDE_5FEB2026_PT_sUSDE_7MAY2026__USDe = 37;
uint8 internal constant sUSDe_PT_srUSDe_2APR2026__USDC_USDT_USDe = 38;
uint8 internal constant sUSDe_PT_srUSDe_2APR2026__USDe = 39;
uint8 internal constant LINK__USDC_USDT = 40;
uint8 internal constant EURC__USDC_USDT_GHO = 41;
uint8 internal constant rsETH__USDC_USDT = 42;
uint8 internal constant XAUt__USDC_USDT_GHO = 43;
uint8 internal constant sUSDe_PT_srUSDe_2APR2026_PT_srUSDe_25JUN2026__USDC_USDT_USDe = 44;
uint8 internal constant sUSDe_PT_srUSDe_2APR2026_PT_srUSDe_25JUN2026__USDe = 45;
uint8 internal constant PT_USDG_28MAY2026__USDC_USDT_USDe_USDG = 46;
uint8 internal constant sUSDe_PT_srUSDe_22OCT2026__USDC_USDT_USDe = 47;
uint8 internal constant sUSDe_PT_srUSDe_22OCT2026__USDe = 48;
}
library AaveV3EthereumExternalLibraries {
// https://etherscan.io/address/0xC27a4d7AC0623B129919786d88714eF16132BEaE
address internal constant FLASHLOAN_LOGIC = 0xC27a4d7AC0623B129919786d88714eF16132BEaE;
// https://etherscan.io/address/0x52Da0ce88202D1542543598D1e1e27F0d344726A
address internal constant BORROW_LOGIC = 0x52Da0ce88202D1542543598D1e1e27F0d344726A;
// https://etherscan.io/address/0x96D5686812e33Ab509ECCDb38C89d15607B2a413
address internal constant LIQUIDATION_LOGIC = 0x96D5686812e33Ab509ECCDb38C89d15607B2a413;
// https://etherscan.io/address/0xD70593841C57cbaA04957cc3EAcE95708e48853b
address internal constant POOL_LOGIC = 0xD70593841C57cbaA04957cc3EAcE95708e48853b;
// https://etherscan.io/address/0x584C7d8c4cb05304FE5Ac7fbc97f20A10Fb07564
address internal constant SUPPLY_LOGIC = 0x584C7d8c4cb05304FE5Ac7fbc97f20A10Fb07564;
}
lib/aave-helpers/src/v3-config-engine/AaveV3PayloadEthereum.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';
import 'aave-v3-origin/contracts/extensions/v3-config-engine/AaveV3Payload.sol';
/**
* @dev Base smart contract for an Aave v3.1.0 listing on v3 Ethereum.
* @author BGD Labs
*/
abstract contract AaveV3PayloadEthereum is AaveV3Payload(IEngine(AaveV3Ethereum.CONFIG_ENGINE)) {
function getPoolContext() public pure override returns (IEngine.PoolContext memory) {
return IEngine.PoolContext({networkName: 'Ethereum', networkAbbreviation: 'Eth'});
}
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "none",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "shanghai",
"remappings": [
"forge-std/=lib/aave-helpers/lib/forge-std/src/",
"solidity-utils/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/src/",
"aave-v3-origin/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/",
"aave-v3-origin-tests/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/tests/",
"aave-address-book/=lib/aave-helpers/lib/aave-address-book/src/",
"aave-v4/=lib/aave-helpers/lib/aave-address-book/lib/aave-v4/src/",
"lib/aave-helpers/lib/aave-address-book/lib/aave-v4/:src/=lib/aave-helpers/lib/aave-address-book/lib/aave-v4/src/",
"openzeppelin-contracts/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/",
"aave-helpers/=lib/aave-helpers/",
"lib/aave-helpers/:src/=lib/aave-helpers/src/",
"aave-umbrella/=lib/aave-umbrella/src/contracts/",
"lib/aave-helpers/:aave-v3-origin/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/",
"lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/:ds-test/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
"lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/forge-std/:ds-test/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
"lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:@openzeppelin/contracts/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
"lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:erc4626-tests/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/:ds-test/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
"lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/:@openzeppelin/contracts-upgradeable/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/contracts/",
"lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/:@openzeppelin/contracts/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
"lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/:erc4626-tests/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/:halmos-cheatcodes/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/forge-std/:ds-test/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
"lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:@openzeppelin/contracts/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
"lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:erc4626-tests/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/:openzeppelin-contracts-upgradeable/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/",
"lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/:@openzeppelin/contracts-upgradeable/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/contracts/",
"lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/:@openzeppelin/contracts/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
"lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/:erc4626-tests/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/:halmos-cheatcodes/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/:openzeppelin-contracts-upgradeable/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/",
"lib/aave-helpers/lib/aave-address-book/lib/aave-v4/:erc4626-tests/=lib/aave-helpers/lib/aave-address-book/lib/aave-v4/lib/erc4626-tests/",
"lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/:openzeppelin-contracts-upgradeable/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/",
"lib/aave-umbrella/lib/aave-v3-origin/:openzeppelin-contracts-upgradeable/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/",
"lib/aave-umbrella/:@openzeppelin/contracts-upgradeable/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/contracts/",
"lib/aave-umbrella/:@openzeppelin/contracts/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
"lib/aave-umbrella/:openzeppelin-contracts-upgradeable/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/",
"lib/aave-umbrella/:erc4626-tests/=lib/aave-umbrella/lib/erc4626-tests/",
"ds-test/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/aave-umbrella/lib/erc4626-tests/",
"halmos-cheatcodes/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts-upgradeable/=lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.