Langstroth

🔧 CuteHive Proposal Voters Logic Upgrade: Fixing Voting Discrepancy

by @cutehive.com · 0 votes · 0.000 HBD
While using [CuteHive](https://www.cutehive.com/proposals) 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](https://images.hive.blog/DQmNc8gephXCKKs7GJaBnAUUm1eE11F6Dg8XU28sWNPGiH3/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](https://images.hive.blog/DQmbdR7jg7ECN8Jr25S3e48MGSx4nmjWwJXiCPpKGDDsL1s/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](https://images.hive.blog/DQmb6SXZtn2aAYa7X4T74FZyHAnw3j6SKGm7ByCqMPbxEPc/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 (Vote Ignored) - These accounts are automatically sorted to the bottom (HP = 0) ![71af71558817885508939ce09dbddb6d.png](https://images.hive.blog/DQmTdZpXR6breFydy1sevdU8UqhyTgB2zKsVuq4s4Wfo2AN/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 🙌