Governance Delegation of HTS Fungible Tokens, NFTs (with Rarity Weighting), and HCS Topics #1358
lennynerowuzhere
started this conversation in
Ideas
Replies: 1 comment
-
|
Some feedback here:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
title: Governance Delegation of HTS Fungible Tokens, NFTs (with Rarity Weighting), and HCS Topics
author: Lenny Nero lennynero722@gmail.com
working-group: Native Hedera Economic Stack
requested-by: Hedera Community
type: Standards Track
category: Service
status: Draft
needs-hiero-approval: Yes
needs-hedera-review: Yes
created: 2025-09-05
updated: 2025-12-12
requires: 206, 218, 336, 632, 1081, 1195
Abstract
This HIP introduces a native Hiero mechanism for accounts (delegators) to delegate governance voting power—derived from HTS fungible tokens, NFTs with rarity weighting, and HCS topics—to another account (delegate) without transferring or approving tokens. The proposal defines new HAPI transactions (
CryptoApproveGovernanceDelegation,CryptoRevokeGovernanceDelegation,TokenSetWeightRule,CryptoRecordSelfVote,SubmitVote), queries (GetGovernanceWeight,GetDelegationsByDelegate,GetDelegators,GetVoteTally), and weight calculation rules for FT balances, NFT counts/rarities/traits, and HCS topic scopes.Key innovations include Progressive Immutability via
rule_admin_key, Event-Based Self-Vote Exclusion (L1 records events to the stream; L2 Block Nodes compute exclusions—no unbounded lists on L1), HIP-1195 Hook Integration for custom validation logic, State Bloat Prevention through strict delegation limits and mandatory state rent, and adherence to the Layer Architecture where L1 consensus nodes handle only delegation anchoring while L2 Block Nodes (HIP-1081) manage historical weight calculations and tally logic.Delegation is non-custodial: no spend rights, no token approvals, no content-decryption rights are granted.
Motivation
Current governance systems on Hedera face several challenges that this HIP addresses:
Multi-wallet governance complexity: Users holding governance tokens and NFTs across multiple cold wallets find it impractical to sign transactions from each wallet for every vote. This creates friction in DAO participation and reduces engagement. A user with holdings split across five hardware wallets would need to perform five separate signing ceremonies for each proposal.
Unsafe workarounds: The existing HIP-336 allowance mechanism grants spending rights, which is inappropriate and unsafe for pure governance delegation. Users should not need to risk their assets to participate in voting. Current workarounds require users to either consolidate tokens (gas costs, tax implications) or grant dangerous permissions.
NFT rarity matters: Many NFT collections have inherent rarity hierarchies where certain serials carry more governance weight (grail pieces, founder editions, trait combinations). Without standardization, each project implements ad-hoc logic leading to fragmentation, poor user experience, and potential manipulation. A "Legendary" NFT should carry more governance weight than a "Common" one.
Cross-ecosystem governance: DAOs and councils operating on Hedera Consensus Service (HCS) need a native way to honor voting delegation that works consistently across all token types. Currently, each DAO must build custom delegation logic.
Institutional requirements: Enterprises and institutions need compliant, auditable delegation mechanisms that preserve custody while enabling participation in network governance. Current solutions don't meet enterprise compliance requirements.
Double-counting vulnerability: Existing delegation patterns fail to prevent delegators from voting with their own tokens AND having their delegate vote with the same delegated power, effectively doubling their influence. This undermines governance integrity.
Inflexible immutability: Binary "immutable" flags force projects to choose between complete flexibility (risky—rules can change arbitrarily) or permanent lock-in (inflexible—no path to improvement). Progressive immutability via admin key removal provides a path from managed to trustless governance.
Smart contract overhead: EVM-based governance contracts (OpenZeppelin Governor, Compound) cost $2-10+ per vote and introduce vulnerability surface. The 2022 Beanstalk governance attack resulted in $182M in losses due to flash loan manipulation of governance contracts. Native protocol implementation reduces costs to $0.05 per delegation while eliminating entire vulnerability classes.
A native governance delegation primitive with event-based self-voting prevention, strict state limits, and progressive immutability solves these problems by providing a secure, standardized, and user-friendly mechanism that works uniformly across wallets, explorers, and dApps.
Rationale
Design Decisions
Non-custodial by design: Unlike spending allowances (HIP-336), governance delegation grants zero transfer rights. The delegator retains full custody and control of assets. Even if a delegate's keys are compromised, the delegator's assets remain safe.
Progressive Immutability via
rule_admin_key: weight rules include arule_admin_keyfield:Key rule_admin_key = 8; //When present, this key can modify the rules. When set to an empty
KeyList, the rules become permanently immutable. This allows projects to start with admin control and progressively decentralize by removing the key—providing a migration path from managed to trustless governance.Event-Based Self-Vote Exclusion (Zero L1 State Growth): Previous designs stored
self_voted_proposal_idson L1, creating unbounded list growth. The corrected design:CryptoRecordSelfVoteas an event in the record stream (not state)last_vote_timestampon the account (O(1) state)This eliminates the "zombie list" risk entirely—zero state growth on L1 for voting activity.
Strict Delegation Limits (Anti-DoS): To prevent state bloat attacks:
These limits ensure bounded state growth even under adversarial conditions.
HIP-1195 Hook Integration: Every state-changing transaction includes a
hook_idfield for custom governance rules (quorum requirements, voting windows, proposal validation) without consensus node complexity.Layer Architecture Compliance:
Prior Art and Compatibility
This HIP builds on existing standards: HIP-206/218 (HTS-EVM integration), HIP-336 (allowances—the anti-pattern we avoid), HIP-632 (signature validation), HIP-1081 (Block Nodes), HIP-1195 (Hiero Hooks), and draws from OpenZeppelin Governor and Compound Governor patterns while eliminating EVM overhead.
User Stories
DAO Member: "I want to delegate my cold wallet holdings to a hot wallet so I can vote without moving funds or exposing my keys."
NFT Collector: "I want to delegate my rarity-weighted NFT collection to a trusted delegate for community votes, knowing they can't transfer or sell my assets."
Institution: "I want to consolidate governance power from multiple custodial accounts without moving tokens between accounts or compromising security."
Project Founder: "I want to configure my NFT collection so that legendary traits carry 10x voting weight compared to common traits, and later remove the admin key to make these rules permanent."
Voter: "I want my wallet to show me all the delegated voting power I have from others, broken down by token and source."
DAO Operator: "I want to query total voting weight at a historical consensus timestamp to ensure votes are counted fairly, without double-counting delegators who voted directly."
Delegator Who Votes: "I want to vote on a specific proposal myself, and have the system automatically exclude my tokens from my delegate's voting power for that proposal only."
AI Agent Operator: "I want to delegate limited governance power to an AI agent with HIP-1618 safety controls, allowing automated participation within defined bounds."
Specification
Layer Architecture
L1 Prohibited Operations: Loops, delegation graph traversal, weight aggregation, division, file storage, Merkle tree iteration, unbounded list storage.
State Limitations (Anti-Bloat)
Block Node Role
The Block Node (HIP-1081) is REQUIRED for this HIP and handles:
computeWeightSnapshotquerySelfVoteEventscalculateExclusionsvalidateMerkleProofcomputeVoteTallygenerateStateProofCore Type Changes
NftWeightRule with Progressive Immutability:
GovernanceDelegation (Optimized - No Unbounded Lists):
Transaction Bodies with Hooks
All state-changing transactions include
hook_id:SubmitVoteTransactionBody:
CryptoApproveGovernanceDelegationTransactionBody:
CryptoRecordSelfVoteTransactionBody (Event-Based):
Event-Based Self-Vote Exclusion Algorithm (L2)
The Block Node executes this algorithm—never L1:
Progressive Immutability Workflow
Weight Calculation Semantics
Fungible Tokens:
weight = token_balance(in smallest denomination)NFTs (COUNT):
weight = number_of_NFTs_ownedNFTs (PER_SERIAL): Block Node validates Merkle proofs:
merkleVerifySHA384(root, serial, weight, proof)NFTs (TRAIT_BASED): Block Node validates:
merkleVerifySHA384(root, sha384(traits), weight, proof)Fee Schedule
Security Considerations
Non-custodial guarantee: Delegation grants zero spending or transfer rights. Tokens remain fully controlled by the delegator. Even if a delegate's keys are compromised, delegated assets cannot be stolen.
Event-based self-vote exclusion: Self-votes are recorded as events in the record stream, not as unbounded lists in L1 state. Block Nodes query the event stream to compute exclusions. This eliminates the "zombie list" attack vector entirely.
State bloat prevention: Strict limits (max 3 delegates, max 10 scopes, mandatory state rent) prevent DoS attacks via cheap delegation spam. The $0.05 fee aligns with TokenAssociation costs.
Progressive immutability security: The
rule_admin_keypattern provides verifiable immutability status (users check before trusting), gradual transition path (not all-or-nothing), and accountability (key removal is visible on-chain).Replay protection: Each delegation includes a unique nonce preventing replay attacks.
Merkle commitment security: SHA-384
merkle_rootis committed at rule configuration time, preventing retroactive weight manipulation.Non-transitive delegation: Delegates cannot re-delegate to third parties, maintaining delegator control.
Access separation: Governance delegation does NOT grant access to encrypted NFT content (HIP-1612) or redeemable reserves (HIP-1613).
O(1) L1 Complexity: Consensus nodes never iterate or store unbounded data. All loops, aggregations, and historical queries are offloaded to Block Nodes.
Backward Compatibility
This HIP is fully additive with no breaking changes. Existing tokens, NFTs, and HCS topics continue functioning unchanged. Legacy wallets ignore new fields. No state migration required.
rule_admin_keyis optional; if absent, weight rules use token's admin_key.How to Teach This
For Token Holders: "Delegation is like giving someone your voting proxy, but not your wallet keys. If you vote directly, your tokens are automatically excluded from your delegate's count—tracked via events, not stored on-chain."
For DAO Operators: "Configure NFT weights with COUNT, PER_SERIAL, or TRAIT_BASED modes. Start with admin key, transition to multisig, then lock permanently. Max 10 scopes per delegation."
For Developers: "All heavy computation happens at Block Nodes. Self-vote exclusion uses the event stream—no L1 state growth. Your consensus interactions stay O(1)."
Reference Implementation
See
assets/hip-1611/governance.protofor complete protobuf definitions.Rejected Ideas
rule_admin_keyenables gradual transitionOpen Issues
proof_urllength to prevent abuse?References
Beta Was this translation helpful? Give feedback.
All reactions