Closed c4-submissions closed 1 year ago
GalloDaSballo marked the issue as primary issue
IMO QA Severity, especially since it's commented in the code
0xfoobar (sponsor) disputed
GalloDaSballo changed the severity to QA (Quality Assurance)
This previously downgraded issue has been upgraded by GalloDaSballo
GalloDaSballo changed the severity to QA (Quality Assurance)
GalloDaSballo marked the issue as grade-c
It is believed that the code being audited is a snapshot of deployment ready code, the TODO
might have as well been forgotten as we have seen code being deployed without all Todo's being cleared.
Therefore at the snapshot of this code, it does sweep to address(0)
Lines of code
https://github.com/delegatexyz/delegate-registry/blob/6d1254de793ccc40134f9bec0b7cb3d9c3632bc1/src/DelegateRegistry.sol#L151-L158
Vulnerability details
Impact
The sweep function is used to sweep every token in the Registry to a hardcoded address. However there is an issue. The address which is being swept to is address(0). The code highlights it as something to be changed. However this was not listed under the known issues, therefore it is an oversight here as any time sweep is called, it gets sent to address(0)
Proof of Concept
The hardcoded address is the zero address. Therefore all swept funds go to address(0)
Tools Used
Manual Review
Recommended Mitigation Steps
Use a proper address as the token receiver.
Assessed type
ETH-Transfer