Closed code423n4 closed 1 year ago
berndartmueller marked the issue as primary issue
OpenCoreCH marked the issue as disagree with severity
Might be something that we consider, but cidFeeWallet
will be a multi-sig in practice and CID currently has no owner. So we would need to introduce an owner and if that is compromised, funds are also lost.
Design-related improvement suggestion, so I would say QA
I agree with the sponsor on the downgrade to QA (Low)
berndartmueller changed the severity to QA (Quality Assurance)
berndartmueller marked the issue as grade-b
Lines of code
https://github.com/code-423n4/2023-01-canto-identity/blob/main/src/CidNFT.sol#L190-L194
Vulnerability details
The CID protocol contains fees at two different levels, one is defined at the subprotocol level by the owner of the registered subprotocol and the other at the CID protocol level in the
CidNFT
andSubprotocolRegistry
contracts.In all cases, the address that collects the fees is immutable and can't be changed:
https://github.com/code-423n4/2023-01-canto-identity/blob/main/src/CidNFT.sol#L24
https://github.com/code-423n4/2023-01-canto-identity/blob/main/src/SubprotocolRegistry.sol#L23
https://github.com/code-423n4/2023-01-canto-identity/blob/main/src/SubprotocolRegistry.sol#L29
Impact
If any of these addresses becomes unavailable or gets compromised, fees will still be sent to those addresses and funds will be lost, as these can't be updated.
https://github.com/code-423n4/2023-01-canto-identity/blob/main/src/CidNFT.sol#L190-L194
https://github.com/code-423n4/2023-01-canto-identity/blob/main/src/SubprotocolRegistry.sol#L87
Recommendation
Allow protocol owners to update the
cidFeeWallet
in theCidNFT
andSubprotocolRegistry
contract. Allow subprotocol owners to define and update a fee recipient address in their registered subprotocols.