The PreMarkets::listOffer and PreMarkets::relistOffer functions are marked as payable, allowing it to receive Ether. However, the function only uses msg.value when the offer settlement type is Protected.
For all other settlement types, any Ether sent with the transaction is ignored and becomes permanently locked in the PreMarkets contract.
The root cause is that the function is marked as payable but only handles the msg.value in a specific case, without any mechanism to return or reject unexpected Ether in other cases.
Note: In order to not make this finding extra long, the vulnerability will only be detailed for listOffer. However, the root cause is the same for both functions.
A user wants to list an offer with a Turbo settlement type.
The user accidentally sends 1 Ether along with the listOffer transaction.
Since the settlement type is not Protected, the Ether is ignored and becomes locked in the contract.
Users can permanently lose Ether by accidentally sending it when listing offers with non-protected settlement types.
This could lead to significant financial losses, especially if high-value transactions are involved or if the issue is exploited repeatedly.
Manual Review - Testing
Modify the listOffer function to revert if Ether is sent with a non-Protected offer type:
This change will prevent users from accidentally sending Ether when listing non-Protected offers, thus avoiding the potential for locked funds.
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.