near / near-public-lakehouse

NEAR Public Lakehouse
GNU General Public License v3.0
3 stars 0 forks source link

Public Lakehouse: fix mainnet_explorer_public.aggregated__circulating_supply #21

Closed abhishekanirudhan closed 2 months ago

abhishekanirudhan commented 3 months ago

The table mainnet_explorer_public.aggregated__circulating_supply has aggregate supply statistics. This table stopped updating on Mar 21, 2024.

We use this table to understand total supply, including circulating and locked, and total staked and unstaked by day.

eduohe commented 2 months ago

Implementing Aggregated Circulating Supply Pipeline

based on these references:

eduohe commented 2 months ago

@abhishekanirudhan there are lockup contracts that contains a bug in the lockup amount calculation method, for this reason we can't rely entirely on RPC function calls. Indexer for explorer handled this issue with a custom logic. I created a RUST API that implement the Indexer for explorer logic and deployed in GCP Cloud Run to use in this pipeline.

The API returns the lockup amount per account that will give us better data granularity.

New databricks tables:

Currently running a backfill for the dates > 2024-04-22

eduohe commented 2 months ago

backfill finished