Skip to content

Conversation

@wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Oct 1, 2025

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.

@wa0x6e wa0x6e requested a review from Copilot October 1, 2025 12:50
@wa0x6e wa0x6e changed the title feat: compute proposal's scores_total_value feat(overlord): compute proposal's scores_total_value Oct 1, 2025
Copy link
Contributor

Copilot AI left a 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.

@wa0x6e wa0x6e force-pushed the feat-set-proposals-scores-total-value-2 branch from a351b4d to 32e0172 Compare October 1, 2025 13:23
@wa0x6e wa0x6e requested a review from Copilot October 1, 2025 13:24
Copy link
Contributor

Copilot AI left a 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.

@wa0x6e wa0x6e requested a review from Copilot October 1, 2025 14:36
Copy link
Contributor

Copilot AI left a 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.

@wa0x6e wa0x6e force-pushed the feat-set-proposals-scores-total-value-2 branch from 27fd30b to 25b5e9a Compare October 1, 2025 14:40
@wa0x6e wa0x6e requested a review from bonustrack October 1, 2025 14:41
@bonustrack bonustrack merged commit 6f2c01e into master Oct 1, 2025
2 checks passed
@bonustrack bonustrack deleted the feat-set-proposals-scores-total-value-2 branch October 1, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants