The Swan contract contains a vulnerability within the list function that allows a malicious actor to Denial of Service (DoS) a BuyerAgent by listing assets with low or zero pricing. This approach navigates through the transaction process without executing meaningful token transfers, filling the buyer's asset count to its maximum (maxAssetCount) without a cost. This effectively prevents legitimate listings from being processed, disrupting the buyer's operations and the platform’s functionality.
The key issue lies within the list and Relist functions and their integration with the transferRoyalties function of the Swan contract.
The list function allows users to list assets with any price, including very low or zero. The cost for the listing depends on the asset price, which influences the execution of transferRoyalties.
When the price is zero (or trivially low), transferRoyalties results in zero-value token transfers, bypassing effective financial commitment while still adding the asset to the target buyer's list for the round.
The check maxAssetCount becomes pivotal but can be abused by filling up an agent’s quota with these costless listings, denying access to legitimate sellers attempting to list assets for purchase.
Denial of Service: An attacker can flood a BuyerAgent's capacity by repeatedly executing zero-cost listings, effectively barring any legitimate listings from being added within the same round.
Foundry
Set a minimum price threshold within the list and relist functions. Listings should only proceed if the price exceeds a defined minimum, sufficient to ensure meaningful financial transactions and deter trivial listing behaviors.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.