Description:
If the current implementation of mintBatch() was intended, one address should not have multiple KYC IDs ever, as such, this function should not exist. If the intended implementation was to streamline the backend and to allow it to mint multiple different IDs to different addresses, the entire function needs to be reworked.
Explanation for severity:
In it's current implementation, this function should just never be used, as such, severity is low.
However, if it were to streamline the backend and allow multiple mints of different IDs to different addresses, this is protocol breaking and a higher severity should be considered.
Impact:
With current functionality, having 1 address have >1 different KYC IDs does not make sense.
If other functionality was expected, protocol breaking behaviour will occur.
Proof of Concept:
Create a new test folder and ensure foundry.toml::profile.default::test points to test folder.
Create a contract in the folder with the following code:
run forge test.
Tools Used:
Manual review and custom Forge test suite - Convert Hardhat project to Foundry
Recommended Mitigation:
Dependant on intended implementation, the function should either be removed or completely reworked.
An auxiliary function from this is burnBatch() which works in tandem with mintBatch() , thus requiring removal / reworking too.
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.