Open code423n4 opened 3 years ago
WatchPug
https://github.com/pooltogether/v4-core/blob/055335bf9b09e3f4bbe11a788710dd04d827bf37/contracts/prize-pool/PrizePool.sol#L284-L297
function setTicket(ITicket _ticket) external override onlyOwner returns (bool) { address _ticketAddress = address(_ticket); require(_ticketAddress != address(0), "PrizePool/ticket-not-zero-address"); ...
_ticketAddress is unnecessary as it's being used only once.
_ticketAddress
Change to:
function setTicket(ITicket _ticket) external override onlyOwner returns (bool) { require(address(_ticket) != address(0), "PrizePool/ticket-not-zero-address"); ...
PR: https://github.com/pooltogether/v4-core/pull/219
Sponsor has mitigated
Handle
WatchPug
Vulnerability details
https://github.com/pooltogether/v4-core/blob/055335bf9b09e3f4bbe11a788710dd04d827bf37/contracts/prize-pool/PrizePool.sol#L284-L297
_ticketAddress
is unnecessary as it's being used only once.Recommendation
Change to: