The abortAskOffer
function in the PreMarkets
contract has a logical error that causes it to always revert. The function is supposed to allow the abortion of an offer if its status is either Virgin
or Canceled
. However, the condition in the function uses the &&
(AND) operator:
which incorrectly checks if the status is not both Virgin
and Canceled
at the same time. Since an offer can only have one status at a time, this condition always evaluates to true
, causing the function to revert, even when the offer is in a valid state for abortion. This issue makes the function unusable and disrupts the intended contract behavior.
The impact of this issue is significant because it makes the abortAskOffer
function unusable. Any attempt to abort an offer will fail, regardless of its status, which could disrupt the normal workflow of the contract. This means that even valid operations, where the offer should be allowed to be aborted, will fail, potentially locking users out of their ability to manage their offers. This could lead to a loss of trust in the contract and a disruption in the expected functionality.
To fix this issue, the logical operation in the if statement should be changed from &&
to ||
(OR):
This will ensure that the function only reverts when the offerStatus
is neither Virgin
nor Canceled
, allowing the function to work as intended.
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.