feat(bounty): allow up to 15 competition prize tiers#683
Conversation
Bump MAX_PRIZE_TIERS 3 -> 15. The winner distribution is derived from tier amounts and normalized to 100% by the shared builder (same path hackathons use to publish many winners on-chain), so the contract already supports more than 3 positions; the 3 was a product guard.
|
@Benjtalkshow is attempting to deploy a commit to the Threadflow Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
A competition bounty can now have up to 15 prize positions (was capped at 3).
MAX_PRIZE_TIERS3 → 15 inmodeSchema.ts— the single FE source of truth, so it propagates to the Mode step (winner-count stepper), the Reward step (tier inputs), and all validation/copy.Why it's safe on-chain
The on-chain
winner_distributionis derived from the tier amounts and normalized to 100% by the sharedbuildWinnerDistribution— the same path hackathons already use to publish many winners. The contract accepts arbitrary positions (the DTO default even documents "5% for the rest" beyond position 3), so 3 was a product guard, not a contract limit.Paired change
Backend validation cap is bumped to match in boundless-nestjs (separate PR).
Verification
tsc --noEmit— 0 errors.eslint .— clean.