-
Notifications
You must be signed in to change notification settings - Fork 13
feat(overlord): compute proposal's scores_total_value
#595
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
Conversation
scores_total_valuescores_total_value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to compute a proposal's scores_total_value by implementing a new background job that processes ended proposals and calculates their total voting power value. The feature calculates the monetary value of all votes on a proposal by multiplying voting scores by their corresponding strategy values.
- Implements a new background job to compute proposal scores total value
- Adds a reusable function to calculate proposal value based on vote scores and strategy values
- Integrates the new job into the server startup process
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/index.ts | Imports and starts the new proposals scores value refresh job |
| src/helpers/proposalsScoresValue.ts | Implements the background job that processes proposals and updates their scores_total_value |
| src/helpers/entityValue.ts | Adds getProposalValue function to calculate total proposal value from scores and strategy values |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
a351b4d to
32e0172
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fix: remove invalid data validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
27fd30b to
25b5e9a
Compare
In continuation of #593
This PR will set the proposal's scores_total_value with an async script
It's using a simple local computation, to get the total value, from existing data, only on closed proposals, and with final scores_state.