oso icon indicating copy to clipboard operation
oso copied to clipboard

Create daily de-duped events for TVL volume and LP fees

Open ccerv1 opened this issue 8 months ago • 1 comments

What is it?

Here's what we currently do for TVL: https://github.com/opensource-observer/oso/blob/main/warehouse/oso_sqlmesh/models/intermediate/defillama/int_events_daily__defillama_tvl.sql

Definition of done:

  • A single int_events_daily__* model that be used for timeseries metrics

There are probably two ways of accomplishing this:

  • Update int_events_daily__defillama_tvl to include the new event types (one big model)
  • Create smaller standalone models to handle each DefiLlama metric (TVL, TVL volume, LP fees) and then union into a single model

Here are some examples for inspiration:

  • GitHub -- smaller staging models get unioned into a single event model

  • 4337 -- a single staging model employs filtering logic to arrive at three distinct event types

ccerv1 avatar May 20 '25 12:05 ccerv1