code-423n4 / 2021-11-streaming-findings

0 stars 0 forks source link

Gas: Check `_feePercent` instead #217

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

cmichel

Vulnerability details

The Stream.constructor performs a check on a storage variable instead of the parameter: require(feePercent < 10000, "fee"). This will do an unnecessary sload operation. Consider doing the check on _feePercent instead.