Omniscia Tren Finance Audit
FixedPriceAggregator Code Style Findings
FixedPriceAggregator Code Style Findings
FPA-01C: Ineffectual Usage of Safe Arithmetics
| Type | Severity | Location |
|---|---|---|
| Language Specific | ![]() | FixedPriceAggregator.sol:L41, L57 |
Description:
The linked mathematical operations are guaranteed to be performed safely by surrounding conditionals evaluated in either require checks or if-else constructs.
Example:
contracts/Pricing/FixedPriceAggregator.sol
41uint256 timestamp = block.timestamp - 5 minutes;Recommendation:
Given that safe arithmetics are toggled on by default in pragma versions of 0.8.X, we advise the linked statements to be wrapped in unchecked code blocks thereby optimizing their execution cost.
Alleviation (f6f1ad0b8f24a96ade345db1dd05a1878eb0f761):
The Tren Finance team evaluated this exhibit but opted to acknowledge it in the current iteration of the codebase.
