Hooks.wtf

Audit Findings

SupportsCreatorTokens.sol

Extends functionality to allow the manager to allocate fees to creators that provide their memestreams into the manager.

This contract is inherited by both the AddressFeeSplitManager and the ERC721OwnerFeeSplitManager. From speaking with Flayer Labs, this contract is intended to be used by external builders, so we have aimed to review with this in mind as assume that this contract could be used incorrectly without underlying knowledge.


[INFO] Public function denoted as private

The _pendingCreatorFees function starts with an underscore, denoting that it is a private function but is actually public. This should either be made an internal function, or renamed to pendingCreatorFees.


[LOW] Internal function could break calculations

The _setCreatorShare function should be an initializable function that can only be run once, as changing it after usage would result in miscalculations of creator shares.

Proposed Solution

error CreatorShareAlreadyInitialized();
bool internal _creatorShareInitialized;

function _setCreatorShare(uint _creatorShare) internal {
    if (_creatorShareInitialized) {
        revert CreatorShareAlreadyInitialized();
    }

    if (_creatorShare > MAX_CREATOR_SHARE) {
        revert InvalidCreatorShare();
    }

    creatorShare = _creatorShare;
    _creatorShareInitialized = true;
}

[INFO] Unemitted Event

The function _setCreatorShare should likely emit an event as this would benefit frontend logic.

Previous
FeeSplitManager.sol