pietrekttest here 4
    Updated 2025-05-06
    -- NETWORK FEES
    WITH network_fees_table AS (SELECT distinct to_date(block_timestamp) as date, 0.02 * COUNT(dim_block_id) as network_fee
    FROM thorchain.core.fact_transfer_events
    WHERE to_address = 'thor1dheycdevq39qlkxs2a6wuuzyn4aqxhve4qxtxt' AND amount_e8 = 2000000 GROUP BY date),
    -- SLASHING INCOME
    slashing_income_table AS (SELECT DISTINCT to_date(block_timestamp) as date, SUM(amount_e8) / 1e8 as slashing_income
    FROM thorchain.core.fact_transfer_events
    WHERE from_address = 'thor17gw75axcnr8747pkanye45pnrwk7p9c3cqncsv' AND to_address = 'thor1dheycdevq39qlkxs2a6wuuzyn4aqxhve4qxtxt' GROUP BY date),
    -- OUTBOUND FEE
    outbound_fee_table AS (SELECT distinct to_date(block_timestamp) as date, SUM(pool_deduct) / 1e8 as outbound_fee
    FROM thorchain.defi.fact_fee_events GROUP BY date),
    -- GAS REIMBRUSEMENT
    gas_reimbursement_table AS (SELECT distinct to_date(block_timestamp) as date, SUM(rune_e8) / 1e8 as gas_reimbursement
    FROM thorchain.defi.fact_gas_events GROUP BY date),
    -- IL PROTECTION
    il_protection_table AS (SELECT day as date, SUM(IL_PROTECTION_PAID) as il_protection
    FROM thorchain.defi.fact_daily_pool_stats GROUP BY date),
    -- RUNE Upgrades select * from thorchain.upgrades WHERE from_address = 'bnb1c8umfhf6qdrrtdrkvk32w3ge35ywll0wtwv0hp'
    rune_upgrades_table AS (SELECT to_date(block_timestamp) as date, sum(rune_amount) as rune_upgrades FROM thorchain.defi.fact_upgrades WHERE from_address = 'bnb1c8umfhf6qdrrtdrkvk32w3ge35ywll0wtwv0hp' group by date),
    -- BLOCK REWARDS
    block_reward_table AS (SELECT day as date, block_rewards FROM thorchain.defi.fact_block_rewards),
    -- LIQ FEES
    liq_fees AS (SELECT day as date, liquidity_fees as liquidity_fees_rune from thorchain.defi.fact_daily_earnings),
    -- DEV FUND
    from_transactions_dev_module AS (SELECT to_date(block_timestamp) as date, amount_e8 / 1e8 * (-1) as amount
    FROM thorchain.core.fact_transfer_events as c1
    WHERE
    (c1.from_address = 'thor1d8c0wv4y72kmlytegjmgx825xwumt9qt5xe07k'
    or c1.from_address = 'thor1d8c0wv4y72kmlytegjmgx825xwumt9qt5xe07k')
    AND c1.asset = 'THOR.RUNE' ORDER BY date),

    to_transactions_dev_module AS (SELECT to_date(block_timestamp) as date, amount_e8 / 1e8 as amount
    FROM thorchain.core.fact_transfer_events as c1
    WHERE
    (c1.to_address = 'thor1d8c0wv4y72kmlytegjmgx825xwumt9qt5xe07k'
    or c1.to_address = 'thor1d8c0wv4y72kmlytegjmgx825xwumt9qt5xe07k')
    Last run: about 1 month ago
    DAY
    NETWORK_FEE
    SLASHING_INCOME
    OUTBOUND_FEE
    LIQUIDITY_FEES_RUNE
    GAS_REIMBURSEMENT
    IL_PROTECTION
    BLOCK_REWARDS
    DEV_FUND_INCOME
    INCOME_BURN_RUNE
    POOL_AND_BOND_REWARDS
    RESERVE_INCOME
    RESERVE_EXPENSE
    1
    2025-05-06 00:00:00.000231.242383.137618780.51789914868.59665235-468.8374010-2-753.795188-753.85387-13362.9475943518263.49216935-15341.43405335
    2
    2025-05-05 00:00:00.000700.281.41258.77029928575.54536158-665.8842810-2-1076.48661-1076.48661-26424.5721415830535.99566058-29245.42964258
    3
    2025-05-04 00:00:00.000712.788.189606878.62644538909.74082212-437.7531190-1.96610842-1945.585126-1945.585126-35020.5366785440509.33687312-39351.42615796
    4
    2025-05-03 00:00:00.000473.460.02916.42685830545.55059746-441.2004150-1.96303994-1527.375409-1527.375409-27492.762819431935.45745546-30990.67709234
    5
    2025-05-02 00:00:00.000744.780.461199.25386355052.32317384-681.6290320-1.98423474-2752.715185-2752.715185-49548.8770385856996.81703684-55737.92067532
    6
    2025-05-01 00:00:00.0005531.46755.1671536441.79861722-399.2868990-1.74087754-1822.176777-1822.176777-32799.1859407637751.42576722-36844.5672713
    7
    2025-04-30 00:00:00.000746.940.221199.33579242872.77371268-646.3916890-2.02000847-2143.739438-2143.739438-38587.3148451544819.26950468-43523.20541862
    8
    2025-04-29 00:00:00.000690.9425.2813041357.86207681907.2344407-846.3329990-2.001993-4095.461589-4095.461589-73718.313255783981.3178207-82757.5714257
    9
    2025-04-28 00:00:00.000743.5210.1993561114.3316433641.52955869-601.8093560-1.97136678-1682.174759-1682.174759-30279.1514074735509.58055469-34247.28164825
    10
    2025-04-27 00:00:00.000393.820.08985.03797724751.81361457-516.055780-1.98216271-1237.68941-1237.68941-22278.4169572826130.75159157-25271.83371999
    11
    2025-04-26 00:00:00.000540.661.241015.16480230591.18012058-522.8437120-1.99453655-1529.658468-1529.658468-27533.8577211332148.24492258-31118.01290568
    12
    2025-04-25 00:00:00.000677.940.941570.32166733771.4472561-939.789510-1.9766072-1688.670944-1688.670944-30396.081975336020.6489231-34715.1899805
    13
    2025-04-24 00:00:00.000791.360.421867.31205146716.69964908-1183.7114260-1.9920757465220.145577-2335.934423-109602.9028788249375.79170008-47904.39522656
    14
    2025-04-23 00:00:00.000822.5802290.4703150868.14883909-1438.7797320-2.0043509-2543.507518-2543.507518-45783.1381539953981.19914909-52310.93727289
    15
    2025-04-22 00:00:00.000829.5230.9850511985.6108264586.69409041-1238.9624740-2.00341321-3229.434695-3229.434695-58129.8281136267432.80996141-65829.66339083
    16
    2025-04-21 00:00:00.000614.7214.903061509.61376641057.47016497-717.5625010-1.99615481-2052.973112-2052.973112-36953.5200957843196.70699097-41779.02497559
    17
    2025-04-20 00:00:00.000417.20.061070.56133737313.64596798-480.1591070-1.99905998-1865.781916-1865.781916-33584.0811959638801.46730498-37797.80319494
    18
    2025-04-19 00:00:00.000345.940.11215.58474338916.47921402-566.855670-2.00843493-1945.923983-1945.923983-35026.6396829540478.10395702-39487.35175388
    19
    2025-04-18 00:00:00.000548.680.51551.36705857686.41914459-812.5593380-1.98862908-2884.420127-2884.420127-51919.5675196759786.96620259-58502.95574075
    20
    2025-04-17 00:00:00.000562.720.241830.20645368622.52974524-907.8957190-1.98066294-3431.225273-3431.225273-61762.0598621871015.69619824-69534.38679012
    ...
    1456
    179KB
    32s