feat: Implement community bounty boosting#750
feat: Implement community bounty boosting#750codebestia wants to merge 1 commit intoSolFoundry:mainfrom
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthroughThis PR implements a complete "bounty boost" feature enabling community members to add funds to bounty prize pools. It includes a new Estimated code review effort🎯 4 (Complex) | ⏱️ ~65 minutes Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Description
Implements community bounty boosting — allows any contributor to add $FNDRY to an existing bounty's prize pool. Boosted funds go into escrow alongside the original reward and are automatically refunded if the bounty expires without a winner.
Closes #510
Solana Wallet for Payout
Wallet: 4QhseKvBuaCQhdkP248iXoUxohPzVC5m8pE9hAv4nMYw
Type of Change
Checklist
console.logor debugging code left behindTesting
Backend (pytest)
tests/test_boost.py— 35 tests covering:BoostRequestPydantic validation (min amount, wallet format)boost_service.create_boost— happy path (pending + confirmed), below-minimum, nonexistent bounty, closed/paid/cancelled bounty rejection, Telegram notificationboost_service.get_boosts— pagination,total_boostedonly aggregatesconfirmedrowsboost_service.get_boost_leaderboard— multi-wallet ranking, same-wallet aggregation, pending/refunded exclusionboost_service.get_boost_summary— correct original + boosted + total mathboost_service.refund_bounty_boosts— refund lifecycle, no double-refund, mixed status handlingPOST /{id}/boost,GET /{id}/boosts,GET /{id}/boost-leaderboardFrontend (vitest)
src/__tests__/boost.test.tsx— 27 tests covering:BoostPanelloading skeletons, success state, no-wallet hides form, closed bounty hides formuseBoosthook — API fetch, summary calculation, below-minimum guard,submitBoostAPI callAdditional Notes
What was built
backend/app/models/boost.pyBountyBoostTableORM + Pydantic schemasalembic/versions/005_add_bounty_boosts.pybounty_booststable (revises004)backend/app/exceptions.pyBoostBelowMinimumError,BoostInvalidBountyErrorbackend/app/services/boost_service.pybackend/app/api/bounties.pyfrontend/src/types/boost.tsfrontend/src/hooks/useBoost.tsfrontend/src/components/bounties/BoostPanel.tsxfrontend/src/components/BountyDetailPage.tsxBoostPanelwired into bounty sidebarKey design decisions
PENDING→CONFIRMED(tx hash provided) →REFUNDED(bounty expires/cancels)total_boostedonly countsCONFIRMEDrows — pending and refunded are excluded from prize pool display and leaderboardhttpx); configurable viaTELEGRAM_BOT_TOKEN+TELEGRAM_CHAT_IDenv vars, silently skipped if unsetopen/in_progressbounties with a connected wallet; hidden otherwiserefund_bounty_boosts(bounty_id)is the hook for the expiry/cancellation path — can be called from the existingrefund_expired_escrowsperiodic job