Open hats-bug-reporter[bot] opened 1 year ago
HATArbitrator.dispute() can be called even after a dispute has been resolved,
I do not think this is true, at least not with the same claimId
dispute()
can be called with the same claimId
for example after approveSubmitClaimRequest()
is called.
The call won't fail. _vault.challengeClaim(_claimId)
won't be reached but the event ClaimDisputed()
will be emitted.
Github username: @bahurum Submission hash (on-chain): 0xc0f8b633fa893a1125a9c2b8676a28a3e5b56a75e29024a55b24fcf0d3ce8cdf Severity: low
Description: Description\
HATArbitrator.dispute()
can be called even after a dispute has been resolved, while users should be able to add to a dispute only when the dispute is not resolved yet.Disputes of a claim can can be made after resolution when:
approveSubmitClaimRequest()
(in which case there should be no disputes)Note that currently all tokens used for disputes coming after resolution can be recovered after some time by calling
reclaimBond()
so there is no loss of funds.Recommendation\ Consider adding the
onlyUnresolvedDispute(_vault, _claimId)
modifier to thedispute()
function so that only unresolved claims can be disputed.