20,000 USDC
View results
Submission Details
Severity: medium

The `owner` is a single point of failure and a centralization risk

Summary

The owner is a single point of failure and a centralization risk.

The status quo regarding significant centralization vectors has always been to award M severity, in order to warn users of the protocol of this category of risks. See here for list of centralization issues previously judged.

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.
Even in cases where protocol admins/developers are not malicious, the risk of owner keys being stolen still exists. If an attacker gains control of the owner key, they can exploit important functions within the project, leading to substantial damage. As a result, users who have invested in the project may suffer substantial financial losses.

This issue occurs in some functions on some contracts:

#Lender.sol:

84: function setLenderFee(uint256 _fee) external onlyOwner {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L84

92: function setBorrowerFee(uint256 _fee) external onlyOwner {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L92

100: function setFeeReceiver(address _feeReceiver) external onlyOwner {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L100

#Beedle.sol

36: function mint(address to, uint256 amount) external onlyOwner {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Beedle.sol#L36

Impact

Hacked owner or malicious owner can immediately use critical functions in the project.

Tools Used

Manual review

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.