Remove constant maths #64
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
G (Gas Optimization)
Handle
0x1f8b
Vulnerability details
Impact
Gas optimization.
Proof of Concept
In the line https://github.com/code-423n4/2021-11-streaming/blob/56d81204a00fc949d29ddd277169690318b36821/Streaming/src/Locke.sol#L711 it was multiply by 10 and then divided by 10.000, it's better to do only a div by 1.000, because the result will be the same.
Tools Used
Manual review
Recommended Mitigation Steps
Change the line to: uint112 feeAmt = amount / 1000; // 10bps fee
The text was updated successfully, but these errors were encountered: