Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: low
Valid

Decimal mismatch between `USDC` and `CrimeMoney` prevents equal 1 to 1 exchange of the tokens

Summary

USDC is a token with 6 decimal places and CrimeMoney is a token with 18 decimal places. Tthis causes a mismatch in the amount of tokens where 1 USDC is supposed to be equal to 1 CrimeMoney.

Vulnerability Details

As per the documentation, 1 USDC should be equal to 1 CrimeMoney and vice versa, but because USDC has 6 decimals and CrimeMoney has 18, this is not the case.

Impact

When a gang member deposits 1 USDC they will receive 0.0000000000001 CrimeMoney. This is not the intended 1 to 1 exchange of the tokens. However, with the current set up there will be no value lost, but there is an inconsistency in the amount of tokens being exchanged.

Tools Used

--Foundry

Recommendations

Adjust the precision accordingly so that there is a 1 to 1 exchange of USDC to CrimeMoney.

Updates

Lead Judging Commences

n0kto Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

USDC decimals not handled

Support

FAQs

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