Skip to content

Implement Rewards Module with Stella Token Distribution #34

@Mkalbani

Description

@Mkalbani

Description

Create a rewards module that manages stella-based token rewards distributed upon puzzle completion. Rewards are tied to difficulty and performance, serving as both in-game currency and a potential on-chain asset. The module needs clear rules for when rewards are granted, how they accumulate, and how they can be queried.

Acceptance Criteria

  • A rewards module is scaffolded at src/rewards/
  • Reward entity includes id, userId, sessionId, type (stella), amount, and grantedAt
  • Rewards are granted automatically on session completion
  • Reward amount scales with puzzle difficulty and score achieved
  • GET /rewards/me returns the authenticated user's reward history and total balance
  • GET /rewards/balance returns a single total stella balance for the user
  • Reward duplication is prevented per session
  • Unit tests cover reward calculation, grant, balance query, and duplication prevention

Metadata

Metadata

Assignees

Labels

No labels
No labels

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