The TadleFactory
contract allows the deployment of upgradeable proxies and assigns their addresses to indices in the relatedContracts
mapping. This approach carries a risk of incorrect indexing, which can lead to issues like accidental overwrites which can lead to DoS or other unexpected behaviours.
The deployUpgradeableProxy
function takes a uint8 _relatedContractIndex
as an index for relatedContracts
to update the address of the logic contract. This approach is prone to errors because an admin might mistakenly override the wrong contract. For example, they might intend to update the contract at index 1 but accidentally press 2, leading to unintended contract updates. Mistakes with numeric indices are more likely than with string indices consist from contract names for example. Numbers are easier to mistype, such as entering 2 instead of 1. Using descriptive string names, like "SystemConfig" reduces this risk to almost impossible.
Protocol Disruption - incorrect index assignments may disrupt services.
Users might face issues if contracts are assigned incorrectly.
VSCode
Change Indexing to Strings: use string identifiers of contract names (e.g instead of index 1 => SystemConfig
, just use "SystemConfig" => SystemConfig
). This reduces the risk of errors, as specifying a contract name is less error-prone than using numeric indices.
By using string identifiers, you make it clearer and reduce the chance of accidental errors in contract indexing.
The following issues and its duplicates are invalid as admin errors/input validation/malicious intents are1 generally considered invalid based on [codehawks guidelines](https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity#findings-that-may-be-invalid). If they deploy/set inputs of the contracts appropriately, there will be no issue. Additionally admins are trusted as noted in READ.ME they can break certain assumption of the code based on their actions, and
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.