15,000 USDC
View results
Submission Details
Severity: medium

A single point of failure

Summary

The onlyOwner role has a single point of failure and onlyOwner can use critical a few functions.

Even if protocol admins/developers are not malicious there is still a chance for Owner keys to be stolen. In such a case, the attacker can cause serious damage to the project due to important functions. In such a case, users who have invested in project will suffer high financial losses.

Vulnerability Details

onlyOwner functions;

2 results - 1 file
src/DecentralizedStableCoin.sol:
45
46: function burn(uint256 _amount) public override onlyOwner {
47 uint256 balance = balanceOf(msg.sender);
57: function mint(address _to, uint256 _amount) external onlyOwner returns (bool) {

This increases the risk of A single point of failure

Impact

Tools Used

Manuel Code Review

Recommendations

Add a time lock to critical functions. Admin-only functions that change critical parameters should emit events and have timelocks.

Events allow capturing the changed parameters so that off-chain tools/interfaces can register such changes with timelocks that allow users to evaluate them and consider if they would like to engage/exit based on how they perceive the changes as affecting the trustworthiness of the protocol or profitability of the implemented financial services.

Also detail them in documentation and NatSpec comments

Support

FAQs

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