L2PoolInstance

Optimism

0x794a61358d6845594f94dc1db02a252b5b4814ad

Proxy implementation: 0x66185e53343336d4faea5317d1fcca103dd4088d

Solidity v0.8.27+commit.40a35a09

🤖
Query this contract from your AI
Reference: aavev3-pool-optimism 0x794a61358d6845594f94dc1db02a252b5b4814ad
Sample prompt: “Tell me the current state of aavev3-pool-optimism”
No AI wired up yet? → mcp.smarts.md

Admin & Risk

Who can change the rules?

Detected upgradeable controls from the verified ABI.

Upgradeable

Current controls

Implementation
0x66185e53343336d4faea5317d1fcca103dd4088d ↗ Etherscan → smarts proxy

Overview

Read Functions
35
Write Functions
43
Events
15

Read Functions

Block #152,041,591 · just now
ADDRESSES_PROVIDER() view → 0xa97684ead0e402dc232d5a977953df7ecbab3cdb

Returns the PoolAddressesProvider connected to this contract

Returns

Name Type Description
address The address of the PoolAddressesProvider
FLASHLOAN_PREMIUM_TOTAL() view → 5

Returns the total fee on flash loans.

dev: From v3.4 all flashloan fees will be send to the treasury.

Returns

Name Type Description
uint128 The total fee on flashloans
FLASHLOAN_PREMIUM_TO_PROTOCOL() view → 10,000

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.

Returns

Name Type Description
uint128 The flashloan fee sent to the protocol treasury
MAX_NUMBER_RESERVES() view → 128

Returns the maximum number of reserves supported to be listed in this Pool

Returns

Name Type Description
uint16 The maximum number of reserves supported
POOL_REVISION() view → 11

Returns

Name Type Description
uint256
RESERVE_INTEREST_RATE_STRATEGY() view → 0x9359282735496463131139875849d5302fb4bed1

Returns the ReserveInterestRateStrategy connected to all the reserves

Returns

Name Type Description
address The address of the ReserveInterestRateStrategy contract
UMBRELLA() view → 0x554d4252454c4c41000000000000000000000000000000000000000000000000

Returns

Name Type Description
bytes32
getBorrowLogic() pure → 0x52da0ce88202d1542543598d1e1e27f0d344726a

Gets the address of the external BorrowLogic

Returns

Name Type Description
address
getConfiguration(asset: address) view

Returns the configuration of the reserve

Parameters

Name Type Description
asset address The address of the underlying asset of the reserve

Returns

Name Type Description
tuple The configuration of the reserve
getEModeCategoryBorrowableBitmap(id: uint8) view

Returns the borrowableBitmap of an eMode category

Parameters

Name Type Description
id uint8 The id of the category

Returns

Name Type Description
uint128 The borrowableBitmap of the category
getEModeCategoryCollateralBitmap(id: uint8) view

Returns the collateralBitmap of an eMode category

Parameters

Name Type Description
id uint8 The id of the category

Returns

Name Type Description
uint128 The collateralBitmap of the category
getEModeCategoryCollateralConfig(id: uint8) view

Returns the collateral config of an eMode category

Parameters

Name Type Description
id uint8 The id of the category

Returns

Name Type Description
res tuple The ltv,lt,lb of the category
getEModeCategoryData(id: uint8) view

Returns the data of an eMode category

dev: DEPRECATED use independent getters instead

Parameters

Name Type Description
id uint8 The id of the category

Returns

Name Type Description
tuple The configuration data of the category
getEModeCategoryLabel(id: uint8) view

Returns the label of an eMode category

dev: This function is deprecated and will be removed in a future version.

Parameters

Name Type Description
id uint8 The id of the category

Returns

Name Type Description
string The label of the category
getEModeCategoryLtvzeroBitmap(id: uint8) view

Returns the ltvzero of an eMode category

Parameters

Name Type Description
id uint8 The id of the category

Returns

Name Type Description
uint128 The ltvzeroBitmap of the category
getFlashLoanLogic() pure → 0x6d414cd0d5eaf8c43200ac0c325a7e2ad83b8be6

Gets the address of the external FlashLoanLogic

Returns

Name Type Description
address
getIsEModeCategoryIsolated(id: uint8) view

Returns the isolated flag of an eMode category

Parameters

Name Type Description
id uint8 The id of the category

Returns

Name Type Description
bool True if the eMode category is isolated
getLiquidationGracePeriod(asset: address) view

Returns the liquidation grace period of the given asset

Parameters

Name Type Description
asset address The address of the underlying asset

Returns

Name Type Description
uint40 Timestamp when the liquidation grace period will end
getLiquidationLogic() pure → 0x96d5686812e33ab509eccdb38c89d15607b2a413

Gets the address of the external LiquidationLogic

Returns

Name Type Description
address
getPoolLogic() pure → 0xd70593841c57cbaa04957cc3eace95708e48853b

Gets the address of the external PoolLogic

Returns

Name Type Description
address
getReserveAToken(asset: address) view

Returns the aToken address of a reserve.

Parameters

Name Type Description
asset address The address of the underlying asset of the reserve

Returns

Name Type Description
address The address of the aToken
getReserveAddressById(id: uint16) view

Returns the address of the underlying asset of a reserve by the reserve id as stored in the DataTypes.ReserveData struct

Parameters

Name Type Description
id uint16 The id of the reserve as stored in the DataTypes.ReserveData struct

Returns

Name Type Description
address The address of the reserve associated with id
getReserveData(asset: address) view

Returns the state and configuration of the reserve

Parameters

Name Type Description
asset address The address of the underlying asset of the reserve

Returns

Name Type Description
res tuple The state and configuration data of the reserve
getReserveDeficit(asset: address) view

Returns the current deficit of a reserve.

Parameters

Name Type Description
asset address The address of the underlying asset of the reserve

Returns

Name Type Description
uint256 The current deficit of the reserve
getReserveNormalizedIncome(asset: address) view

Returns the normalized income of the reserve

Parameters

Name Type Description
asset address The address of the underlying asset of the reserve

Returns

Name Type Description
uint256 The reserve's normalized income
getReserveNormalizedVariableDebt(asset: address) view

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)

Parameters

Name Type Description
asset address The address of the underlying asset of the reserve

Returns

Name Type Description
uint256 The reserve normalized variable debt
getReserveVariableDebtToken(asset: address) view

Returns the variableDebtToken address of a reserve.

Parameters

Name Type Description
asset address The address of the underlying asset of the reserve

Returns

Name Type Description
address The address of the variableDebtToken
getReservesCount() view → 14

Returns the number of initialized reserves

dev: It includes dropped reserves

Returns

Name Type Description
uint256 The count
getReservesList() view → [0xda10009cbd5d07dd0cecc66161fc93d7c9000da1, 0x350a791bfc2c21f9ed5d10980dad2e2638ffa7f6, 0x7f5c764cbc14f9669b88837ca1490cca17c31607, 0x68f180fcce6836688e9084f035309e29bf0a2095, 0x4200000000000000000000000000000000000006, 0x94b008aa00579c1307b0ef2c499ad98a8ce58e58, 0x76fb31fb4af56892a25e32cfc43de717950c9278, 0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9, 0x4200000000000000000000000000000000000042, 0x1f32b1c2345538c0c6f582fcb022739c4a194ebb, 0xc40f949f8a4e094d1b49a23ea9241d289b7b2819, 0xdfa46478f9e5ea86d57387849598dbfb2e964b02, 0x9bcef72be871e61ed4fbbc7630889bee758eb81d, 0x0b2c639c533813f4aa9d7837caf62653d097ff85]

Returns the list of the underlying assets of all the initialized reserves

dev: It does not include dropped reserves

Returns

Name Type Description
address[] The addresses of the underlying assets of the initialized reserves
getSupplyLogic() pure → 0x584c7d8c4cb05304fe5ac7fbc97f20a10fb07564

Gets the address of the external SupplyLogic

Returns

Name Type Description
address
getUserAccountData(user: address) view

Returns the user account data across all the reserves

Parameters

Name Type Description
user address The address of the user

Returns

Name Type Description
totalCollateralBase uint256 totalCollateralBase The total collateral of the user in the base currency used by the price feed
totalDebtBase uint256 totalDebtBase The total debt of the user in the base currency used by the price feed
availableBorrowsBase uint256 availableBorrowsBase The borrowing power left of the user in the base currency used by the price feed
currentLiquidationThreshold uint256 currentLiquidationThreshold The liquidation threshold of the user
ltv uint256 ltv The loan to value of The user
healthFactor uint256 healthFactor The current health factor of the user
getUserConfiguration(user: address) view

Returns the configuration of the user across all the reserves

Parameters

Name Type Description
user address The user address

Returns

Name Type Description
tuple The configuration of the user
getUserEMode(user: address) view

Returns the eMode the user is using

Parameters

Name Type Description
user address The address of the user

Returns

Name Type Description
uint256 The eMode id
getVirtualUnderlyingBalance(asset: address) view

Returns the virtual underlying balance of the reserve

Parameters

Name Type Description
asset address The address of the underlying asset of the reserve

Returns

Name Type Description
uint128 The reserve virtual underlying balance
isApprovedPositionManager(user: address, positionManager: address) view

Returns true if the `positionManager` address is approved to use the position manager role on behalf of the user.

Parameters

Name Type Description
user address The address of the user
positionManager address The address of the position manager

Returns

Name Type Description
bool True if the user is approved to use the position manager, false otherwise

Write Functions

approvePositionManager(positionManager: address, approve: bool) nonpayable

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.

Parameters

Name Type Description
positionManager address The address of the position manager
approve bool True if the position manager should be approved, false otherwise
borrow(asset: address, amount: uint256, interestRateMode: uint256, referralCode: uint16, onBehalfOf: address) nonpayable

Calldata efficient wrapper of the borrow function, borrowing on behalf of the caller

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
asset address
amount uint256
interestRateMode uint256
referralCode uint16
onBehalfOf address
borrow(args: bytes32) nonpayable

Calldata efficient wrapper of the borrow function, borrowing on behalf of the caller

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
args bytes32 Arguments for the borrow function packed in one bytes32 88 bits 16 bits 8 bits 128 bits 16 bits | 0-padding | referralCode | shortenedInterestRateMode | shortenedAmount | assetId |
configureEModeCategory(id: uint8, category: tuple) nonpayable

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

Parameters

Name Type Description
id uint8 The id of the category
category tuple
configureEModeCategoryBorrowableBitmap(id: uint8, borrowableBitmap: uint128) nonpayable

Replaces the current eMode borrowableBitmap.

Parameters

Name Type Description
id uint8 The id of the category
borrowableBitmap uint128 The borrowableBitmap of the category
configureEModeCategoryCollateralBitmap(id: uint8, collateralBitmap: uint128) nonpayable

Replaces the current eMode collateralBitmap.

Parameters

Name Type Description
id uint8 The id of the category
collateralBitmap uint128 The collateralBitmap of the category
configureEModeCategoryIsolated(id: uint8, isolated: bool) nonpayable

Sets the isolated flag of an eMode category.

Parameters

Name Type Description
id uint8 The id of the category
isolated bool True if the eMode should be isolated
configureEModeCategoryLtvzeroBitmap(id: uint8, ltvzeroBitmap: uint128) nonpayable

Replaces the current eMode ltvzeroBitmap.

Parameters

Name Type Description
id uint8 The id of the category
ltvzeroBitmap uint128 The ltvzeroBitmap of the category
deposit(asset: address, amount: uint256, onBehalfOf: address, referralCode: uint16) nonpayable
dev: Deprecated: maintained for compatibility purposes

Parameters

Name Type Description
asset address
amount uint256
onBehalfOf address
referralCode uint16
eliminateReserveDeficit(asset: address, amount: uint256) nonpayable

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.

Parameters

Name Type Description
asset address The address of the underlying asset to cover the deficit.
amount uint256 The amount to be covered, in aToken

Returns

Name Type Description
uint256 The amount of tokens burned
finalizeTransfer(asset: address, from: address, to: address, scaledAmount: uint256, scaledBalanceFromBefore: uint256) nonpayable

Validates and finalizes an aToken transfer

dev: Only callable by the overlying aToken of the `asset`

Parameters

Name Type Description
asset address The address of the underlying asset of the aToken
from address The user from which the aTokens are transferred
to address The user receiving the aTokens
scaledAmount uint256 The scaled amount being transferred/withdrawn
scaledBalanceFromBefore uint256 The aToken scaled balance of the `from` user before the transfer
flashLoan(receiverAddress: address, assets: address[], amounts: uint256[], interestRateModes: uint256[], onBehalfOf: address, params: bytes, referralCode: uint16) nonpayable

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/

Parameters

Name Type Description
receiverAddress address The address of the contract receiving the funds, implementing IFlashLoanReceiver interface
assets address[] The addresses of the assets being flash-borrowed
amounts uint256[] The amounts of the assets being flash-borrowed
interestRateModes uint256[] 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
onBehalfOf address The address that will receive the debt in the case of using 2 on `modes`
params bytes Variadic packed params to pass to the receiver as extra information
referralCode uint16 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
flashLoanSimple(receiverAddress: address, asset: address, amount: uint256, params: bytes, referralCode: uint16) nonpayable

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/

Parameters

Name Type Description
receiverAddress address The address of the contract receiving the funds, implementing IFlashLoanSimpleReceiver interface
asset address The address of the asset being flash-borrowed
amount uint256 The amount of the asset being flash-borrowed
params bytes Variadic packed params to pass to the receiver as extra information
referralCode uint16 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
initReserve(asset: address, aTokenAddress: address, variableDebtAddress: address) nonpayable

Initializes a reserve, activating it, assigning an aToken and debt tokens

dev: Only callable by the PoolConfigurator contract

Parameters

Name Type Description
asset address The address of the underlying asset of the reserve
aTokenAddress address The address of the aToken that will be assigned to the reserve
variableDebtAddress address The address of the VariableDebtToken that will be assigned to the reserve
initialize(provider: address) nonpayable

Initializes the Pool.

dev: The passed PoolAddressesProvider is validated against the POOL.ADDRESSES_PROVIDER, to ensure the upgrade is done with correct intention.

Parameters

Name Type Description
provider address The address of the PoolAddressesProvider
liquidationCall(collateralAsset: address, debtAsset: address, borrower: address, debtToCover: uint256, receiveAToken: bool) nonpayable

Calldata efficient wrapper of the liquidationCall function

dev: the shortenedDebtToCover is cast to 256 bits at decode time, if type(uint128).max the value will be expanded to type(uint256).max

Parameters

Name Type Description
collateralAsset address
debtAsset address
borrower address
debtToCover uint256
receiveAToken bool
liquidationCall(args1: bytes32, args2: bytes32) nonpayable

Calldata efficient wrapper of the liquidationCall function

dev: the shortenedDebtToCover is cast to 256 bits at decode time, if type(uint128).max the value will be expanded to type(uint256).max

Parameters

Name Type Description
args1 bytes32 part of the arguments for the liquidationCall function packed in one bytes32 64 bits 160 bits 16 bits 16 bits | 0-padding | user address | debtAssetId | collateralAssetId |
args2 bytes32 part of the arguments for the liquidationCall function packed in one bytes32 127 bits 1 bit 128 bits | 0-padding | receiveAToken | shortenedDebtToCover |
mintToTreasury(assets: address[]) nonpayable

Mints the assets accrued through the reserve factor to the treasury in the form of aTokens

Parameters

Name Type Description
assets address[] The list of reserves for which the minting needs to be executed
multicall(data: bytes[]) nonpayable
dev: Receives and executes a batch of function calls on this contract.

Parameters

Name Type Description
data bytes[]

Returns

Name Type Description
results bytes[]
renouncePositionManagerRole(user: address) nonpayable

Renounces a position manager role for a given user.

Parameters

Name Type Description
user address The address of the user
repay(args: bytes32) nonpayable

Calldata efficient wrapper of the repay function, repaying on behalf of the caller

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
args bytes32 Arguments for the repay function packed in one bytes32 104 bits 8 bits 128 bits 16 bits | 0-padding | shortenedInterestRateMode | shortenedAmount | assetId |

Returns

Name Type Description
uint256 The final amount repaid
repay(asset: address, amount: uint256, interestRateMode: uint256, onBehalfOf: address) nonpayable

Calldata efficient wrapper of the repay function, repaying on behalf of the caller

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
asset address
amount uint256
interestRateMode uint256
onBehalfOf address

Returns

Name Type Description
uint256 The final amount repaid
repayWithATokens(asset: address, amount: uint256, interestRateMode: uint256) nonpayable

Calldata efficient wrapper of the repayWithATokens function

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
asset address
amount uint256
interestRateMode uint256

Returns

Name Type Description
uint256 The final amount repaid
repayWithATokens(args: bytes32) nonpayable

Calldata efficient wrapper of the repayWithATokens function

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
args bytes32 Arguments for the repayWithATokens function packed in one bytes32 104 bits 8 bits 128 bits 16 bits | 0-padding | shortenedInterestRateMode | shortenedAmount | assetId |

Returns

Name Type Description
uint256 The final amount repaid
repayWithPermit(args: bytes32, r: bytes32, s: bytes32) nonpayable

Calldata efficient wrapper of the repayWithPermit function, repaying on behalf of the caller

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
args bytes32 Arguments for the repayWithPermit function packed in one bytes32 64 bits 8 bits 32 bits 8 bits 128 bits 16 bits | 0-padding | permitV | shortenedDeadline | shortenedInterestRateMode | shortenedAmount | assetId |
r bytes32 The R parameter of ERC712 permit sig
s bytes32 The S parameter of ERC712 permit sig

Returns

Name Type Description
uint256 The final amount repaid
repayWithPermit(asset: address, amount: uint256, interestRateMode: uint256, onBehalfOf: address, deadline: uint256, permitV: uint8, permitR: bytes32, permitS: bytes32) nonpayable

Calldata efficient wrapper of the repayWithPermit function, repaying on behalf of the caller

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
asset address
amount uint256
interestRateMode uint256
onBehalfOf address
deadline uint256
permitV uint8
permitR bytes32
permitS bytes32

Returns

Name Type Description
uint256 The final amount repaid
rescueTokens(token: address, to: address, amount: uint256) nonpayable

Rescue and transfer tokens locked in this contract

Parameters

Name Type Description
token address The address of the token
to address The address of the recipient
amount uint256 The amount of token to transfer
setConfiguration(asset: address, configuration: tuple) nonpayable

Sets the configuration bitmap of the reserve as a whole

dev: Only callable by the PoolConfigurator contract

Parameters

Name Type Description
asset address The address of the underlying asset of the reserve
configuration tuple The new configuration bitmap
setLiquidationGracePeriod(asset: address, until: uint40) nonpayable

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

Parameters

Name Type Description
asset address The address of the underlying asset to set the liquidationGracePeriod
until uint40 Timestamp when the liquidation grace period will end
setUserEMode(categoryId: uint8) nonpayable

Allows a user to use the protocol in eMode

Parameters

Name Type Description
categoryId uint8 The id of the category
setUserEModeOnBehalfOf(categoryId: uint8, onBehalfOf: address) nonpayable

Sets the eMode category for the user on the specific reserve on behalf of the user.

Parameters

Name Type Description
categoryId uint8 The id of the category
onBehalfOf address The address of the user
setUserUseReserveAsCollateral(args: bytes32) nonpayable

Calldata efficient wrapper of the setUserUseReserveAsCollateral function

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
args bytes32 Arguments for the setUserUseReserveAsCollateral function packed in one bytes32 239 bits 1 bit 16 bits | 0-padding | useAsCollateral | assetId |
setUserUseReserveAsCollateral(asset: address, useAsCollateral: bool) nonpayable

Calldata efficient wrapper of the setUserUseReserveAsCollateral function

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
asset address
useAsCollateral bool
setUserUseReserveAsCollateralOnBehalfOf(asset: address, useAsCollateral: bool, onBehalfOf: address) nonpayable

Sets the use as collateral flag for the user on the specific reserve on behalf of the user.

Parameters

Name Type Description
asset address The address of the underlying asset of the reserve
useAsCollateral bool True if the user wants to use the reserve as collateral, false otherwise
onBehalfOf address The address of the user
supply(asset: address, amount: uint256, onBehalfOf: address, referralCode: uint16) nonpayable

Calldata efficient wrapper of the supply function on behalf of the caller

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
asset address
amount uint256
onBehalfOf address
referralCode uint16
supply(args: bytes32) nonpayable

Calldata efficient wrapper of the supply function on behalf of the caller

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
args bytes32 Arguments for the supply function packed in one bytes32 96 bits 16 bits 128 bits 16 bits | 0-padding | referralCode | shortenedAmount | assetId |
supplyWithPermit(asset: address, amount: uint256, onBehalfOf: address, referralCode: uint16, deadline: uint256, permitV: uint8, permitR: bytes32, permitS: bytes32) nonpayable

Calldata efficient wrapper of the supplyWithPermit function on behalf of the caller

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
asset address
amount uint256
onBehalfOf address
referralCode uint16
deadline uint256
permitV uint8
permitR bytes32
permitS bytes32
supplyWithPermit(args: bytes32, r: bytes32, s: bytes32) nonpayable

Calldata efficient wrapper of the supplyWithPermit function on behalf of the caller

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
args bytes32 Arguments for the supply function packed in one bytes32 56 bits 8 bits 32 bits 16 bits 128 bits 16 bits | 0-padding | permitV | shortenedDeadline | referralCode | shortenedAmount | assetId |
r bytes32 The R parameter of ERC712 permit sig
s bytes32 The S parameter of ERC712 permit sig
syncIndexesState(asset: address) nonpayable

Accumulates interest to all indexes of the reserve

dev: To be used when required by the configurator, for example when updating interest rates strategy data

Parameters

Name Type Description
asset address The address of the underlying asset of the reserve
syncRatesState(asset: address) nonpayable

Updates interest rates on the reserve data

dev: To be used when required by the configurator, for example when updating interest rates strategy data

Parameters

Name Type Description
asset address The address of the underlying asset of the reserve
updateFlashloanPremium(flashLoanPremium: uint128) nonpayable

Updates flash loan premium. All this premium is collected by the protocol treasury.

dev: Only callable by the PoolConfigurator contract

Parameters

Name Type Description
flashLoanPremium uint128 The flash loan premium, expressed in bps
withdraw(asset: address, amount: uint256, to: address) nonpayable

Calldata efficient wrapper of the withdraw function, withdrawing to the caller

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
asset address
amount uint256
to address

Returns

Name Type Description
uint256 The final amount withdrawn
withdraw(args: bytes32) nonpayable

Calldata efficient wrapper of the withdraw function, withdrawing to the caller

dev: assetId is the index of the asset in the reservesList.

Parameters

Name Type Description
args bytes32 Arguments for the withdraw function packed in one bytes32 112 bits 128 bits 16 bits | 0-padding | shortenedAmount | assetId |

Returns

Name Type Description
uint256 The final amount withdrawn

Events

Borrow(reserve: address, user: address, onBehalfOf: address, amount: uint256, interestRateMode: uint8, borrowRate: uint256, referralCode: uint16)
Name Type Indexed Description
reserve address The address of the underlying asset being borrowed
user address The address of the user initiating the borrow(), receiving the funds on borrow() or just initiator of the transaction on flashLoan()
onBehalfOf address The address that will be getting the debt
amount uint256 The amount borrowed out
interestRateMode uint8 The rate mode: 2 for Variable, 1 is deprecated (changed on v3.2.0)
borrowRate uint256 The numeric rate at which the user has borrowed, expressed in ray
referralCode uint16 The referral code used
DeficitCovered(reserve: address, caller: address, amountCovered: uint256)
Name Type Indexed Description
reserve address The address of the underlying asset of the reserve
caller address The caller that triggered the DeficitCovered event
amountCovered uint256 The amount of deficit covered
DeficitCreated(user: address, debtAsset: address, amountCreated: uint256)
Name Type Indexed Description
user address The user address where the bad debt will be burned
debtAsset address The address of the underlying borrowed asset to be burned
amountCreated uint256 The amount of deficit created
FlashLoan(target: address, initiator: address, asset: address, amount: uint256, interestRateMode: uint8, premium: uint256, referralCode: uint16)
Name Type Indexed Description
target address The address of the flash loan receiver contract
initiator address The address initiating the flash loan
asset address The address of the asset being flash borrowed
amount uint256 The amount flash borrowed
interestRateMode uint8 The flashloan mode: 0 for regular flashloan, 1 for Stable (Deprecated on v3.2.0), 2 for Variable
premium uint256 The fee flash borrowed
referralCode uint16 The referral code used
LiquidationCall(collateralAsset: address, debtAsset: address, user: address, debtToCover: uint256, liquidatedCollateralAmount: uint256, liquidator: address, receiveAToken: bool)
Name Type Indexed Description
collateralAsset address The address of the underlying asset used as collateral, to receive as result of the liquidation
debtAsset address The address of the underlying borrowed asset to be repaid with the liquidation
user address The address of the borrower getting liquidated
debtToCover uint256 The debt amount of borrowed `asset` the liquidator wants to cover
liquidatedCollateralAmount uint256 The amount of collateral received by the liquidator
liquidator address The address of the liquidator
receiveAToken bool True if the liquidators wants to receive the collateral aTokens, `false` if he wants to receive the underlying collateral asset directly
MintedToTreasury(reserve: address, amountMinted: uint256)
Name Type Indexed Description
reserve address The address of the reserve
amountMinted uint256 The amount minted to the treasury
PositionManagerApproved(user: address, positionManager: address)
Name Type Indexed Description
user address The user address
positionManager address The address of the position manager
PositionManagerRevoked(user: address, positionManager: address)
Name Type Indexed Description
user address The user address
positionManager address The address of the position manager
Repay(reserve: address, user: address, repayer: address, amount: uint256, useATokens: bool)
Name Type Indexed Description
reserve address The address of the underlying asset of the reserve
user address The beneficiary of the repayment, getting his debt reduced
repayer address The address of the user initiating the repay(), providing the funds
amount uint256 The amount repaid
useATokens bool True if the repayment is done using aTokens, `false` if done with underlying asset directly
ReserveDataUpdated(reserve: address, liquidityRate: uint256, stableBorrowRate: uint256, variableBorrowRate: uint256, liquidityIndex: uint256, variableBorrowIndex: uint256)
Name Type Indexed Description
reserve address The address of the underlying asset of the reserve
liquidityRate uint256 The next liquidity rate
stableBorrowRate uint256 The next stable borrow rate @note deprecated on v3.2.0
variableBorrowRate uint256 The next variable borrow rate
liquidityIndex uint256 The next liquidity index
variableBorrowIndex uint256 The next variable borrow index
ReserveUsedAsCollateralDisabled(reserve: address, user: address)
Name Type Indexed Description
reserve address The address of the underlying asset of the reserve
user address The address of the user enabling the usage as collateral
ReserveUsedAsCollateralEnabled(reserve: address, user: address)
Name Type Indexed Description
reserve address The address of the underlying asset of the reserve
user address The address of the user enabling the usage as collateral
Supply(reserve: address, user: address, onBehalfOf: address, amount: uint256, referralCode: uint16)
Name Type Indexed Description
reserve address The address of the underlying asset of the reserve
user address The address initiating the supply
onBehalfOf address The beneficiary of the supply, receiving the aTokens
amount uint256 The amount supplied
referralCode uint16 The referral code used
UserEModeSet(user: address, categoryId: uint8)
Name Type Indexed Description
user address The address of the user
categoryId uint8 The category id
Withdraw(reserve: address, user: address, to: address, amount: uint256)
Name Type Indexed Description
reserve address The address of the underlying asset being withdrawn
user address The address initiating the withdrawal, owner of aTokens
to address The address that will receive the underlying
amount uint256 The amount to be withdrawn