Skip to content

Commit

Permalink
adding lido earnings and total expenses
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwes committed Aug 19, 2024
1 parent edfadf9 commit bb26d13
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion models/projects/lido/core/ez_lido_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ select
, COALESCE(f.protocol_revenue, 0) as protocol_revenue
, COALESCE(f.operating_expenses, 0) as operating_expenses
, COALESCE(ti.token_incentives, 0) as token_incentives
, COALESCE(f.protocol_revenue, 0) - COALESCE(f.operating_expenses, 0) - COALESCE(ti.token_incentives, 0) as protocol_earnings
, token_incentives + operating_expenses as total_expenses
, protocol_revenue - total_expenses as protocol_earnings
, COALESCE(t.treasury_value, 0) as treasury_value
, COALESCE(tn.treasury_native, 0) as treasury_native
, COALESCE(nt.net_treasury_value, 0) as net_treasury_value
Expand Down
3 changes: 2 additions & 1 deletion models/projects/lido/core/ez_lido_metrics_by_chain.sql
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ select
, COALESCE(f.protocol_revenue, 0) as protocol_revenue
, COALESCE(f.operating_expenses, 0) as operating_expenses
, COALESCE(ti.token_incentives, 0) as token_incentives
, COALESCE(f.protocol_revenue, 0) - COALESCE(f.operating_expenses, 0) - COALESCE(ti.token_incentives, 0) as protocol_earnings
, token_incentives + operating_expenses as total_expenses
, protocol_revenue - total_expenses as protocol_earnings
, COALESCE(t.treasury_value, 0) as treasury_value
, COALESCE(tn.treasury_native, 0) as treasury_native
, COALESCE(nt.net_treasury_value, 0) as net_treasury_value
Expand Down
3 changes: 2 additions & 1 deletion models/projects/lido/core/ez_lido_metrics_by_token.sql
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ SELECT
, COALESCE(protocol_revenue_native, 0) AS protocol_revenue
, COALESCE(operating_expenses_native, 0) AS operating_expenses
, COALESCE(ti.token_incentives_native, 0) AS token_incentives
, COALESCE(protocol_revenue_native, 0) - COALESCE(operating_expenses_native, 0) - COALESCE(ti.token_incentives_native, 0) AS protocol_earnings
, token_incentives + operating_expenses as total_expenses
, protocol_revenue - total_expenses as protocol_earnings
, COALESCE(t.treasury_value_native, 0) AS treasury_value
, COALESCE(tn.treasury_native, 0) AS treasury_native
, COALESCE(nt.net_treasury_value_native, 0) AS net_treasury_value
Expand Down

0 comments on commit bb26d13

Please sign in to comment.