15,000 USDC
View results
Submission Details
Severity: medium

Centralization Risk for trusted owners

Summary

Centralization Risk for trusted owners

Vulnerability Details

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.

Also, the owners with privileged rights to perform admin tasks needs to be
trusted to not perform malicious updates or drain funds.

Instances (3):

File: src/DecentralizedStableCoin.sol
39: contract DecentralizedStableCoin is ERC20Burnable, Ownable {
46: function burn(uint256 _amount) public override onlyOwner {
58: function mint(address _to, uint256 _amount) external onlyOwner returns (bool) {

Link to code - https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DecentralizedStableCoin.sol

Severity Justification

Marking this as medium as both the following medium criteria satisfy:

  • Funds are indirectly at risk

  • Disruption of protocol functionality or availability

Source: https://docs.codehawks.com/rewards-and-judging

Tools Used

Manual inspection

Recommendations

Consider changing to a multi-signature setup, or having a role-based authorization model.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.