-
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
Unable to undelegate if the delegatee's unlockTime exceeds that of the owner. #362
Comments
141345 marked the issue as duplicate of #116 |
141345 marked the issue as not a duplicate |
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 partial-50 |
141345 marked the issue as not a duplicate |
141345 marked the issue as duplicate of #375 |
alcueca marked the issue as partial-50 |
alcueca marked the issue as duplicate of #182 |
alcueca changed the severity to 3 (High Risk) |
Lines of code
https://github.com/code-423n4/2023-08-verwa/blob/498a3004d577c8c5d0c71bff99ea3a7907b5ec23/src/VotingEscrow.sol#L384
Vulnerability details
Description and Impact
In the
delegate()
function, if the delegatee's unlockTime surpasses that of the owner, the owner cannot perform an undelegation. As a result, the owner becomes unable to withdraw funds since thewithdraw()
function necessitates the owner's delegatee to be the owner themselves.Proof of Concept
createLock()
function to lock their tokens.delegate(Bob)
function, thereby delegating her tokens to Bob.increaseAmount()
function, extending the lock duration of his tokens.delegate(msg.sender)
function but encounters an inability to undelegate due to Bob's lock duration surpassing that of Alice's.Recommended Mitigation Steps
We recommend implementing a mechanism where the owner inherits the unlockTime of the delegatee if it happens to exceed the owner's own unlockTime.
Assessed type
Governance
The text was updated successfully, but these errors were encountered: