-
Notifications
You must be signed in to change notification settings - Fork 7
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
Delegatee can prevent his delegators to undelegate and withdraw votes #245
Comments
141345 marked the issue as duplicate of #116 |
141345 marked the issue as duplicate of #82 |
alcueca changed the severity to 3 (High Risk) |
alcueca changed the severity to 2 (Med Risk) |
alcueca marked the issue as satisfactory |
141345 marked the issue as not a duplicate |
141345 marked the issue as duplicate of #375 |
alcueca marked the issue as selected for report |
alcueca marked the issue as duplicate of #182 |
alcueca marked the issue as not selected for report |
alcueca changed the severity to 3 (High Risk) |
Lines of code
https://github.com/code-423n4/2023-08-verwa/blob/main/src/VotingEscrow.sol#L331
https://github.com/code-423n4/2023-08-verwa/blob/main/src/VotingEscrow.sol#L383
https://github.com/code-423n4/2023-08-verwa/blob/main/src/VotingEscrow.sol#L384
Vulnerability details
Impact
Users in the
VotingEscrow
contract can delegate their voting balance to other accounts with a non-zero stake. To undelegate his votes back the user has to satisfy following conditionsThis leads to a situation where a user with a delegatee would be unable to undelegate and withdraw his CANTO tokens without increasing his own lock. In the edge case malicious delegatee can prevent delegator from undelegating his votes.
Alice has a lock, she delegates to Bob, later she wants to undelegate her votes, she extends her lock (to satisfy to.end >= from.end). Bob frontruns her transaction and increases his lock first, thus his lock time is greater than Alice's. As a result Alice needs to increase lock again to undelegate and Bob can repeat a frontrun again.
Proof of Concept
test case for
VotingEscrow.t.sol
Tools Used
Foundry
Recommended Mitigation Steps
Implement a function that will allow delegator to forcefully undelegate his votes if needed.
Assessed type
DoS
The text was updated successfully, but these errors were encountered: