Skip to content

HAMSTR-819 : Escrow: Limit number of open (active) arbitration cases#17

Merged
jrkosinski merged 1 commit intoLoadPipe:multi-head-escrow-rdfrom
HQS-Gun:HAMSTR-819-limit-number-of-active-arbitration-cases
Jul 31, 2025
Merged

HAMSTR-819 : Escrow: Limit number of open (active) arbitration cases#17
jrkosinski merged 1 commit intoLoadPipe:multi-head-escrow-rdfrom
HQS-Gun:HAMSTR-819-limit-number-of-active-arbitration-cases

Conversation

@HQS-Gun
Copy link

@HQS-Gun HQS-Gun commented Jul 30, 2025

Motivation

In the new arbitration logic, the lifecycle of arbitration goes like this:

Proposal
A buyer or seller submits a proposal to either refund (to payer) or release (to receiver) a specific amount. At that point, it’s just a proposal.

Voting
Arbiters (those who are registered as arbiters for the escrow) vote on the proposal. When it reaches a certain number of ‘yes’ votes, it’s automatically set to “ACCEPTED” status. But it isn’t necessarily executed at that point.

Execution
Anyone can execute a proposal, IF it’s been accepted (if it’s status is ACCEPTED, that is, and if it still meets other criteria of still being relevant).

Currently, there is no limit on the number of arbitration cases that can be opened at once. There should be a limit, defined as a constant in ArbitrationModule.sol.

Changes:

  1. Added MAX_ARBITRATION_CASES = 10 constant to limit concurrent arbitration cases
  2. Added activeProposalCount tracking for active proposals
  3. Implemented limit check in proposeArbitration() to enforce max cases
  4. Fixed proposalCount increment for unique proposal ID generation
  5. Added counter management for all proposal state transitions (EXECUTED, REJECTED, CANCELED)

@jrkosinski jrkosinski merged commit 72b69d3 into LoadPipe:multi-head-escrow-rd Jul 31, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants