Open code423n4 opened 3 years ago
0xRajeev
There is an unnecessary SSTORE by setting pendingOwner state variable to zero address, when this is not checked anywhere but only prevents multiple accepts from the same pendingOwner which is not harmful.
https://github.com/code-423n4/2021-09-wildcredit/blob/c48235289a25b2134bb16530185483e8c85507f8/contracts/external/Ownable.sol#L39
https://github.com/code-423n4/2021-09-wildcredit/blob/c48235289a25b2134bb16530185483e8c85507f8/contracts/external/Ownable.sol#L36
Manual Analysis
Remove the setting of pendingOwner state variable to zero address.
Handle
0xRajeev
Vulnerability details
Impact
There is an unnecessary SSTORE by setting pendingOwner state variable to zero address, when this is not checked anywhere but only prevents multiple accepts from the same pendingOwner which is not harmful.
Proof of Concept
https://github.com/code-423n4/2021-09-wildcredit/blob/c48235289a25b2134bb16530185483e8c85507f8/contracts/external/Ownable.sol#L39
https://github.com/code-423n4/2021-09-wildcredit/blob/c48235289a25b2134bb16530185483e8c85507f8/contracts/external/Ownable.sol#L36
Tools Used
Manual Analysis
Recommended Mitigation Steps
Remove the setting of pendingOwner state variable to zero address.