Omniscia Alliance Block Audit
LibDiamond Manual Review Findings
LibDiamond Manual Review Findings
LDD-01M: Memberless Contract
Type | Severity | Location |
---|---|---|
Logical Fault | Minor | LibDiamond.sol:L50-L64 |
Description:
The updateMember
function should ensure that the contract is left at least with one remaining member similarly to how the Router
constructor validates its member length.
Example:
contracts/libraries/LibDiamond.sol
50function updateMember(address account, bool status) internal {51 DiamondStorage storage ds = diamondStorage();52 if (status) {53 require(54 ds.membersSet.add(account),55 "Governance: Account already added"56 );57 } else if (!status) {58 require(59 ds.membersSet.remove(account),60 "Governance: Account is not a member"61 );62 }63 ds.administrativeNonce.increment();64}
Recommendation:
We advise such a require
check to be imposed to ensure that the contract cannot be left administrator-less.
Alleviation:
The membership-controlled contract implementation was replaced by a singular LibGovernance
implementation thus no longer rendering this exhibit applicable.