Skip to content
Business logic Audit finding Intermediate

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

https://github.com/f8n/fnd-contracts-staging/blob/c5ca7eb50e3fe3221bda49168cae8b4bbd98f4ac/contracts/mixins/shared/MarketFees.sol#L530

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).

The original report as published on Code4rena. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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.

More from Foundation Exhibition, Scheduling & Early Access Solo Audit by Lambda

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.