This schema contains comprehensive datasets for tracking Aave fundamental data across multiple metrics categories, including lending activity, deposits, loans, revenue streams, treasury, liquidations, and market data.
Available Tables
Aave data is available in several tables:
- ez_metrics: Main aggregated metrics for the entire Aave protocol
- ez_metrics_by_chain: Metrics broken down by blockchain (Ethereum, Arbitrum, Optimism, etc.)
- ez_metrics_by_token: Metrics broken down by token (USDC, ETH, AAVE, etc.)
Table Schema
Lending Activity Metrics
Table Name | Column Name | Description |
---|
ez_metrics | lending_deposits | The total amount of tokens deposited (in USD) on Aave |
ez_metrics | lending_loans | The total outstanding loans (in USD) on Aave |
ez_metrics | net_deposits | Legacy naming for lending_deposits |
ez_metrics | outstanding_supply | Legacy naming for lending_loans |
ez_metrics | tvl | The total value locked in Aave (deposits - loans) |
Fee and Revenue Metrics
Table Name | Column Name | Description |
---|
ez_metrics | ecosystem_revenue | The total USD value generated from all user-paid fees |
ez_metrics | interest_rate_fees | Interest fees paid by borrowers on loans |
ez_metrics | flashloan_fees | Fees generated from flash loans |
ez_metrics | gho_fees | Fees generated from GHO stablecoin operations |
ez_metrics | fees | Legacy naming for total fees (interest + flashloan + gho) |
Revenue Distribution Metrics
Table Name | Column Name | Description |
---|
ez_metrics | service_cash_flow | Revenue accrued to liquidity providers (deposit revenue + flashloan) |
ez_metrics | liquidator_cash_flow | Revenue allocated to liquidators |
ez_metrics | treasury_cash_flow | Revenue allocated to Aave treasury (reserve factor + dao + gho) |
ez_metrics | reserve_factor_treasury_cash_flow | Portion of interest fees sent to treasury via reserve factor |
ez_metrics | dao_treasury_cash_flow | Revenue from DAO trading activities |
ez_metrics | gho_treasury_cash_flow | Revenue from GHO operations sent to treasury |
Incentives and Expenses
Table Name | Column Name | Description |
---|
ez_metrics | ecosystem_incentives | Incentives distributed to ecosystem participants |
ez_metrics | safety_incentives | Incentives distributed for the safety module |
ez_metrics | token_incentives | Total token incentives (ecosystem + safety) |
ez_metrics | total_expenses | Total protocol expenses (currently just token incentives) |
ez_metrics | protocol_earnings | Protocol revenue minus total expenses |
Treasury Metrics
Table Name | Column Name | Description |
---|
ez_metrics | treasury | The total USD value in Aaveβs treasury |
ez_metrics | treasury_native | The USD value of AAVE tokens in the treasury |
ez_metrics | net_treasury | The USD value in treasury excluding protocolβs own tokens |
ez_metrics | treasury_value | Legacy naming for treasury |
ez_metrics | treasury_value_native | Legacy naming for treasury_native |
ez_metrics | net_treasury_value | Legacy naming for net_treasury |
Market and Token Metrics
Table Name | Column Name | Description |
---|
ez_metrics | price | The price of AAVE token in USD |
ez_metrics | market_cap | The market cap of AAVE token in USD |
ez_metrics | fdmc | The fully diluted market cap of AAVE token in USD |
ez_metrics | token_volume | The trading volume of AAVE token in USD |
ez_metrics | token_turnover_circulating | The turnover of AAVE based on circulating supply |
ez_metrics | token_turnover_fdv | The turnover of AAVE based on fully diluted valuation |
ez_metrics | token_holder_count | The number of unique AAVE token holders |
ez_metrics | h24_volume | The 24-hour trading volume of AAVE (legacy naming) |
Chain-specific Metrics (ez_metrics_by_chain)
The ez_metrics_by_chain
table provides the same metrics as the main table but broken down by blockchain network:
Column Name | Description |
---|
date | The date of the recorded metrics |
chain | The blockchain (Ethereum, Arbitrum, Optimism, etc.) |
lending_deposits | Total deposits on this chain |
lending_loans | Outstanding loans on this chain |
tvl | Total value locked on this chain |
ecosystem_revenue | Total protocol revenue on this chain |
service_cash_flow | Revenue to liquidity providers on this chain |
liquidator_cash_flow | Revenue to liquidators on this chain |
treasury_cash_flow | Revenue to treasury on this chain |
treasury | Treasury value associated with this chain |
treasury_native | AAVE token value in treasury for this chain |
Token-specific Metrics (ez_metrics_by_token)
The ez_metrics_by_token
table breaks down metrics by individual tokens:
Column Name | Description |
---|
date | The date of the recorded metrics |
chain | The blockchain where the token is used |
token_address | The contract address of the token |
lending_deposits | Deposits of this specific token (USD) |
lending_deposits_native | Deposits of this token in native units |
lending_loans | Loans of this specific token (USD) |
lending_loans_native | Loans of this token in native units |
tvl | TVL for this token (USD) |
tvl_native | TVL for this token in native units |
ecosystem_revenue | Revenue generated by this token (USD) |
ecosystem_revenue_native | Revenue generated by this token in native units |
service_cash_flow | Revenue to liquidity providers from this token |
service_cash_flow_native | Revenue to LPs in native token units |
liquidator_cash_flow | Revenue to liquidators from this token |
liquidator_cash_flow_native | Revenue to liquidators in native token units |
treasury_cash_flow | Revenue to treasury from this token |
treasury_cash_flow_native | Revenue to treasury in native token units |
treasury | Treasury holdings of this token (USD) |
treasury_native | Treasury holdings in native token units |
Sample Queries
Basic Protocol Activity Query
-- Pull fundamental lending data for Aave
SELECT
date,
lending_deposits,
lending_loans,
tvl,
price
FROM
art_share.aave.ez_metrics
WHERE
date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
date ASC
Revenue Analysis
-- Analyze Aave revenue streams
SELECT
date,
ecosystem_revenue,
interest_rate_fees,
flashloan_fees,
gho_fees,
service_cash_flow,
liquidator_cash_flow,
treasury_cash_flow
FROM
art_share.aave.ez_metrics
WHERE
date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
date ASC
Revenue Distribution Analysis
-- Analyze how Aave's revenue is distributed
SELECT
date,
ecosystem_revenue,
service_cash_flow,
liquidator_cash_flow,
treasury_cash_flow,
service_cash_flow / ecosystem_revenue * 100 as lp_percentage,
liquidator_cash_flow / ecosystem_revenue * 100 as liquidator_percentage,
treasury_cash_flow / ecosystem_revenue * 100 as treasury_percentage
FROM
art_share.aave.ez_metrics
WHERE
date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
date ASC
Treasury Analysis
-- Track Aave treasury composition
SELECT
date,
treasury,
treasury_native,
net_treasury,
treasury_native / treasury * 100 as aave_token_percentage,
token_incentives,
protocol_earnings
FROM
art_share.aave.ez_metrics
WHERE
date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
date ASC
Cross-Chain Comparison
-- Compare Aave metrics across different blockchains
SELECT
date,
chain,
lending_deposits,
lending_loans,
tvl,
ecosystem_revenue
FROM
art_share.aave.ez_metrics_by_chain
WHERE
date >= DATEADD(month, -1, CURRENT_DATE())
ORDER BY
chain, date ASC
Token Analysis
-- Analyze the performance of specific tokens on Aave
SELECT
date,
chain,
token_address,
lending_deposits,
lending_loans,
ecosystem_revenue,
service_cash_flow
FROM
art_share.aave.ez_metrics_by_token
WHERE
date = DATEADD(day, -1, CURRENT_DATE())
AND token_address IN (
'0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', -- USDC
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', -- WETH
'0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9' -- AAVE
)
ORDER BY
ecosystem_revenue DESC
GHO Stablecoin Analysis
-- Track Aave's GHO stablecoin revenue
SELECT
date,
gho_fees,
gho_treasury_cash_flow,
gho_fees / ecosystem_revenue * 100 as gho_revenue_percentage
FROM
art_share.aave.ez_metrics
WHERE
date >= '2023-07-01' -- Approximate GHO launch date
AND date <= CURRENT_DATE()
ORDER BY
date ASC
Protocol Economics Analysis
-- Analyze Aave protocol economics
SELECT
date,
lending_deposits,
lending_loans,
lending_loans / lending_deposits * 100 as utilization_rate,
ecosystem_revenue,
ecosystem_revenue / lending_loans * 365 * 100 as annualized_revenue_rate,
token_incentives,
protocol_earnings,
price
FROM
art_share.aave.ez_metrics
WHERE
date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
date ASC