theericstoneCurve Protocol TVL
    Updated 2021-02-17
    with pools as (
    select project_name, address
    from public.ethereum_address_labels
    where project_name in ('curve fi')
    and l2_label NOT IN ('token_contract','chadmin','contract_deployer','swap_contract','token_distribution')
    )

    select
    date,
    sum(tvl) as tvl
    from
    (
    SELECT balance_date as date,
    coalesce(amount_usd, balance) as tvl
    from
    gold.ethereum_erc20_balances
    where user_address in (select address from pools)
    and balance_date > getdate() - interval '2 weeks'
    ) dailies
    group by 1;
    Run a query to Download Data