Closed sherlock-admin3 closed 2 months ago
This is invalid because money will not get burned. If 0 is set as the referrer, no money gets routed there: https://github.com/sherlock-audit/2024-04-titles/blob/d7f60952df22da00b772db5d3a8272a988546089/wallflower-contract-v2/src/fees/FeeManager.sol#L267
However, most of the duplicates of this ticket are valid, and are actually duplicates of #267 . @Hash01011122
Thanks for your input sorting again and invalidating this issue
xiaoming90
high
Collection referral minting fee will be burned if batch minting feature is used
Summary
If the batch minting feature is used, the collection referral minting fee will be burned. This will result in a loss of the collection referral minting fee for the affected referrers, as the fee will be burned instead of being routed to the designated collection referrer.
Vulnerability Detail
When the batch minting feature is used, the referrer will be hardcoded to zero, as shown in Line 288 and Line 312 below.
https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/editions/Edition.sol#L288
https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/editions/Edition.sol#L312
Note that the
referrer_
is hardcoded to zero in the earlier step. At Lines 436 below, the collection referral fee (collectionReferrerShare
) will be collected from the payer and forwarded to address zero, effectively burning the collection referral minting fee instead of routing it to the designated collection referrer.https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/fees/FeeManager.sol#L436
Impact
Loss of referral minting fee as they will be burned instead of routed to the designated collection referrer.
Code Snippet
https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/editions/Edition.sol#L288
https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/editions/Edition.sol#L312
https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/fees/FeeManager.sol#L436
Tool used
Manual Review
Recommendation
Consider the following change to ensure that the collection referral fee is not burned when the batch minting feature is used.