Lending Protocols: AAVE VS Compound Comparison

Utilize abstraction tables for ultimate comparison of lending protocols.

With ZettaBlock prebuilt abstraction tables for various protocols, it is easy to compare performance between different protocols in the same industry. We have built abstraction tables for various lending protocols, including AAVE, Compound, Maker, etc. With these tables, it is trivial to write queries to compare them side by side.

In this use case, we’ll compare AAVE (V1 and V2) and Compound (V2) performance through transaction count, active user and transaction amount metrics, for both borrow and supply actions.

AAVE VS Compound Performance

We first create a query to compare the borrow (Borrow/Repay/Liquidation) data between the two protocols. The query content is attached at the end of this document.

From the charts for borrow, we can easily see that Compound has more transactions and active borrowers before 2022, and after that AAVE is more active than Compound.

Then we use a similar query to compare the supply (Deposit/Withdraw) data.

You can notice the similar pattern as borrow data from the above supply related charts.

Finally, we combine both borrow and supply data into a single query, and aggregate the result to be weekly.

Now, we can see a trend that AAVE data increased quickly and bypass Compound since 2022.

📘

You can find the dashboard version of the above queries here.

Query source code

AAVE vs Compound Borrow

select project,
  data_creation_date,
  count(*) as borrow_tx_count,
  count(distinct borrower) as borrower_count,
  sum(abs(amount_usd)) as amount
from compound.ethereum_v2_borrow
where data_creation_date >= date('2020-01-01')
group by 1, 2

union all

select project,
  data_creation_date,
  count(*) as borrow_tx_count,
  count(distinct borrower) as borrower_count,
  sum(abs(amount_usd)) as amount
from (
  select * from aave.ethereum_aave_v1_borrow
  union all
  select * from aave.ethereum_aave_v2_borrow
)
group by 1, 2
order by 2

AAVE vs Compound Supply

select project,
  data_creation_date,
  count(*) as supply_tx_count,
  count(distinct depositor) as depositor_count,
  sum(abs(amount_usd)) as amount
from compound.ethereum_v2_supply
where data_creation_date >= date('2020-01-01')
group by 1, 2

union all

select project,
  data_creation_date,
  count(*) as deposit_tx_count,
  count(distinct depositor) as depositor_count,
  sum(abs(amount_usd)) as amount
from (
  select * from aave.ethereum_aave_v1_supply
  union all
  select * from aave.ethereum_aave_v2_supply
)
group by 1, 2
order by 2

AAVE vs Compound Combined Weekly

select project,
  date_trunc('week', data_creation_date) as block_date,
  count(*) as tx_count,
  count(distinct user_address) as user_count,
  sum(amount) as tx_amount
from (
  select project,
    data_creation_date,
    borrower as user_address,
    abs(amount_usd) as amount
  from compound.ethereum_v2_borrow

  union all 

  select project,
    data_creation_date,
    depositor as user_address,
    abs(amount_usd) as amount
  from compound.ethereum_v2_supply
) t
where data_creation_date >= date('2020-01-01')
group by 1, 2

union all

select project,
  date_trunc('week', data_creation_date) as block_date,
  count(*) as tx_count,
  count(distinct user_address) as user_count,
  sum(amount) as tx_amount
from (
  select project,
    data_creation_date,
    borrower as user_address,
    abs(amount_usd) as amount
  from aave.ethereum_aave_v1_borrow
  
  union all 

  select project,
    data_creation_date,
    borrower as user_address,
    abs(amount_usd) as amount
  from aave.ethereum_aave_v2_borrow
  
  union all 

  select project,
    data_creation_date,
    depositor as user_address,
    abs(amount_usd) as amount
  from aave.ethereum_aave_v1_supply
  
  union all 

  select project,
    data_creation_date,
    depositor as user_address,
    abs(amount_usd) as amount
  from aave.ethereum_aave_v2_supply
)
group by 1, 2
order by 2