Malicious users can DoS legitimate sellers/buyers through listing assets to exceed maxAssetCount.
when listing assets in other to prevent OOG exception on `assetsPerBuyerRound[][]`` there's a check to prevent too many assets.
https://github.com/Cyfrin/2024-10-swan-dria/blob/main/contracts/swan/Swan.sol#L168C9-L170C10
The issue is that malicious users can list assets with _price = 0 and revoke approval to swan contract or could actually list worthless assets, this action can be repeated till the length of the array approach maxAssetCount, therefore no other seller can list assets for that buyer within that round. There's no fee paid to the buyer since within transferRoyalties() buyerfees would be zero.
https://github.com/Cyfrin/2024-10-swan-dria/blob/main/contracts/swan/Swan.sol#L260C9-L261C87
There's no loss incured by the attacker at this point other than gasfees.
Malicious users could prevent legitimate seller from listing their assets and prevent buyers from earning royaltyfees or making valid purchase within any round.
Manual Review
Check that (asset.price * asset.royaltyFee) / 100; is non-zero or lower than certain amount.
A more complex solution would be to allow buyers to remove assets from assetsPerBuyerRound[][] and adjust its size.
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.