# Index values selected in `_woundRequestFulfilled()` are not uniformly distributed.

LooksRare Infiltration's _woundRequestFulfilled increments randomWord on collision, biasing wounded selection toward indexes adjacent to already-wounded agents, unfairly hitting same owner.

- Payout: Contest reward
- Severity: medium
- Program: Looksrare
- Credited: 0xGoodess
- Disclosed: 2023-10-18
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2023-10-looksrare-judging/issues/84
- Library page: https://bugbountylibrary.com/r/sherlock%3A2023-10-looksrare%3AM-3
- Tags: domain:web3 impact:integrity kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** Infiltration.sol _woundRequestFulfilled() VRF-based agent selection
**Root cause:** On collision with an already-wounded agent, the code does ++randomWord instead of drawing a fresh VRF word, so the next index is deterministically previous index + 1, biasing selection toward adjacent indexes.
**Steps:**
1. Call _woundRequestFulfilled() with a VRF randomWord; woundedAgentIndex = randomWord % currentRoundAgentsAlive + 1.
2. If that agent is already wounded, the else branch does ++randomWord and retries.
3. Next iteration computes (randomWord+1) % M + 1, which equals previous index + 1 except on overflow/wrap.
4. Thus agents at index immediately after a wounded agent get double, triple, etc. probability of being wounded.
5. Since minted agents get sequential indexes, one owner's agents cluster and are disproportionately wounded.
**How found:** Code reading of the retry loop: noticed the else branch increments randomWord by 1 rather than re-deriving from VRF, then worked out the modular arithmetic showing next index = previous index + 1, and built a probability table to confirm bias.
**Insight:** When a rejection-sampling loop retries on collision, check whether it re-draws entropy or just increments the seed; incrementing correlates consecutive picks and biases selection toward adjacent indices, which matters when indexes map to owners.
