stake.link

stake.link
DeFiHardhatBridge
27,500 USDC
View results
Submission Details
Severity: high
Invalid

SDLPoolPrimary + WrappedTokenBridge:: Function selector clash

Summary

Function call conflict while calling from a proxy.

Vulnerability Details

There are a function named onTokenTransfer() is present in both of this contract SDLPoolPrimary and WrappedTokenBridge. Both of these function selector are same:

cast sig "function onTokenTransfer(address, uint256, bytes calldata)"
=> 0xa4c0ed36

Impact

In a system where two different contracts, not connected to each other, have methods with the same function selector, it could lead to unexpected behavior when these methods are invoked through a proxy contract. This is because the proxy contract will not be aware of which specific contract's function to execute when a function with a clashing selector is called.

Tools Used

Manual analysis.

Recommendations

Change the function name.

Updates

Lead Judging Commences

0kage Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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