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
Remove TokenTimelock, PaymentSplitter, ERC20Snapshot, ERC20VotesComp, GovernorVotesComp #4276
Remove TokenTimelock, PaymentSplitter, ERC20Snapshot, ERC20VotesComp, GovernorVotesComp #4276
Conversation
|
No dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No dependency changes detected in pull request Pull request alert summary
|
Upgradeable patch needs to be updated. |
5a7efab
to
baaf484
Compare
Hey there, out of curiosity what was the rationale behind the removal of PaymentSplitter? It was quite a useful contract that I have utilised a variety of times during development, particularly with ERC-721 token contracts with multiple shareholders. |
Hello @ItsCuzzo The PaymentSplitter received a lot of criticism related to the inability to update the share. Some people would expect the shares to be transferable using an ERC20 or ERC721 interface. The plan is to remove the old version (that suffers limitations) in version 5.0, and then reintroduce a better version down the line in 5.1 or 5.2. In the meantime, the old version remains available in the 4.X versions. |
Awesome, I did see some of that discussion now that you mention it. Thanks for the detailed reply! |
Hey, is it the same story with |
Please say more about "ultra lightweight"? |
I mean DAOs with |
This doesn't sound like the best design. |
There are many approaches to build DAOs and I agree that the absence of delegation might break some design decision. But there is one case with 2 step DAOs. In these DAOs there is a set of validators that is elected by regular members to veto proposals. These validators should not delegate and they have fixed voting power. Snapshots here fix the problem when there are 2 proposals (regular and to remove a validator). Let's say the regular one lasts for 2 weeks and the removal is only 1 week long. So if validator gets removed, he won't be able to vote on the regular proposal even though it was created first. |
To add more context:
Planning for 5.0, we felt that the If you really want, you should be able to adapt |
We got similar questions quite a few times and I think we need to provide a bit more clarity on how to replace ERC20Snapshot. Although I agree with @Amxx in that people should generally use
I'd generally go for adapting an ERC20Votes because it guarantees support during the 5.x version, but given that the contract is built for governance purposes, I see there are a few important differences to ERC20Snapshot:
So the ERC20Votes should be overridden to use a counter as Also, an ERC20Snapshot implemented from scratch is also relatively easy using the OpenZeppelin Checkpoints primitive. Here's a reference PoC. Unaudited as well. |
Fixes LIB-874
PR Checklist
npx changeset add
)