code-423n4 / 2021-10-pooltogether-findings

0 stars 0 forks source link

Unnecessary Multiple Return Statements (PrizePool.sol) #15

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

ye0lde

Vulnerability details

Impact

Gas savings and code clarity

Proof of Concept

PrizePool.sol: https://github.com/pooltogether/v4-core/blob/35b00f710db422a6193131b7dc2de5202dc4677c/contracts/prize-pool/PrizePool.sol#L383-L387

Tools Used

Visual Studio Code, Remix

Recommended Mitigation Steps

Replace this https://github.com/pooltogether/v4-core/blob/35b00f710db422a6193131b7dc2de5202dc4677c/contracts/prize-pool/PrizePool.sol#L383-L387 with return (ticket == _controlledToken)

PierrickGT commented 3 years ago

PR: https://github.com/pooltogether/v4-core/pull/227

GalloDaSballo commented 3 years ago

The sponsor has used the improvement