Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lake] Hook up slots + bronze_slots table #595

Closed
9 tasks done
idiom-bytes opened this issue Feb 2, 2024 · 1 comment
Closed
9 tasks done

[Lake] Hook up slots + bronze_slots table #595

idiom-bytes opened this issue Feb 2, 2024 · 1 comment
Assignees
Labels
Type: Enhancement New feature or request

Comments

@idiom-bytes
Copy link
Member

idiom-bytes commented Feb 2, 2024

Motivation

Many dashboards may require a clean, up-to-date slots table.

This is the 2nd base table in predictoor to provide analytics.
Below are the e2e steps to get bronze_pdr_slots data implemented with the current system.

DoD

  • subgraph_slot.py already implements a get_slot() to fetch latest slots.
  • subgraph object needs to be created
  • subgraph mock objects and fixtures
  • lake/table_pdr_slot.py needs to be created
  • schema for dfs needs to be created
  • hooks for gql_data_factory.py
  • hooks for bronze_pdr_slots.py
  • logic for bronze_pdr_slots.py to join data from [slots, predictions, truevals, and payouts]
  • tests and coverage
@idiom-bytes
Copy link
Member Author

We want properties from all 4 tables:

  1. slots (info about the slot, feed, etc..)
  2. predictions (all predictions submitted and their final results)
  3. truevals (what was the final result)
  4. payouts (gives you total revenue, and payout of individuals)

I'll try to expand the following...

{
  predictSlots(last:1000, next: 15000) {
    id
    slot
    roundSumStakesUp
    roundSumStakes
    predictions {
      id
      user {
        id
      }
      stake
    }
    revenue
    revenues {
      id
      amount
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants