The Aave Health Calculator is a web-based tool that allows users to assess the risk level associated with their Aave positions on any supporting chain and Aave market. Users can input their wallet address, view their current health factor, and make adjustments to their position by changing token prices, adding or removing tokens from the supply or borrow side, and then view their updated health factor.
- Chains and Markets: Users can switch to any chain supporting the Aave protocol. Furthermore, the user can specify the Aave market version, either Version 2 or Version 3. The interface, supply tokens, and borrow tokens will update accordingly with the choosen chain / Aave market.
Supported Chains | Aave Markets V2 | Aave Markets V3 |
---|---|---|
Ethereum | ✓ | ✓ |
Polygon | Needs to be fixed | ✓ |
Avalanche | ✓ | ✓ |
Optimism | ✓ | |
Arbitrum | ✓ | |
Metis | ✓ | |
Base |
-
Address Input: Users can input their wallet address to fetch an Aave position.
-
Token Price Adjustment: Users can change token prices to simulate the impact on a position's health factor.
-
Token Adjustment: Users can add or remove tokens from either the supply or borrow side of a position to see how it affects their health factor.
-
Token Liquidation Threshold Adjustment: Users can adjust the liquidation threshold of borrowed tokens. The liquidation threshold is the percentage at which a position is defined as undercollateralised. For example, a Liquidation threshold of 80% means that if the value rises above 80% of the collateral, the position is undercollateralised and could be liquidated. Further documentation on liquidation thresholds.
-
Position Information: Once tokens have been supplied and borrowed, the app will display three important metrics about the position.
- Net Worth: The value supplied minus the value borrowed.
- Health Factor: A numeric representation of the safety of the deposited assets against the borrowed assets and its underlying value. The higher the value is, the safer the state of the funds are against liquidation. If the health factor reaches 1, the liquidation of your deposits will be triggered. Further documentation on health factor.
- Liquidation To Value Ratio: The Loan to Value (”LTV”) ratio defines the maximum amount of assets that can be borrowed with a specific collateral. It is expressed as a percentage (e.g., at LTV=75%, for every 1 ETH worth of collateral, borrowers will be able to borrow 0.75 ETH worth of the corresponding currency).
-
The Graph for Aave Positions and Token Prices:
- GraphQL is used to query a user's Aave position data from The Graph. Users input their wallet address, and GraphQL queries are made to Aave's subgraph to retrieve information about their positions. This allows the app to calculate the current health factor associated with their Aave positions.
- Aave's subgraphs also provides the app with information about the tokens that Avalanche supported by the Aave protocol, and their prices on all supported networks.
-
Infura for Oracle Prices:
-
Certain oracle contracts do not follow the
EACAggregator
interface and return an error from price queries on the subgraphs. As a work-around, the app relies on Infura to access oracle prices of those tokens that return an error from Aave's subgraph. -
Ethereum Oracles:
-
Polygon Oracles:
-
Avalanche Oracles:
-
Optimism Oracles:
-
Arbitrum Oracles:
-
- The Aave protocol maintains a fixed value of $1 for the
GHO
stable-coin, as stated in the GHO documentation. Consequently, the app enforces a $1 price forGHO
unless the user explicitly modifies it. This fixed price forGHO
is not fetched from any external data sources.