MetricsDAO / harmony_dbt

DBT Project for the Harmony Blockchain
12 stars 8 forks source link

[Table] Delegators #74

Closed antonyip closed 2 years ago

antonyip commented 2 years ago

Description Let's create a table using harmony.dev.stg_delegators as the source data table. The idea behind this is to expose delegator data to Flipside's Velocity.

Additional Questions you can ask yourself:

To Do Next:

covendev commented 2 years ago

would be interested to work on this task. Can you please redirect me to the link that points to harmony.dev.stg_delegators and other related data linked to it that is presently available

geewynn commented 2 years ago

Proposed schema

day_date delegator_address total_amount_delegated total_amount_undelegated delegator_reward
2022-02-20 00:00:00.000 "one1fg5vsk0gy0jd2nf6m68zg7cxukcnsqwpncxaj0" 0 9.6e+21 1.24611807796064e+18

cc: @forgxyz @antonyip @chuxinh please let me know if this looks good. reference:

  1. https://docs.harmony.one/home/developers/api/methods/staking-related-methods/hmy_getdelegationsbyvalidator
  2. https://docs.harmony.one/home/developers/api/methods/staking-related-methods/hmy_getdelegationsbydelegatorandvalidator
  3. https://docs.harmony.one/home/developers/api/methods/staking-related-methods/hmy_getdelegationsbydelegator
antonyip commented 2 years ago

@geewynn Heya, Might wanna reference this for notes :) https://github.com/MetricsDAO/harmony_dbt/issues/73#issuecomment-1073254439

geewynn commented 2 years ago

Hey @antonyip I have gone through the reply and was wondering if there's anything in particular you think can be added to the model above.

I am also thinking if I should remove the validator_address, validatos_address_hex from the model and only focus on the data relevants to the delegators.

Columns can be day_date, delegator_address, total_amount_delegated, total_amount_undelegated, delegator_reward

How do you feel about this?

antonyip commented 2 years ago

yup, sounds good.