Decentralized Hive Fund (DHF) Vote Weighting System
Overview
This post explains the enhanced DHF vote weighting system that introduces economic rationality to proposal voting by limiting vote power based on voting commitment relative to daily inflows(10% of inflation) and apathy. hive-disregardfiat/dhf-vote-weighting
This post aims to encourage discussion, critique, and improvements to HIVE. I fully expect if this or any other derivative gets implemented it will be through thorough and lengthy discussion and testing.
Background
The original DHF system allowed accounts to vote for unlimited proposals without consequence, leading to potential economic irrationality where voters could support far more funding than the treasury could provide. The enhanced system addresses this by weighing votes based on the voter's total daily funding commitment versus the actual daily DHF inflows. Due to the nature of a good portion of our HIVE DHF being from the Ninja Mine. I also propose capping the weight penalty at the percentage of voting stake(simply calculated here as raw support for the most popular proposal divided by total Hive Power).
Key Concepts
Large Proposal Mechanism (Including Return Proposals)
The system recognizes that any proposal requesting more than the sustainable daily rate (fund/100) effectively acts as a threshold-setting mechanism:
Traditional Return Proposal: Has the treasury (hive.fund) as receiver, funds return to treasury
Alternative Large Proposals: Could go to automated market makers, burn mechanisms, or other destinations
Sustainable Rate: Treasury fund size ÷ 100 = maximum sustainable daily spending (1% of treasury per day)
Commitment Capping: For vote weighting, large proposals are capped at sustainable daily rate (fund/100)
One Large Proposal Rule: Each voter's commitment calculation only includes one large proposal. This allows voters to support multiple large ideas, knowing they are only "on the hook" for one, preventing excessive vote weight reduction.
Economic Reality: Voting for more than sustainable rate has same economic effect regardless of destination
Threshold Setting: Community can set funding thresholds via any large proposal, not just treasury returns
daily_dhf_inflow: running average of the 10% inflation that goes into the DHF total_daily_commitment: Proposals an account votes for highest_raw_vote_total: Highest unweighted proposal(highest consensus spending)
Consensus-Driven Minimum Weight Floor
The system implements a dynamic minimum weight floor that automatically adjusts based on voting participation:
Highest Raw Vote Tracking: During Phase 1, the system tracks the highest raw vote total across all proposals
Result: Consensus participation prevents vote weight from falling below 40%, effectively raising the return threshold
Implementation Details
Data Structure Changes
Global Properties (dynamic_global_property_object)
// DHF daily inflow tracking for vote weightingfc::array<asset,24>dhf_hourly_inflows=fc::array<asset,24>();///< Rolling 24-hour window of hourly DHF inflowsuint8_tdhf_current_hour_index=0;///< Current index in the rolling windowassetdhf_cached_daily_total=asset(0,HBD_SYMBOL);///< Cached sum of all 24 hourly inflowstime_point_secdhf_inflow_last_update=HIVE_GENESIS_TIME;///< Last time inflow tracking was updated
Account Object (account_object)
// DHF voting commitment tracking for vote weightingHBD_assetdhf_total_daily_commitment=HBD_asset(0);///< Total HBD/day this account is committed to via active proposal votestime_point_secdhf_commitment_last_update=fc::time_point_sec::maximum();///< Last time DHF commitment was recalculateduint16_tdhf_active_proposal_count=0;///< Number of active proposals this account is voting for
Core Algorithm Implementation
Daily Inflow Tracking
Hourly Recording: Every hour during maintenance, the dhf_interval_ledger amount is recorded in the rolling 24-hour window
Efficient Caching: The daily total is maintained as a cached sum, updated incrementally
Memory Efficient: Only stores 24 hourly values (24 × 8 bytes = 192 bytes per global state)
Vote Calculation Process
Phase 1: Raw Calculation + Commitment Tracking
sustainable_rate=treasury_fund/100highest_raw_vote_total=0foreachproposal:raw_total_votes=0foreachvoteronproposal:raw_total_votes+=voter.governance_vote_powercommitment=(proposal.daily_pay>sustainable_rate)?sustainable_rate:proposal.daily_payvoter_commitments[voter]+=commitmentifvoter_commitments[voter]>daily_inflow:flagged_voters.insert(voter)// Track highest raw vote total for minimum weight calculationhighest_raw_vote_total=max(highest_raw_vote_total,raw_total_votes)
Phase 2: Reweighting (Only if Flagged Voters Exist)
ifflagged_votersnotempty:foreachproposal:adjusted_total_votes=0foreachvoteronproposal:ifvoterinflagged_voters:proportional_weight=min(1.0,daily_inflow/voter_commitment[voter])weight_multiplier=max(proportional_weight,minimum_weight)adjusted_total_votes+=base_vote_power*weight_multiplierelse:adjusted_total_votes+=base_vote_power// Full weight
Time Complexity Analysis
Current System
Hourly Payment Cycle: O(V + P log P) where V = votes, P = proposals
Per Vote Update: O(1)
Enhanced System
Hourly Payment Cycle: O(V + U + P log P) where U = unique voters
Per Vote Update: O(1) for normal cases, O(A) for commitment recalculation where A = voter's active proposals
Best Case: No flagged voters → ~15% overhead
Worst Case: All voters flagged → ~100% overhead (2× processing)
Key Optimization: Only voters exceeding daily inflow get reweighted, minimizing computational overhead for typical scenarios.
User Experience Impact
For Voters
Transparency: dhf_total_daily_commitment field shows exact HBD/day commitment
Accountability: Other users can see voting commitment levels
Strategy: Voters must consider budget constraints when voting
Flexibility: Can still vote for return proposal + regular proposals strategically
For Proposals
Threshold Effect: Return proposal creates dynamic funding threshold, ensuring quorum for spending
Competition: Proposals must compete not just for votes but for "budget space"
Predictability: Clear relationship between votes and funding likelihood
Economic Implications
Incentive Alignment
Budget Consciousness: Voters can't just vote for everything
Prioritization: Forces voters to prioritize proposals
Threshold Flexibility: Community can set funding thresholds via any large proposal (return, burn, AMM, etc.)
Economic Reality: System recognizes that voting for more than daily inflow has the same economic effect regardless of destination
Adaptive Governance: System becomes more permissive (higher minimum weights) when community shows strong engagement
Migration and Compatibility
Hardfork Activation
System remains backward compatible until hardfork activation
New fields initialize to safe defaults (zero commitments, no weighting)
Legacy Behavior
// Use weighted calculation if hardfork is activeif(false)// TODO: Replace with actual hardfork constant{calculate_votes_with_weighting(proposals);}else{// Legacy calculation for backwards compatibilitycalculate_votes_legacy(proposals);}
Technical Implementation Details
Key Methods
update_daily_inflow_tracker()
Called hourly during DHF funding recording
Maintains rolling 24-hour window efficiently
Updates cached daily total incrementally
calculate_votes_with_weighting()
Two-phase algorithm for efficiency
Only reprocesses when flagged voters exist
Updates voter commitment stats
update_voter_dhf_commitment()
Recalculates voter's total commitment
Handles return proposal special case
Updates account statistics
Data Consistency
Atomic Updates: All vote changes and commitment updates in single database transaction
Lazy Computation: Commitment only recalculated when votes change or during payment cycles
Cache Coherence: Daily inflow total always reflects current 24-hour window
Testing and Validation
Unit Tests Required
Inflow Tracking: Verify 24-hour rolling window accuracy
Weight Calculation: Test various commitment/inflow ratios
Edge Cases: Zero inflow, single large voter, return proposal dynamics
Performance: Ensure acceptable overhead in worst-case scenarios
Market Shocks: Sudden inflow changes could dramatically affect vote weights
Conclusion
The DHF vote weighting system introduces economic rationality to proposal voting while maintaining the democratic nature of the DHF. By limiting vote power based on budget commitment, it creates incentives for thoughtful voting while preserving the ability for the community to control funding allocation through the return proposal mechanism.
The consensus-driven minimum weight floor adds a crucial democratic safeguard: when communities show high engagement (measured by highest raw vote totals), the system automatically becomes more permissive, preventing vote weight collapse and maintaining governance legitimacy. This creates a virtuous cycle where:
Adaptive Thresholds → System responds to community engagement levels
Sustainable Governance → Balance between budget constraints and participation incentives
The implementation balances computational efficiency with economic effectiveness, providing a robust foundation for sustainable DHF governance that scales with the platform's growth while rewarding active community participation.