The contract doesn't limit the number of disputes that can be initiated. This means that a malicious party could continually initiate disputes to prevent the contract from proceeding to the State.Resolved
state. This could be mitigated by limiting the number of disputes that can be initiated or implementing penalties for abuse of the dispute mechanism.
The smart contract is designed to allow either the buyer or seller to initiate a dispute if they feel something is wrong with the transaction. This dispute mechanism is a common feature in many escrow-like systems and is generally a good practice. However, in this contract, there is no limit to the number of times a dispute can be initiated, and a dispute can be initiated by either party at any time while the contract is in the State.Created
state.
If a participant in the contract (buyer or seller) decided to act maliciously, they could continually initiate disputes, effectively keeping the contract in a perpetual state of dispute (State.Disputed
). As a result, the intended flow of the contract (from State.Created
to State.Confirmed
or State.Resolved
) could be blocked, and funds locked in the contract could be indefinitely inaccessible.
This vulnerability could lead to disruption in the operation of the contract and potential loss of access to the funds locked in the contract for an indefinite period. This is not a "hacking" risk in the sense of unauthorized access or theft of funds, but rather a design flaw that could be exploited to "grief" or cause inconvenience to other participants.
This issue could be mitigated by placing reasonable restrictions on the ability to initiate a dispute. For instance, you could:
Limit the number of times a dispute can be initiated by a participant. If a limit is reached, no more disputes can be initiated by that participant. This prevents indefinite stalling of the contract.
Introduce a cool down period after a dispute is resolved before another dispute can be initiated. This would allow the contract to progress and would deter griefing by making it time-consuming and inconvenient.
Implement penalties for misuse of the dispute mechanism. For example, if a participant initiates a dispute and the dispute is resolved against them, they could lose a deposit or be penalized in some other way.
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.