The purchase
function lacks a refund mechanism in case one of the asset or payment transfers fails. If an error occurs during any part of the asset or fund transfer, the payment may be taken without the asset being transferred to them. This can result in a significant loss
The following lines of code are involved in the transfer process without rollback or refund checks:
Buyer Funds Loss: If any transfer fails, the buyer may end up paying without receiving the asset, creating a financial risk.
Incomplete Transactions: The function may only partially complete the transaction, leaving the contract in an inconsistent state.
Manual code review.
Wrapping each transfer-related code line within require statements is a good strategy for ensuring that every transfer succeeds or the transaction will revert immediately if any of them fails or handle transfers in a way that enables rolling back if any part of the function fails.
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.