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
The WhitelistVotingStrategy allows the Space contract to provide an ordered list of whitelisted users, so that the strategy can check that a given user is allowed to vote. It searches through this list using a binary search. However, this leads to two main problems:
When the admin / owner of a space updates the whitelist, this may involve writing an arbitrarily large number of storage slots, as they must reorder the entire list.
The gas cost of voting is higher than necessary, as every voter must run the binary search on-chain.
An alternative to this would be to provide the WhitelistVotingStrategy with an unordered list of members. When a user votes, they must provide the index of their own whitelist entry, so that the contract only needs to confirm that their address is at that index in the list, without going over any other entries. They could provide this index using the userParams field.
The text was updated successfully, but these errors were encountered:
The WhitelistVotingStrategy allows the Space contract to provide an ordered list of whitelisted users, so that the strategy can check that a given user is allowed to vote. It searches through this list using a binary search. However, this leads to two main problems:
An alternative to this would be to provide the WhitelistVotingStrategy with an unordered list of members. When a user votes, they must provide the index of their own whitelist entry, so that the contract only needs to confirm that their address is at that index in the list, without going over any other entries. They could provide this index using the userParams field.
The text was updated successfully, but these errors were encountered: