Query editor
-- inflation table will need to be updated ON 2031-08-14.WITH blockworks_crv_supply_schedule AS (SELECT*,total_liq_incentives + total_early_users + total_core_team + total_investors + total_employees + total_reserve AS total_supply,liq_incentives + early_users + core_team + investors + employees + reserve AS daily_emissionsFROM (SELECT*,SUM(liq_incentives) OVER(ORDER BY time) AS total_liq_incentives,SUM(early_users) OVER(ORDER BY time) AS total_early_users,SUM(core_team) OVER(ORDER BY time) AS total_core_team,SUM(investors) OVER(ORDER BY time) AS total_investors,SUM(employees) OVER(ORDER BY time) AS total_employees,SUM(reserve) OVER(ORDER BY time) AS total_reserveFROM (SELECTtime,CASE WHEN time <= TIMESTAMP '2021-08-13' THEN 752918.583561644 -- year 1WHEN time <= TIMESTAMP '2022-08-13' THEN 633126.537894891 -- year 2WHEN time <= TIMESTAMP '2023-08-13' THEN 532393.836117809 -- year 3WHEN time <= TIMESTAMP '2024-08-13' THEN 446464.876851211 -- year 4WHEN time <= TIMESTAMP '2025-08-13' THEN 376459.291780822 -- year 5WHEN time <= TIMESTAMP '2026-08-13' THEN 316563.268947446 -- year 6WHEN time <= TIMESTAMP '2027-08-13' THEN 266196.918058904 -- year 7WHEN time <= TIMESTAMP '2028-08-13' THEN 223232.438425606 -- year 8WHEN time <= TIMESTAMP '2029-08-13' THEN 188229.645890411 -- year 9WHEN time <= TIMESTAMP '2030-08-13' THEN 158281.634473723 -- year 10ELSE 133098.459029452 --CODE WILL BREAK ON 2031-08-15END AS liq_incentives,CASE WHEN time <= TIMESTAMP '2021-08-13' THEN 415110.00436772 -- year 1ELSE 0END AS early_users,CASE WHEN time <= TIMESTAMP '2021-08-13' THEN 548603.529712329 -- year 1WHEN time <= TIMESTAMP '2022-08-13' THEN 548603.529712329 -- year 2WHEN time <= TIMESTAMP '2023-08-13' THEN 548603.529712329 -- year 3WHEN time <= TIMESTAMP '2024-08-13' THEN 547104.612964481 -- year 4ELSE 0END AS core_team,CASE WHEN time <= TIMESTAMP '2021-08-13' THEN 148122.953027397 -- year 1WHEN time <= TIMESTAMP '2022-08-13' THEN 148122.953027397 -- year 2ELSE 0END AS investors,CASE WHEN time <= TIMESTAMP '2021-08-13' THEN 124533.001310316 -- year 1WHEN time <= TIMESTAMP '2022-08-13' THEN 124533.001310316 -- year 2ELSE 0END AS employees,CASE WHEN time <= TIMESTAMP '2021-08-13' THEN 415110.00436772 -- year 1ELSE 0END AS reserveFROM unnest(sequence(TIMESTAMP '2020-08-14', TIMESTAMP '2030-08-14', interval '1' day)) d(time)) sub1) sub2)SELECTtime,CAST(liq_incentives AS DOUBLE) AS liq_incentives,CAST(early_users AS DOUBLE) AS early_users