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

0 stars 0 forks source link

Inline functions _updateClaimedEpoch and _isClaimedEpoch #144

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

Functions that are only used within this contract and are invoked only once can be refactored to eliminate extra gas costs of calling a function. Such functions are _updateClaimedEpoch and _isClaimedEpoch. This may reduce the readability so consider if you want to sacrifice it for a bit cheaper execution.

PierrickGT commented 2 years ago

As mention by the author of the issue, we prefer to keep code clarity rather than save a little bit on gas for these tow cases. That's why I've acknowledged the issue.