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

In `makeMerkle.js`, the amount is incorrect and USDC Token decimal places is 6 not 18 which cause wrong generation of Merkle Root.

Summary

  • In makeMerkle.js, the amount is incorrect and USDC Token decimal places is 6 not 18 which cause wrong generation of Merkle Root.

Vulnerability Details

  • this amount is incorrect because USDC Token decimal places is 6 not 18. which we can verify from here

  • this will generate incorrect Merkle Root.

@> const amount = (25 * 1e18).toString()
const userToGetProofOf = "0x20F41376c713072937eb02Be70ee1eD0D639966C"

POC

  • Here we can see that decimal places of USDC Token is 6 not 18.

Impact

  • Incorrect generation of Merkle Root

  • USDC Token decimal places is 6 not 18 which will cause the amount to be incorrect.

Tools Used

  • Manual Review

Recommendations

  • put this in makeMekle.js to generate the root.

  • decimal places of USDC Token is 6 not 18.

- const amount = (25 * 1e18).toString()
+ const amount = (25 * 1e6).toString()
const userToGetProofOf = "0x20F41376c713072937eb02Be70ee1eD0D639966C"
Updates

Lead Judging Commences

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

wrong-usdc-decimals-in-merkle

Support

FAQs

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