Collection referrer share is sent to the referrer instead of the collection referrer
Summary
The collection referrer share is erroneously routed to the mint referrer rather than the intended collection referrer.
Vulnerability Detail
In the process of distributing protocol fees, the share meant for the collection referrer is incorrectly sent to the mint referrer due to an error in the target parameter within the _route function. This misrouting occurs in the _splitProtocolFee function, where the collectionReferrerShare is assigned to the wrong recipient.
ast3ros
medium
Collection referrer share is sent to the referrer instead of the collection referrer
Summary
The collection referrer share is erroneously routed to the mint referrer rather than the intended collection referrer.
Vulnerability Detail
In the process of distributing protocol fees, the share meant for the collection referrer is incorrectly sent to the mint referrer due to an error in the target parameter within the
_route
function. This misrouting occurs in the_splitProtocolFee
function, where thecollectionReferrerShare
is assigned to the wrong recipient.https://github.com/sherlock-audit/2024-04-titles/blob/2ac20d07d0b4562c0b0ee15e1becbf786f0ed896/wallflower-contract-v2/src/fees/FeeManager.sol#L412-L441
Impact
The collection referrer share is sent to the referrer instead of the collection referrer, potentially leading to incorrect distribution of fees.
Code Snippet
https://github.com/sherlock-audit/2024-04-titles/blob/2ac20d07d0b4562c0b0ee15e1becbf786f0ed896/wallflower-contract-v2/src/fees/FeeManager.sol#L412-L441
Tool used
Manual Review
Recommendation
Correct the recipient of the collection referrer share:
Duplicate of #267