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

[ETL] Use revenue + roundStakes from truevals to update slots. Use revenue + roundStakes from payouts to calculate user-relative revenue. #1183

Closed
4 tasks
idiom-bytes opened this issue Jun 10, 2024 · 1 comment
Assignees
Labels
Type: Enhancement New feature or request

Comments

@idiom-bytes
Copy link
Member

Background / motivation

Previous ETL implementation has a bunch of artifacts that need to be moved around... After hooking up slots, remove revenue & roundSumStakes from payout.

  • Previous implementation for payout, also retrieves slots data.
  • revenue/roundSumStakes from slots data is stored in payouts table
  • payouts table if anything, should calculate user-relative-revenue but does not

I made some adjustments here as a pseudo-implementation but will implement these later after update & slots is integrated.
image

TODOs / DoD

After getting insert + updates in place, cleanup payout event and how user-relative-revenue is being calculated.

Tasks:

  • Remove revenue and slots data from payouts table
  • Calculate userRevenue inside payout (by using slots data) such that we have easy-to-access user-relative-revenue
  • Revenues[] inside event truevals.slot[] also includes all user-relative revenue, but this would lead to a lot of joins
  • Rather, we can optimize 1->N joins, by simply calculating user-relative revenue in the payouts event
@idiom-bytes
Copy link
Member Author

This is now tracked with #1299, closing here and addressing this 1 by 1.

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

No branches or pull requests

1 participant