The LikeRegistry
contract allows users to be matched multiple times with the same person due to the absence of checks for duplicate entries in the matches
array. There is no mechanism in place to check if a user is already in the matches
array of another user before adding them again. This means that if the same two users like each other again, they will be added to each other's matches
array again, resulting in duplicate entries.
The LikeRegistry
contract has a low-severity vulnerability where users can be matched multiple times with the same person due to the lack of checks for duplicate entries in the matches
array. This results in increased storage and gas costs, potential confusion for users, and performance inefficiencies. Additionally, it may misalign with the intended business logic of maintaining unique matches. Addressing this issue can improve the contract's efficiency, reduce costs, and enhance user experience by ensuring data integrity and clarity.
Duplicate entries increase the size of the matches
array, leading to higher storage costs on the blockchain.
A user can repeatedly match with the same person and deploy multiple MultiSigWallets which will waste gas
Tools
Manual Review
Below is the POC and result
Check if a MultiSigWallet already exists before creating a new one
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.