Seller can list an asset that will be impossible to buy and that will lead to the entire purchase transaction to be reverted.
During the purchase of an asset, the Swan contract attempts to transfer asset from the seller balance:
https://github.com/Cyfrin/2024-10-swan-dria/blob/main/contracts/swan/Swan.sol#L294
In normal circumstances it will work since the Swan contract was approved as a token spender: https://github.com/Cyfrin/2024-10-swan-dria/blob/main/contracts/swan/SwanAsset.sol#L41. However, a malicious user, as an owner of the asset, can revoke that approval at any time, for example by calling ERC721.setApprovalForAll(<swan_contract_address>, false) or by transferring an asset token to another address. That will lead to the purchase of that asset to revert. Moreover, because it is expected that all designated assets to be purchased at one shot via calling BuyerAgent.purchase(), such failure will cause an entire transaction to revert:
https://github.com/Cyfrin/2024-10-swan-dria/blob/main/contracts/swan/BuyerAgent.sol#L251
Inability to purchase any asset in a round.
Manual review
Transfer an asset token from seller to Swan contract, release it to buyer upon purchase, or return to seller if listing is cancelled.
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.