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

Precision Loss in Price Calculation

Summary

Integer division in _raw_price truncates fractional values, causing cumulative inaccuracies.

Vulnerability Details

total_assets * 1e18 // total_supply discards remainders, leading to LP value erosion over time.

Impact

Long-term inaccuracies disadvantage LPs during redemptions.

Tools Used

Code analysis of ScrvusdOracleV2.vy arithmetic operations.

Recommendations

Increase precision to 1e27 before division:

return (total_assets * 10**27) / total_supply # Preserve 9 extra decimals
Updates

Lead Judging Commences

0xnevi Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality
Assigned finding tags:

[invalid] finding-precision-loss

All values will be scaled to a combined of 36 decimals before division (be it price-related values or totalSupply). Considering the 18 decimals of all values, no realistic values were presented in any duplicates to proof a substantial impact on precision loss.

Support

FAQs

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