Skip to content
Business logic Audit finding Intermediate

If the royalties receiver it's a smart contract it might be impossible to collect L2 royalties

zzykxx Follow

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2024-08-flayer-judging/issues/509

Found by

zzykxx

Summary

No response

Root Cause

The function InfernalRiftAbove::claimRoyalties() can only be called by the receiver of the royalties:

Solidity
(address receiver,) = IERC2981(_collectionAddress).royaltyInfo(0, 0);

// Check that the receiver of royalties is making this call
if (receiver != msg.sender) revert CallerIsNotRoyaltiesReceiver(msg.sender, receiver);

This is fine for EOAs but is problematic if receiver is a contract that doesn't have a way to call InfernalRiftAbove::claimRoyalties(), as this would result in the receiver not being able to claim the royalties collected by NFTs bridged to L2.

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

If the royalties receiver is a smart contract that doesn't have a way to call InfernalRiftAbove::claimRoyalties() it's impossible to claim the royalties, which will be stuck.

PoC

No response

Mitigation

Allow royalties to be claimed to the receiver address by anybody when receiver is a smart contract.

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A medium-severity business logic bug in Flayer. Sherlock made it public on 10 October 2024. Found in the 468 audit contest (finding M-18).

About Business logic

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

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 by zzykxx

View all

6 more disclosed reports, best first.

More from Flayer

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.