In SystemConfig.sol
https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/SystemConfig.sol#L87
As _marketPlaceName
must be uniqe but there is no function that directly checks this condition. 'keccak256' creates address and it is low that it produces same hash but never zero. So we must add uniqueness check.
There is a low chance that 'keccak256' can produce same hash. To eliminate that possibility, additional checks can be done.
Creating multiple marketplaces with the same name _marketPlaceName
can lead to financial errors, such as users accidentally sending money to the wrong marketplace. This can result in fraud or user losses.
Manual
To ensure the uniqueness of addresses in the createMarketPlace
function, additional checks are required. A map can be used to verify whether the address generated by generateMarketPlaceAddress
has been used before.
Here is an example:
This additional check ensures that the same address has not been created before, thereby maintaining the uniqueness of marketplace names.
Invalid, admins trusted to create marketplaces accordingly with appropriate inputs, as stated in READ.ME. If they do, there will be no issues.
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.