Links
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.

Deposit

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.

Deposit made

Converting ETH or a supported token into an aToken.
Type
Details
Contract
Documentation
Function
deposit()
Event
Deposit()

Deposit withdrawn / redeemed

Converting an aToken into the underlying asset (either ETH or the supported token).
Type
Details
Contract
Documentation
Function
redeem()
aToken
Event
RedeemUnderlying()
aToken

Collateral

When a user has deposited funds, they must enable the funds to be used as collateral to be able to borrow.

Enable / Disable collateral

Type
Details
Contract
Documentation
Function
setUserUseReserveAsCollateral()
Event
ReserveUsedAsCollateralEnabled()
Event
ReserveUsedAsCollateralDisabled()

Borrow

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.

Borrow made

Type
Details
Contract
Documentation
Function
borrow()
Event
Borrow()

Borrow repaid

Type
Details
Contract
Documentation
Function
repay()
Event
Repay()

Swap rate

A user is able to swap their borrow rates between stable and variable rates.
Type
Details
Contract
Documentation
Function
swapBorrowRateMode()
Event
Swap()

Liquidation

When a loan position has a health factor below 1, it can be liquidated by anyone.
Type
Details
Contract
Documentation
Function
liquidationCall()
Event
LiquidationCall()

Flash Loan

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 / Asset / Interest Rate updates

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.