code-423n4 / 2021-11-unlock-findings

0 stars 0 forks source link

Unnecessary fallback function #4

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

BouSalman

Vulnerability details

Vulnerability Description

In the PublicLock.sol smart contract there is a fallback function that has no application logic implemented inside it, moreover it's not needed for receiving tips since receive function is already implemented above it in the source code file.

Impact

deployment size cost and cluttered code.

Proof of Concept

https://github.com/code-423n4/2021-11-unlock/blob/ec41eada1dd116bcccc5603ce342257584bec783/smart-contracts/contracts/PublicLock.sol#L72

Tools Used

manual code review.

Recommended Mitigation Steps

remove the function declaration or implement business logic it if needed.

0xleastwood commented 2 years ago

Agreed, this can be removed.