sherlock-audit / 2023-06-symmetrical-judging

5 stars 4 forks source link

SAAJ - Centralization risk for trusted owners #335

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

SAAJ

medium

Centralization risk for trusted owners

Summary

Contracts have owners that have privileged rights to perform admin tasks based on modifier onlyOwner.

Vulnerability Detail

These owners need to be trusted to not perform malicious updates like acquiring admin roles for fees collection and or drain funds. Having a single Externally Owned Account (EOA) as the sole owner represents a significant centralization and single point of failure.

Impact

A private key could be stolen, access to a key may lost by accident, an owner could act in a malicious manner. In every scenario considered there exists a potential risk of financial loss for project.

Code Snippet

https://github.com/sherlock-audit/2023-06-symmetrical/blob/main/symmio-core/contracts/facets/control/ControlFacet.sol#L17 https://github.com/sherlock-audit/2023-06-symmetrical/blob/main/symmio-core/contracts/facets/control/ControlFacet.sol#L38

Tool used

Manual Review / Related findings from previous Audits

Recommendation

Admin-only functions that change critical parameters should have time-locks. Events allow capturing the changed parameters so that off-chain tools/interfaces can register such changes with timelocks that allow users to react by evaluating the changes. Timelock function also assist users in terms of considering 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. Allow only multi-signature wallets to call these functions to reduce the likelihood of an attack or unintentional loss.