Query editor
-- Liquidations on Base lending by month: what liquidation transactions paid the chain, beside what they bid in the oracle auction and what the liquidation paid the liquidator.-- Reads two saved tables built from decoded protocol events, transactions and blocks: one row per liquidation transaction from March 2026 (Morpho, Aave v3, Moonwell, Compound v3, Euler v2, Fluid),-- and priority fees by transaction type by month from January 2024.-- chain_fee_usd = base fee plus priority fee of the liquidation transactions. auction_bid_usd = winning bids paid in the oracle auction inside those transactions.-- priority_fee_usd_all_liquidations comes from the monthly table and reaches back to January 2025; the per-transaction columns start in March 2026.WITH t AS (SELECT CAST(date_trunc('month', day) AS DATE) AS month, COUNT(*) AS liquidation_transactions,SUM((priority_fee_eth + base_fee_eth) * eth_usd) AS chain_fee_usd, SUM(priority_fee_eth * eth_usd) AS priority_fee_usd, SUM(base_fee_eth * eth_usd) AS base_fee_usd,SUM(auction_bid_eth * eth_usd) AS auction_bid_usd, SUM(bonus_usd) AS liquidator_bonus_usd, SUM(debt_repaid_usd) AS debt_repaid_usdFROM dune.paigeisonfire.result_base_liquidation_transactions WHERE day < DATE '2026-11-01' GROUP BY 1),h AS (SELECT CAST(month AS DATE) AS month, SUM(priority_fee_usd) AS priority_fee_usd_all_liquidations, SUM(transactions) AS liquidation_transactions_allFROM dune.paigeisonfire.result_base_priority_fees_by_type_history WHERE transaction_type = 'Liquidation' AND month >= DATE '2025-01-01' GROUP BY 1)SELECT h.month, date_format(h.month, '%b %Y') AS month_label, h.liquidation_transactions_all, h.priority_fee_usd_all_liquidations, t.liquidation_transactions, t.chain_fee_usd, t.priority_fee_usd, t.base_fee_usd, t.auction_bid_usd,t.liquidator_bonus_usd, t.debt_repaid_usd, t.chain_fee_usd / NULLIF(t.auction_bid_usd, 0) AS chain_fee_per_dollar_bid,(t.chain_fee_usd + t.auction_bid_usd) / NULLIF(t.liquidator_bonus_usd, 0) AS share_of_bonus_paid_awayFROM h LEFT JOIN t ON t.month = h.month ORDER BY 1 DESC