Skip to content

Allow Dispute Kits to unstake ineligible jurors #98

Open
@jaybuidl

Description

@jaybuidl

Problem

For the 1 Human 1 Vote Dispute Kit, it is possible that some large staked jurors might not be registered on Proof of Humanity. In such a case, they would end up being drawn often from the sortition tree but later filtered out. It is highly inefficient and costly.

Proposed solution

Some team members have suggested that KlerosCore should allow a DisputeKit to unstake such ineligible jurors as follow:

/** @dev Allows to unstake the juror that obstructs drawing process.
* @param _coreDisputeID The ID of the dispute in Kleros Core which drawing process is obstructed.
* @param _juror The address of the juror to unstake.
*/
function unstakeJuror(uint256 _coreDisputeID, address _juror) external {
require(phase == Phase.drawing, "Should be in drawing phase");
require(!postDrawCheck(_coreDisputeID, _juror), "The juror is eligible to drawing");
core.unstakeByDK(_coreDisputeID, _juror);
}

/** @dev Allows an active dispute kit contract to manually unstake the ineligible juror. The main purpose of this function is to remove
* jurors that might obstruct the drawing process.
* @param _disputeID The ID of the dispute.
* @param _account The address of the juror.
* @return True if unstaking was successful.
*/
function unstakeByDK(uint256 _disputeID, address _account) external returns (bool) {

Analysis

A) If there are 2 Dispute Kits with different eligibility criteria using the same subcourt

Then one Dispute Kit might decide to unstake a juror while this juror is still eligible in the other Dispute Kit. It would be unfair to the juror as he would miss some opportunities. There is no easy way to prevent that.

B) Should unstaking ineligible jurors take place in the usual Staking phase?

  • Yes because that's what phases are made for. But then the juror could re-stake immediately after.
  • No and by-pass the DelayedStakes to prevent the juror from re-staking immediately after, but this might still happen if it takes more than maxDrawingTime to draw and KlerosCore cycles through the phases. In addition it breaks the design of the phases and creates a new path for unstaking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions