Omniscia Evergon Labs Audit

PropPacketsGatheredFeeCollectorFacet Manual Review Findings

PropPacketsGatheredFeeCollectorFacet Manual Review Findings

PPG-01M: Invalid Function Requirement Documentation

Description:

The referenced function requirement that is documented is not actually enforced by the PropPacketsGatheredFeeCollectorFacetStorage::initDoReceiveFeeCollectorFacet function.

Example:

packages/contracts/contracts/privateFacets/doReceiveFacets/PropPacketsGatheredFeeCollectorFacet.sol
50/**
51 * @notice Initializes the `PropPacketsGatheredFeeCollectorFacetStorage` by registering the eligible fee collector and limit
52 * setter addresses, as well as the fee rate to be applied to campaigns' gathered funds.
53 *
54 * @dev For example, if the `feeRate` is set to 10%, then a campaign raising 100 funding packets will result in 10 funding packets
55 * being transferred to the `feeCollector` when the campaign creator (or the designated account) claims the funds.
56 *
57 * IMPORTANT:
58 * - Rates and percentages are represented with a base of 10^6 (e.g., 0.1 -> 10% is `100000`).
59 * - `feeCollector` and `limitSetter` cannot be set to the zero address.
60 *
61 * Emits a {DoReceiveFeeSchemaInitialized} event.
62 *
63 * This function can only be called by the Admin (see `AccessControlFacet.sol`).
64 *
65 * @param initDoReceiveFeeCollectorData ABI-encoded data containing:
66 * - `feeCollector`: The eligible address that will be receiving the fees (if any).
67 * - `limitSetter`: The address allowed to set a cap on the maximum amount (funding packets) to which the fee rate applies.
68 * - `feeRate`: The rate defining what portion of a campaign’s gathered funds (in terms of packets) is charged as a fee.
69 */
70function initDoReceiveFeeCollectorFacet(bytes calldata initDoReceiveFeeCollectorData) external onlyExternalDelegateCall {
71 address account = ERC2771RecipientStorage.layout()._msgSender();
72 if (!AccessControlFacetStorage.layout().hasRole(AccessControlFacetStorage.ADMIN_ROLE, account))
73 revert UnauthorizedInitialization(account);
74
75 (address feeCollector_, address limitSetter_, uint256 feeProportion_) = PropPacketsGatheredFeeCollectorFacetStorage
76 .layout()
77 .initDoReceiveFeeCollectorFacet(initDoReceiveFeeCollectorData);
78
79 emit DoReceiveFeeSchemaInitialized(feeCollector_, limitSetter_, feeProportion_);
80}

Recommendation:

We advise either the documentation or the code to be updated, either of which we consider acceptable.

Alleviation (d682057ecb0e254069773d64f32c068cedb71e2a):

The documentation of the function has been corrected to match its implementation, addressing this exhibit.