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.
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.
Converting an aToken into the underlying asset (either ETH or the supported token).
When a user has deposited funds, they must enable the funds to be used as collateral to be able to 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.
A user is able to swap their borrow rates between stable and variable rates.
When a loan position has a health factor below 1, it can be liquidated by anyone.
An uncollateralised loan that is available in one transaction, as long as it is repaid before the end of the transaction.
Reserve information is updated (e.g. interest rates) whenever certain actions are taken on the reserve (deposits, borrows, etc).
Example: Occurs on all
repay(), swap rates, liquidations, and rebalances calls.