Comment on page
Analysing Blockchain Data
Similar to all Ethereum based smart contract protocols, all of Aave's data, transactions, and events are extractable directly from the blockchain. This section will describe the most common data that you may want to extract from Aave Protocol.
Ensure you are working with the latest smart contract addresses as detailed on the Deployed Contracts page.
When users deposit tokens or ETH into Aave, they are given the aToken equivalent which:
- is 1:1 pegged with the original asset (e.g. 1 aDAI
===
1 DAI), and - immediately earns interest.
Converting ETH or a supported token into an aToken.
Type | Details | Contract | Documentation |
Function | deposit() | ||
Event | Deposit() |
Converting an aToken into the underlying asset (either ETH or the supported token).
Type | Details | Contract | Documentation |
Function | redeem() | ||
Event | RedeemUnderlying() |
When a user has deposited funds, they must enable the funds to be used as collateral to be able to borrow.
Type | Details | Contract | Documentation |
Function | setUserUseReserveAsCollateral() | ||
Event | ReserveUsedAsCollateralEnabled() | ||
Event | ReserveUsedAsCollateralDisabled() |
When a user has deposited collateral (therefore holds aTokens), they are able to borrow a certain amount of assets based on the amount of collateral.
Type | Details | Contract | Documentation |
Function | borrow() | ||
Event | Borrow() |
Type | Details | Contract | Documentation |
Function | repay() | ||
Event | Repay() |
A user is able to swap their borrow rates between stable and variable rates.
Type | Details | Contract | Documentation |
Function | swapBorrowRateMode() | ||
Event | Swap() |
When a loan position has a health factor below 1, it can be liquidated by anyone.
Type | Details | Contract | Documentation |
Function | liquidationCall() | ||
Event | LiquidationCall() |
An uncollateralised loan that is available in one transaction, as long as it is repaid before the end of the transaction.
Type | Details | Contract | Documentation |
Function | flashLoan() | ||
Event | FlashLoan() |
Reserve information is updated (e.g. interest rates) whenever certain actions are taken on the reserve (deposits, borrows, etc).
Type | Details | Contract |
Function | updateReserveInterestRatesAndTimestampInternal() | |
Event | ReserveUpdated() |
Example: Occurs on all
deposit()
, redeem()
, flashloan()
, borrow()
, repay()
, swap rates, liquidations, and rebalances calls.