20,000 USDC
View results
Submission Details
Severity: medium

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

Summary

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.

Vulnerability Details

src/Beedle.sol:
35
36: function mint(address to, uint256 amount) external onlyOwner {
37 _mint(to, amount);
src/Lender.sol:
83 /// @param _fee the new fee
84: function setLenderFee(uint256 _fee) external onlyOwner {
85 if (_fee > 5000) revert FeeTooHigh();
91 /// @param _fee the new fee
92: function setBorrowerFee(uint256 _fee) external onlyOwner {
93 if (_fee > 500) revert FeeTooHigh();
99 /// @param _feeReceiver the new fee receiver
100: function setFeeReceiver(address _feeReceiver) external onlyOwner {
101 feeReceiver = _feeReceiver;
src/utils/Ownable.sol:
9
10: modifier onlyOwner() virtual {
11 require(msg.sender == owner, "UNAUTHORIZED");
18
19: function transferOwnership(address _owner) public virtual onlyOwner {
20 owner = _owner;

Tools Used

Manuel Code Review

Recommendations

Here are some indicative, actionable suggestions that can also reduce potential risk to a different level, short-term, long-term, and permanently:

Short term:
The combination of Time lock and Multi-sign (2⁄3, 3⁄5) alleviates by delaying sensitive operation and avoiding a single point of key management error.
Reasonably delayed time lock for awareness of privileged transactions, eg 48 hours;
Assigning privileged roles to multi-signature wallets to avoid a single point of failure due to the private key being compromised;

A media/blog link to share the time-bound agreement and multi-signers address information with a general audience.

Long-term:
Timelock and DAO mitigate by implementing combination, decentralization and transparency. Reasonably delayed time lock for awareness of privileged transactions, eg 48 hours;

Introducing a DAO/governance/voting module to increase transparency and user engagement;

A media/blog link to share the time-locked contract, multi-signer addresses, and DAO information with a general audience.

Permanent:

Giving up ownership or removing the function can be considered completely resolved. Give up ownership and never reclaim privileged roles;
or
Remove risky functionality.

Support

FAQs

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