Skip to content
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

fix(protocol): revert auto snapshot PR #16801

Merged
merged 5 commits into from
Apr 23, 2024
Merged

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented Apr 22, 2024

Reverting this PR: https://github.com/taikoxyz/taiko-mono/compare/main...revert_auto_snapshot_feat?expand=1

Reason: we used it wrong, snapshot is not the voting power.

From Jordi:

I am looking at the protocol commit that you added for taking snapshots, but I would need some help to clarify the intended use of the base OpenZeppelin contracts.

I see that TaikoToken is based on ERC20SnapshotUpgradeable and ERC20VotesUpgradeable, at the same time.

The merged PR triggers a snapshot using the ERC20SnapshotUpgradeable primitives. However, this contract is only designed to handle balances, not delegation.

If we want to work with delegation, then we have to use Erc20VotesUpgradeable, which creates checkpoints at each transfer but doesn't support snapshots.

@dantaik dantaik changed the title feat(protocol): revert auto snapshot PR fix(protocol): revert auto snapshot PR Apr 22, 2024
@dantaik dantaik marked this pull request as ready for review April 22, 2024 16:15
Copy link

openzeppelin-code bot commented Apr 22, 2024

fix(protocol): revert auto snapshot PR

Generated at commit: 83542c1ca73a63709d0e1999e6d068695b1bb149

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
2
2
0
4
39
47
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@dantaik dantaik enabled auto-merge April 22, 2024 16:27
@dantaik dantaik added this pull request to the merge queue Apr 23, 2024
Merged via the queue into main with commit ef00cae Apr 23, 2024
7 checks passed
@dantaik dantaik deleted the revert_auto_snapshot_feat branch April 23, 2024 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants