If the royalties receiver it's a smart contract it might be impossible to collect L2 royalties
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:
(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.
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.