DeFiLayer 1Layer 2
14,723 OP
View results
Submission Details
Severity: high
Invalid

Price Calculation Overflows

Summary

Price Calculation Overflows

Vulnerability Details

_smoothed_price() function uses multiplication and division without safe math checks:

max_change: uint256 = (
self.max_price_increment * (block.timestamp - self.last_update) * last_price // 10**18
)

If block.timestamp - self.last_update is too large, this multiplication can overflow.

Impact

An overflow can cause incorrect price values, leading to miscalculations in DeFi integrations.

Tools Used

Recommendations

Use SafeMath or overflow-resistant calculations.

Updates

Lead Judging Commences

0xnevi Lead Judge
6 months ago
0xnevi Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.