Add check to DSCEngine constructor to ensure that the array lengths are not zero, otherwise the contract will require redeployments
If the contract gets created with empty array, then the whole coin will just be inoperable
as there will be no allowed token addresses for collateral.
Link to code - https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DSCEngine.sol#L112
Marking this as medium as both the following medium criteria satisfy:
Disruption of protocol functionality or availability
Source: https://docs.codehawks.com/rewards-and-judging
Manual inspection
Consider adding length checks to the array in the constructor to ensure that its not 0,
or add a feature to add token addresses after the contract is initialized.
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.