Skip to content

[HIGH] processRewardClaim retry path doesn't validate passing score #31

Description

@DeFiVC

Description

processRewardClaim in src/modules/rewards/reward.service.ts:27-80 doesn't check that the score meets the passing threshold. It uses the score parameter directly from the retry job without validating that the quiz was actually passed.

If the retry queue receives a job for a non-passing submission (e.g., due to a bug or manual queue manipulation), the reward will be processed.

Impact

Bypass of the passing requirement for reward claims via the retry path.

File

src/modules/rewards/reward.service.ts:27-80

Suggested Fix

Add a check that score >= passing threshold (70%) before processing the reward claim in the retry path.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignbugSomething isn't workinghigh

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions