Closed c4-bot-9 closed 7 months ago
https://github.com/code-423n4/2024-02-uniswap-foundation/blob/491c7f63e5799d95a181be4a978b2f074dc219a5/src/DelegationSurrogate.sol#L27 https://github.com/code-423n4/2024-02-uniswap-foundation/blob/491c7f63e5799d95a181be4a978b2f074dc219a5/src/DelegationSurrogate.sol#L27
"Delegating votes leaves the token owner with votes while giving the delegate additional votes"): if a user delegates to address(0) that vote gets lost.
https://github.com/code-423n4/2024-02-uniswap-foundation/blob/491c7f63e5799d95a181be4a978b2f074dc219a5/src/DelegationSurrogate.sol#L26C6-L26C12
manual
Don't allow delegation to address(0) by adding a check
call/delegatecall
User error
MarioPoneder marked the issue as unsatisfactory: Overinflated severity
Lines of code
https://github.com/code-423n4/2024-02-uniswap-foundation/blob/491c7f63e5799d95a181be4a978b2f074dc219a5/src/DelegationSurrogate.sol#L27 https://github.com/code-423n4/2024-02-uniswap-foundation/blob/491c7f63e5799d95a181be4a978b2f074dc219a5/src/DelegationSurrogate.sol#L27
Vulnerability details
Impact
"Delegating votes leaves the token owner with votes while giving the delegate additional votes"): if a user delegates to address(0) that vote gets lost.
Proof of Concept
https://github.com/code-423n4/2024-02-uniswap-foundation/blob/491c7f63e5799d95a181be4a978b2f074dc219a5/src/DelegationSurrogate.sol#L26C6-L26C12
Tools Used
manual
Recommended Mitigation Steps
Don't allow delegation to address(0) by adding a check
Assessed type
call/delegatecall