A malicious receiver can cause another receiver to lose out on distributed fees by returning false for tokensReceived when receiveRewards is called on their receiver contract.
NFTX contest
Originally disclosed on Code4rena
A malicious receiver can cause another receiver to lose out on distributed fees by returning false for tokensReceived when receiveRewards is called on their receiver contract. This causes the fee distributor to double spend the amountToSend because the contract incorrectly assumes the returned data is truthful.
NFTXFeeDistributor.sol:
Line 163: (bool success, bytes memory returnData) = address(_receiver.receiver).call(payload);
Recommend that you don’t trust return data from externally called contracts. Only utilize whether the transaction succeeds to determine if the treasury fallback should be called.
Line 165: if (!success) {
Nice catch!
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 NFTX contest. Code4rena made it public on 21 June 2021. Found in the 2021-05-nftx audit contest (finding M-08).
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.