Having a single EOA as the only owner of contracts is a large centralization risk and a single point of failure. A single private key may be taken in a hack, or the sole holder of the key may become unable to retrieve the key when necessary. Consider changing to a multi-signature setup, or having a role-based authorization model.
Single Point of Failure
High Risk of Unauthorized Access
Inflexibility in Management
Inspection manual
Solidity
Foundry
To fix the centralization risk problem that occurs due to the use of a single external account (EOA) as the sole contract owner, we can replace it with a multi-signature mechanism or a role-based authorization model.
Code snippet:
L39-L41
Fixed code:
Code when testing using Foundry:
Foundry output:
Ran 2 tests for test/InternalizerTest.t.sol:InternalizerTest
[PASS] testSetURIByAuthorizedUser() (gas: 35804)
[PASS] testSetURIByUnauthorizedUser() (gas: 13370)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 1.27ms (422.90µs CPU time)
Ran 1 test suite in 3.94ms (1.27ms CPU time): 2 tests passed, 0 failed, 0 skipped (2 total tests)
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.