DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

Decimal Precision Mismatch for Non-18 Decimal Tokens

Issue: The contract uses a constant PRECISION_18 (set to 1e18) for calculations. However, if the staking contract supports ERC-20 tokens with different decimal precision (e.g., 6 decimal places), this mismatch can cause users to lose tokens or earn incorrect points.

  • Impact: Users staking tokens with non-18 decimal precision might see incorrect calculations for staking rewards and points, leading to significant loss of funds or an unfair distribution of points.

  • Recommendation: Add logic to handle tokens with different decimal places. Adjust the precision multiplier according to the staked token’s decimals to ensure calculations are consistent.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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