The `getMatches()` function returns the entire `matches[msg.sender]` array without any pagination or limits. If a user has many matches, this array could grow very large, causing the function to consume excessive gas and potentially exceed block gas limits, making it impossible to retrieve matches.
```solidity
function getMatches() external view returns (address[] memory) {
return matches[msg.sender]; // @> Unbounded array return
}
```
### Root Cause
The matches array grows indefinitely as users get matched, and there's no mechanism to limit or paginate the results.
Likelihood:
* Popular users could accumulate many matches over time
* The array grows with each match, so this becomes more likely as the protocol gains users
* This will occur whenever a user with many matches calls `getMatches()`
Impact:
* Function becomes unusable for users with many matches
* Gas costs become prohibitive
* Potential DoS if gas limit is exceeded
* Frontend applications may fail to load user matches
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.