Rejection-sampling fallback is biased toward registry order
After the rejection-sampling limit, selection falls back to the first eligible juror in registry order rather than drawing uniformly, giving earlier registry positions a small deterministic advantage.
Description
After MAX_SELECTION_ATTEMPTS (128) rejections for a panel slot, selection falls back to the
first non-excluded entry in registry order rather than drawing uniformly from the remainder:
if (!found) {for (uint256 i = 0; i < eligibleCount; i++) {if (!excluded[i]) { panel[picked] = eligible[i]; ... break; }}}
Earlier registry positions therefore receive a small deterministic advantage in selection, most pronounced when the panel is near-saturated relative to the eligible set. The effect is bounded and applies only to draws that exhaust rejection sampling.
Recommendation
When rejection attempts are exhausted, draw uniformly from the bounded list of remaining eligible indices using fresh entropy derived from the same seed.
Resolution
Fixed. On exhausted rejection sampling the fallback now draws uniformly from the remaining survivors using fresh entropy, rather than taking the first entry in registry order.
Affected files
lib/ArbitrationPoolSelectLib.sol#L123-L133