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

Incorrect Assignment of Second Dependency in `configureDependencies` Function

Summary

The Laundrette::configureDependencies function has an issue where the second dependency is assigned to the wrong index in the dependencies array.

Vulnerability Details

In the Laundrette::configureDependencies function, the second dependency is assigned to the dependencies array as follows:

dependencies[0] = toKeycode("WEAPN");

However, the first dependency has already been assigned to dependencies[0] in the previous line:

dependencies[0] = toKeycode("MONEY");

This means that the second dependency is overwriting the first dependency, which is likely not the intended behavior

Impact

the Laundrette contract will only have one dependency set correctly (the "WEAPN" module), and the "MONEY" module dependency will be overwritten. This will lead to failures when the contract tries to interact with the "MONEY" module.

Tools Used

Manual Review

Recommendations

To fix this issue, the line assigning the second dependency should be updated to use the correct index:

dependencies[1] = toKeycode("WEAPN");
Updates

Lead Judging Commences

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

Laundrette incorrect dependencies

Support

FAQs

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