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 |
| referralCode | uint16 | 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 |
functionwithdraw( address asset, uint256 amount, address to )externalreturns(uint256)
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
Allows users to borrow a specific amount of the reserve underlying asset, provided that the borrower
already deposited enough collateral, or he was given enough allowance by a credit delegator on the
corresponding debt token (StableDebtToken or VariableDebtToken)
E.g. User borrows 100 USDC passing as onBehalfOf his own address, receiving the 100 USDC in his wallet
and 100 stable/variable debt tokens, depending on the interestRateMode
The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable
referralCode
uint16
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
onBehalfOf
address
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 |
functionrebalanceStableBorrowRate( address asset, address user )external
Rebalances the stable interest rate of a user to the current stable rate defined on the reserve.
Users can be rebalanced if the following conditions are satisfied:
Usage ratio is above 95%
the current deposit APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate, which means that too much has been
borrowed at a stable rate and depositors are not earning enough
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
Allows smartcontracts to access the liquidity of the pool within one transaction,
as long as the amount taken plus a fee is returned.
IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept into consideration.
For further details please visit https://developers.aave.com
The address of the contract receiving the funds, implementing the IFlashLoanReceiver interface
assets
address[]
The addresses of the assets being flash-borrowed
amounts
uint256[]
The amounts amounts being flash-borrowed
modes
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 -> Open debt at stable rate for the value of the amount flash-borrowed to the onBehalfOf address
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 on modes 1 or 2 |
| params | bytes | Variadic packed params to pass to the receiver as extra information |
| referralCode | uint16 | 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 |
Emitted when a borrower is liquidated. This event is emitted by the LendingPool via
LendingPoolCollateral manager using a DELEGATECALL
This allows to have the events in the generated ABI for LendingPool.
Emitted when the state of a reserve is updated. NOTE: This event is actually declared
in the ReserveLogic library and emitted in the updateInterestRates() function. Since the function is internal,
the event will actually be fired by the LendingPool contract. The event is therefore replicated here so it
gets added to the LendingPool ABI