Add Reward
Use this skill when implementing or extending reward logic (points, credits, referral bonuses, streaks, cashback, etc.).
When to Use
- A feature requires users to earn points/credits/bonuses.
- You need clear eligibility and payout rules.
- You want safe handling of fraud, reversal, and accounting edge cases.
Workflow
- Define reward objective and behavior (what action is rewarded and why).
- Specify eligibility rules (new user only, region, plan tier, cooldown window).
- Define calculation logic (fixed amount, percentage, caps, tier multipliers).
- Add anti-abuse controls (rate limits, device/account checks, duplicate prevention).
- Implement idempotent reward issuance with unique event keys.
- Add reversal/void logic for refunds, chargebacks, or policy violations.
- Log all reward events for auditability.
- Add tests for happy path, edge cases, and abuse scenarios.
Output
-
Reward rule specification (eligibility, calculation, caps, expiry)
-
Implementation checklist (data model + service + tests)
-
Risk notes (abuse vectors, rollback/reconciliation approach)
-
Brief plan or checklist
-
Key recommendations and caveats
Scan to join WeChat group