DeFiHardhat
35,000 USDC
View results
Submission Details
Severity: low
Invalid

Function Selector Clash in Diamond Proxy Pattern

Summary

The function _getPenalizedUnderlying defined in both the unripeFacet contract and the LibUnripe library have the same function signature, resulting in a function selector clash. This can lead to unintended consequences in the diamond proxy pattern, where the diamond's behavior may not match the expected functionality due to the overridden function.

more here:
https://eips.ethereum.org/EIPS/eip-2535

Vulnerability Details

Enter this:

cast sig "_getPenalizedUnderlying(address, uint256, uint256)"

output

0xa84643e4

Impact

The function selector clash can cause unexpected behavior in the diamond proxy pattern. When trying to add a new function to the diamond, if the function signature matches an existing function in one of the facets or libraries, it will override that function instead of adding a new one. This can lead to inconsistencies in the diamond's behavior and may result in unexpected errors or vulnerabilities.

Tools Used

Manual Review

Recommendations

To mitigate the function selector clash, review the function signatures in both the unripeFacet contract and the LibUnripe library to ensure they are unique. Modify one of the function signatures to resolve the clash and prevent unintended overrides in the diamond proxy pattern.

Updates

Lead Judging Commences

giovannidisiena Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational/Invalid

Support

FAQs

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