MarketFees : Seller referrer fee not paid when no creator royalty recipients exist for a sale
The seller referrer fee calculation sits inside a conditional block that only runs when creator royalty recipients exist or the sale is assumed primary. When there are no creator recipients and the sale is not primary, the fee is always zero, so the exhibition curator never receives the configured seller referral fee.
Foundation Exhibition, Scheduling & Early Access Solo Audit by Lambda
Originally disclosed on Code4rena
The logic to calculate the seller referrer fee is within the following if block:
if (creatorRecipients.length != 0 || assumePrimarySale) {
...
}
When creatorRecipients.length == 0 and assumePrimarySale == false (which is the case for ExhibitionMarketMock), the returned sellerReferrerFee will always be zero, no matter which value is passed for sellerReferrerTakeRateInBasisPoints. Therefore, the exhibition curator will not get the configured fee in such a scenario, although the seller referral fee should not depend on the existence of creator royalty recipients.
Link To Affected Code
Recommended Mitigation Steps
Calculate the seller referrer fee also when no creator royalty recipients are defined (like it is done for the buyer referrer fee).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The seller referrer fee is computed inside a conditional block gated on creator royalty recipients existing or the sale being assumed primary, so it is skipped otherwise.
Impact
The exhibition curator loses the configured seller referral fee whenever a sale has no creator royalty recipients and is not assumed primary.
What the attacker needed
Sale with no creator royalty recipients; sale not assumed primary
The fix
The seller referrer fee should be calculated even when no creator royalty recipients are defined, as is already done for the buyer referrer fee.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract splits the money from a sale between several parties, including a referrer who helped bring the seller in. A check in the code only calculates that referrer's cut when certain other recipients (creator royalties) are also present. If none are present, the referrer's cut silently becomes zero and they are not paid.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.