Tadle

Tadle
DeFi
30,000 USDC
View results
Submission Details
Severity: low
Invalid

Duplicate token address processing in whitelist update

Summary

The updateTokenWhiteListed function processes an array of token addresses without checking for duplicates.

Vulnerability Details

The updateTokenWhiteListed function processes an array of token addresses without checking for duplicates. This could lead to the same token address being processed multiple times in a single transaction.

https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/TokenManager.sol#L197C3-L223C6

Steps to Reproduce:

  1. Call updateTokenWhiteListed with an array of token addresses that includes duplicates.

  2. Observe that each duplicate address is processed and emits an event each time it appears in the array.

Impact

Increased gas costs and unnecessary event emissions.

Tools Used

Manual review

Recommendations

Check for duplicates in the address array.

Updates

Lead Judging Commences

0xnevi Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

[invalid] finding-Admin-Errors-Malicious

The following issues and its duplicates are invalid as admin errors/input validation/malicious intents are1 generally considered invalid based on [codehawks guidelines](https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity#findings-that-may-be-invalid). If they deploy/set inputs of the contracts appropriately, there will be no issue. Additionally admins are trusted as noted in READ.ME they can break certain assumption of the code based on their actions, and

Support

FAQs

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