compound-finance / compound-protocol

The Compound On-Chain Protocol
https://compound.finance/developers
BSD 3-Clause "New" or "Revised" License
1.89k stars 1.21k forks source link

Redundant check in Unitroller::acceptAdmin #203

Open mrcpol opened 2 years ago

mrcpol commented 2 years ago

msg.sender == address(0) in acceptAdmin() looks redundant. https://github.com/compound-finance/compound-protocol/blob/3affca87636eecd901eb43f81a4813186393905d/contracts/Unitroller.sol#L110

Instead, can add newPendingAdmin != address(0) in setPendingAdmin().

https://github.com/compound-finance/compound-protocol/blob/3affca87636eecd901eb43f81a4813186393905d/contracts/Unitroller.sol#L87

mrcpol commented 2 years ago

LOL, scammers everywhere.

image

image