-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible change: block.number to block.timestamp in Governance contracts #3546
Comments
Hello @Julian-dev28 This was discussed many times, and it is on our roadmap. Unfortunatelly, its not as simple as you make it look. Changing the governor alone is not enough, you also need the voting token to move to timestamps. Having a timestamp governor query a block.number token would be catastrophic. I'm working on a draft ERC. I'll try to remember to share it here so you can provide feedback. |
Understandable Yeah, I agree. There are some dependencies that gave me a bit of trouble when I tried to make this change locally so I get what you mean when you say it's not as easy as it may seem. Awesome. Looking forward to it! |
Closing this as a duplicate of #3081. |
The reason was to have out of the box compatibility with the tooling that was built around Compound's GovernorAlpha and GovernorBravo. |
Thanks for the update. Looking forward to the new implementation. |
Hey all,
During a conversation on discord, the Avalanche team discovered that there may be an opportunity to contribute to a Governance contract from OpenZeppelin in a way that would benefit our developers.
The contract above uses
block.number
as a timestamp which is unsuitable for users on networks such as Avalanche due to its volatile block production.summary here
Aside from allowing our users to implement this contract into their projects, we find that using
block.timestamp
will benefit Open Zeppelin's Smart Contract users by reducing the possible security risk posed by usingblock.number
.Consensys has stated the following regarding
block.number
📝 Details
Thank you for taking the time to read this.
First, I would like to understand the logic behind using
block.number
>block.timestamp
in this case, and then verify that there is an opportunity to make this change.To implement this change we would replace all
block.number
values withblock.timestamp
where applicable and with special attention to Governance related contracts.The text was updated successfully, but these errors were encountered: