You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivation
The current Votes.behavior.js tests cover a lot of the basic functionality around vote delegation and signatures. However, they don't fully address use cases related to non-fungible tokens (NFTs), especially when it comes to dynamic vote weights or delegation behavior based on NFT ownership and metadata.
With NFTs being used more in governance systems, it would be helpful to have tests that focus on how voting works when the token’s value or voting power is tied to its metadata or other unique properties.
📝 Details
I'd like to suggest extending the current tests to handle a few specific NFT-related scenarios:
Dynamic Vote Weights for NFTs:
Right now, the getWeight function just returns 1n for non-fungible tokens, but in real-world use, the vote weight could vary based on the NFT’s metadata (e.g., rarity). Adding a mock or example test for this kind of weight calculation could be really useful.
Delegation Behavior with NFT Transfers:
What happens when an NFT is delegated for votes and then transferred to someone else? The current tests don’t cover this edge case. It would be great to add a test that ensures delegation is revoked when the NFT changes ownership.
Batch Voting and Large-Scale NFT Governance:
Governance using large NFT collections might involve batch delegations or complex scenarios. Expanding the test coverage here would help ensure the system handles these cases without performance issues.
A couple of possible API tweaks to support this testing:
Add a callback or configurable function to getWeight so the weight of an NFT can be based on its metadata.
Include scenarios where delegation or vote weight changes dynamically when NFTs are transferred between accounts.
These additions would help make the Votes contract more robust for projects using NFTs in their governance models.
The text was updated successfully, but these errors were encountered:
Motivation
The current Votes.behavior.js tests cover a lot of the basic functionality around vote delegation and signatures. However, they don't fully address use cases related to non-fungible tokens (NFTs), especially when it comes to dynamic vote weights or delegation behavior based on NFT ownership and metadata.
With NFTs being used more in governance systems, it would be helpful to have tests that focus on how voting works when the token’s value or voting power is tied to its metadata or other unique properties.
📝 Details
I'd like to suggest extending the current tests to handle a few specific NFT-related scenarios:
Dynamic Vote Weights for NFTs:
Right now, the getWeight function just returns 1n for non-fungible tokens, but in real-world use, the vote weight could vary based on the NFT’s metadata (e.g., rarity). Adding a mock or example test for this kind of weight calculation could be really useful.
Delegation Behavior with NFT Transfers:
What happens when an NFT is delegated for votes and then transferred to someone else? The current tests don’t cover this edge case. It would be great to add a test that ensures delegation is revoked when the NFT changes ownership.
Batch Voting and Large-Scale NFT Governance:
Governance using large NFT collections might involve batch delegations or complex scenarios. Expanding the test coverage here would help ensure the system handles these cases without performance issues.
A couple of possible API tweaks to support this testing:
Add a callback or configurable function to getWeight so the weight of an NFT can be based on its metadata.
Include scenarios where delegation or vote weight changes dynamically when NFTs are transferred between accounts.
These additions would help make the Votes contract more robust for projects using NFTs in their governance models.
The text was updated successfully, but these errors were encountered: