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
This is useful in cases where the tokens are locked in a timelock contract but we still want to allow the holders to vote (even if the tokens are only promised to the address, for example after a X years lock, and are yet to actually be owned by their future owner). In this case, the contract can have a certain number of tokens in its balance and still only give a portion of the votes to each user.
It can also be used by individuals who want to spread their vote to various entities they trust in order to avoid having a single entity abuse their voting power for malicious purposes.
Maybe it is easier to join the functions into only one, since the total balance of the caller of the address is always simpler to get via code, and so it can be placed in the "amount" variable. This would save some gas.
I have made this change before for a project where the company employees had their tokens locked for 3 years and then slowly released, but they still wanted to participate in the DAO immediately. If the current delegate delegates the entire voting power of the caller (if I am reading it correctly), the contract would have to give its entire voting power to one employee.
The text was updated successfully, but these errors were encountered:
I'd prefer to avoid adding more functions to the Votes interface. But more importantly, as far as I can tell this is not possible to implement. If an account that has multiple delegates for various portions of their tokens, and they transfer some of their tokens to another account, which of the delegates will have their votes reduced? The only technically feasible approach would be to proportionally reduce the votes of all delegates, but this is not necessarily what you want, and in the example you shared I'm pretty sure it is not what you would want.
There is another way to achieve what you want. See this article on Flexible Voting.
Add a delegate function where we can specify the amount we want to delegate to Votes.sol and IVotes.sol
An example of the possible changes in the code can be seen here: https://github.com/JoaoMorais96/openzeppelin-contracts/tree/master/contracts/governance/utils. I thought it would be best to create a discussion before a pull to get some feedback.
Maybe it is easier to join the functions into only one, since the total balance of the caller of the address is always simpler to get via code, and so it can be placed in the "amount" variable. This would save some gas.
I have made this change before for a project where the company employees had their tokens locked for 3 years and then slowly released, but they still wanted to participate in the DAO immediately. If the current delegate delegates the entire voting power of the caller (if I am reading it correctly), the contract would have to give its entire voting power to one employee.
The text was updated successfully, but these errors were encountered: