๐Ÿ”ง CuteHive Proposal Voters Logic Upgrade: Fixing Voting Discrepancy

Words
374
Reading
2 min
Listen
Play
5M

While using CuteHive to browse proposal data, I recently noticed a significant issue โ€” a major discrepancy between the total voting weight of a specific proposal and the calculated result from its voters list.

This prompted a deeper investigation, which ultimately led to identifying a critical logic flaw.

image.png

๐Ÿงฉ The Issue: Inconsistent Voting Weight

CuteHive provides a very useful feature:

๐Ÿ‘‰ View voters of a proposal, sorted by voting weight, along with a calculated total.

In theory:

The total voting weight shown in the proposal list โ‰ˆ the sum calculated from the voters list

However, in practice:

  • The difference was massive โ—
  • This seriously affected the accuracy of evaluating proposal support

b90768b22860766d56cf6c87a46bc9b7.png

๐Ÿ” Root Cause: Ignoring the Proxy Mechanism

After further analysis, the issue turned out to be related to a core feature of the Hive blockchain โ€” proxy voting.

In Hive:

  • If a user sets a proxy
  • Their governance voting power is delegated to that proxy account
  • Their own direct votes no longer count

โš ๏ธ However, in previous versions of CuteHive:

  • โŒ Proxy status was not checked
  • โŒ Voting weight from proxied users was still included
  • ๐Ÿ‘‰ This led to significantly inflated and inaccurate totals

d5f345467a3634d7caa9a00582463f79.png

๐Ÿ› ๏ธ The Fix: Rebuilding Proposal Voters Logic

I have updated the calculation logic to align with Hiveโ€™s on-chain governance rules.

โœ… Key Changes

1. Logic Update (ProposalList.tsx)

  • Added a check for the proxy field
  • Applied the rule:

    If a voter has a proxy set, their voting weight (HP) is counted as 0

2. Type Definition Update (types.ts & ProposalVotersModal.tsx)

  • Added an optional proxy field to the VoterData interface:

    proxy?: string;

3. UI Feedback Enhancement (ProposalVotersModal.tsx)

For invalid votes caused by proxy settings:

  • An orange warning is displayed under the username:

    Proxied to username@username (Vote Ignored)

  • These accounts are automatically sorted to the bottom (HP = 0)

71af71558817885508939ce09dbddb6d.png

๐ŸŽฏ Result

The updated Proposal Voters list now:

โœ… Accurately reflects real, effective voting weight
โœ… Clearly distinguishes between:

  • โœ”๏ธ Direct support (valid votes)
  • โš ๏ธ Ignored votes (proxied users)

โœ… Improves transparency and trust in proposal analysis


๐Ÿš€ Version Update

This fix has been released:

  • ๐Ÿ“ฆ Version: 3.3.63
  • ๐Ÿ”— Link: https://www.cutehive.com/proposals
  • ๐Ÿ’ก If you're using CuteHive, feel free to try the new version and share your feedback ๐Ÿ™Œ
๐Ÿ”ง CuteHive Proposal Voters Logic Upgrade: Fixing Voting Discrepanc... | Ecency