Feature: Task Rewards (Lightning Bounties) #4

Open
opened 2026-01-01 16:27:16 +00:00 by padreug · 0 comments
Owner

Overview

Allow task creators to attach a sat reward (bounty) to persistent tasks. When someone completes the task, they receive the reward via Lightning Network.

Related to: #1 (Persistent Task List)


Feature Requirements

1. Reward Properties

  • Optional field - Tasks can exist without a reward
  • Amount in sats - e.g., 1,000 sats, 5,000 sats
  • Funded by task creator - Creator commits the sats when creating the task

2. Reward Lifecycle

┌─────────────────────────────────────────────────────────┐
│  Task Created with Reward                               │
│  → Sats held in escrow (creator's wallet)               │
└─────────────────────┬───────────────────────────────────┘
                      │
                      ▼
┌─────────────────────────────────────────────────────────┐
│  Task Completed                                         │
│  → Creator confirms completion                          │
│  → Reward released to completer                         │
└─────────────────────────────────────────────────────────┘

3. Payment Flow Options

Option A: Manual Release (Simpler)

  • Creator manually sends payment after confirming completion
  • No escrow required
  • Relies on trust/reputation

Option B: Escrow via LNbits (More Complex)

  • Sats locked when task created
  • Auto-released on completion confirmation
  • Requires LNbits extension or hold invoices

Recommendation: Start with Option A for simplicity.

4. UI Components

4.1 Create Task Form

  • Optional "Add Reward" toggle
  • Sat amount input field
  • Show equivalent fiat value (if available)

4.2 Task Card

  • Display reward badge: 1,000 sats
  • Prominent visual indicator for rewarded tasks
  • Higher visibility to attract workers

4.3 Task Completion

  • Show reward amount to completer
  • Creator sees "Pay Reward" button after confirming completion
  • Payment confirmation/receipt

5. Sorting/Filtering

  • Option to sort by reward amount (highest first)
  • Filter: "Rewarded tasks only"
  • Rewarded tasks could have slight visual priority

Technical Implementation

Nostr Event Tags

Add a reward tag to the persistent task event:

{
  "kind": 31923,
  "tags": [
    ["d", "task-unique-id"],
    ["title", "Replace axe handle"],
    ["urgency", "2"],
    ["reward", "1000", "sat"]
  ]
}

Integration Points

  • PaymentService - For sending reward payments
  • WalletService - Check creator has sufficient balance
  • InvoiceService - Generate invoice for completer (if using pull payment)

Acceptance Criteria

  • Users can optionally add a sat reward when creating a task
  • Reward amount displays prominently on task card ( icon + amount)
  • Task creator can send reward to completer after task completion
  • Reward payment uses existing Lightning wallet integration
  • Users can filter/sort tasks by reward

Future Enhancements (Out of Scope)

  • Escrow system with automatic release
  • Partial rewards / tips
  • Reward pools (multiple funders)
  • Reputation system based on completed bounties
  • Minimum reward thresholds
## Overview Allow task creators to attach a **sat reward** (bounty) to persistent tasks. When someone completes the task, they receive the reward via Lightning Network. **Related to:** #1 (Persistent Task List) --- ## Feature Requirements ### 1. Reward Properties - **Optional field** - Tasks can exist without a reward - **Amount in sats** - e.g., 1,000 sats, 5,000 sats - **Funded by task creator** - Creator commits the sats when creating the task ### 2. Reward Lifecycle ``` ┌─────────────────────────────────────────────────────────┐ │ Task Created with Reward │ │ → Sats held in escrow (creator's wallet) │ └─────────────────────┬───────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────┐ │ Task Completed │ │ → Creator confirms completion │ │ → Reward released to completer │ └─────────────────────────────────────────────────────────┘ ``` ### 3. Payment Flow Options **Option A: Manual Release (Simpler)** - Creator manually sends payment after confirming completion - No escrow required - Relies on trust/reputation **Option B: Escrow via LNbits (More Complex)** - Sats locked when task created - Auto-released on completion confirmation - Requires LNbits extension or hold invoices **Recommendation:** Start with Option A for simplicity. ### 4. UI Components #### 4.1 Create Task Form - Optional "Add Reward" toggle - Sat amount input field - Show equivalent fiat value (if available) #### 4.2 Task Card - Display reward badge: ⚡ 1,000 sats - Prominent visual indicator for rewarded tasks - Higher visibility to attract workers #### 4.3 Task Completion - Show reward amount to completer - Creator sees "Pay Reward" button after confirming completion - Payment confirmation/receipt ### 5. Sorting/Filtering - Option to sort by reward amount (highest first) - Filter: "Rewarded tasks only" - Rewarded tasks could have slight visual priority --- ## Technical Implementation ### Nostr Event Tags Add a `reward` tag to the persistent task event: ```json { "kind": 31923, "tags": [ ["d", "task-unique-id"], ["title", "Replace axe handle"], ["urgency", "2"], ["reward", "1000", "sat"] ] } ``` ### Integration Points - **PaymentService** - For sending reward payments - **WalletService** - Check creator has sufficient balance - **InvoiceService** - Generate invoice for completer (if using pull payment) --- ## Acceptance Criteria - [ ] Users can optionally add a sat reward when creating a task - [ ] Reward amount displays prominently on task card (⚡ icon + amount) - [ ] Task creator can send reward to completer after task completion - [ ] Reward payment uses existing Lightning wallet integration - [ ] Users can filter/sort tasks by reward --- ## Future Enhancements (Out of Scope) - Escrow system with automatic release - Partial rewards / tips - Reward pools (multiple funders) - Reputation system based on completed bounties - Minimum reward thresholds
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: aiolabs/webapp#4
No description provided.