Overview
Add a refund-eligibility workflow that lets campaign creators (and admins) process partial or full on-chain refunds to contributors, with automatic campaign balance adjustment.
Motivation
Campaigns can fail, be cancelled, or creators may want to issue goodwill refunds. Today there's no structured refund path — creators have no way to return escrowed funds to a specific contributor through the UI, and the campaign/escrow bookkeeping isn't updated when refunds happen off-platform.
Proposed Design
- Add a
refunds table: contribution_id, campaign_id, amount, reason, status, processed_at, tx_hash
- Add a creator view "Refunds" section listing contributions eligible for refund (status, amount, contributor)
- Creator can initiate a partial or full refund on a contribution
- Refunding submits an escrow return transaction on-chain returning funds to the contributor's wallet
- On success, campaign raised_amount (and USD equivalent) decreases and the contribution is marked refunded
- Refund requires confirmation with explicit amount and reason
- Admin can force-refund and can add a note; refunds are logged in the audit trail
- Contributor receives a notification and email when their contribution is refunded
Acceptance Criteria
Overview
Add a refund-eligibility workflow that lets campaign creators (and admins) process partial or full on-chain refunds to contributors, with automatic campaign balance adjustment.
Motivation
Campaigns can fail, be cancelled, or creators may want to issue goodwill refunds. Today there's no structured refund path — creators have no way to return escrowed funds to a specific contributor through the UI, and the campaign/escrow bookkeeping isn't updated when refunds happen off-platform.
Proposed Design
refundstable: contribution_id, campaign_id, amount, reason, status, processed_at, tx_hashAcceptance Criteria