-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathckboost-platform.prd.txt
More file actions
410 lines (331 loc) · 21.6 KB
/
ckboost-platform.prd.txt
File metadata and controls
410 lines (331 loc) · 21.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
<context>
# Overview
CKBoost is a gamified community engagement platform designed to drive participation and growth in the CKB ecosystem. The platform addresses the critical need for structured community building by providing a comprehensive reward system that incentivizes valuable contributions across content creation, development, community engagement, and educational activities.
The platform serves as the digital backbone for the Nervos Community Catalyst's CKBoost initiative, transforming the traditional approach to community engagement from ad-hoc activities to a structured, measurable, and rewarding experience. It solves the problem of community members not knowing how to contribute meaningfully to the ecosystem while ensuring fair reward distribution and preventing sybil attacks.
CKBoost is valuable because it creates a sustainable ecosystem where community members can build their reputation, earn tangible rewards, and contribute to the long-term success of the CKB network. It provides clear pathways for participation regardless of technical expertise, from simple social media engagement to complex development tasks.
# Core Features
## Campaign & Quest System
- **Campaign Management**: Sponsors, whitelisted via an on-chain Protocol Cell managed by platform admins, can create campaigns with multiple quests targeting specific objectives. Sponsors must fully fund the campaign before it can be approved by platform admins.
- **Quest Creation**: Granular task definition with subtasks, proof requirements, difficulty levels, and reward structures
- **Progress Tracking**: Real-time progress monitoring with visual indicators and completion status
- **Proof Submission**: Flexible proof submission system supporting files, links, and text-based evidence
- **Review & Approval**: Automated and manual review processes with campaign admin oversight
## Gamified Reward System
- **Points & Badges**: The points system itself will be implemented as a dedicated UDT, mintable only with authorization from a Protocol Cell. This allows points to function as a native on-chain asset.
- **Multi-Token Rewards**: The platform will support CKB, SPORE, and other UDTs, including the native Points UDT, as quest rewards.
- **Dynamic Leaderboards**: Real-time ranking system with monthly and quarterly reward pools
- **Streak Bonuses**: Additional rewards for consistent participation and consecutive day streaks
- **Difficulty Multipliers**: Bonus rewards based on quest complexity and completion rates
## Community Tipping System
- **Tip Proposals**: Community-driven proposal system for recognizing valuable contributions
- **Approval Workflow**: Democratic approval process requiring community consensus (5 approvals)
- **Treasury Integration**: Automated distribution from community treasury for approved tips
- **Personal Tipping**: Individual tipping capabilities with social features
- **Contribution Recognition**: Permanent record of community-recognized contributions
## Identity Verification & Anti-Sybil
- **Multi-Method Verification**: The UI will display multiple verification options, including Telegram, DID and KYC, marked as "Coming Soon". The initial MVP will implement admin manual review for Telegram as the first available method.
- **Privacy-Preserving**: Minimal data storage with encrypted verification status
- **Flexible Requirements**: Campaign-specific verification requirements
- **Verification Benefits**: Rewards earned by users will be locked until their chosen verification method is successfully completed. Some campaigns may require additional verification methods to be completed before rewards can be claimed.
## Administrative Controls
- **Campaign Administration**: Comprehensive tools for campaign creators to manage quests, review submissions, and distribute rewards
- **Platform Administration**: System-wide oversight including user management, campaign approval, and platform health monitoring
- **Analytics & Reporting**: Detailed metrics on participation, completion rates, and community engagement
- **Staff Management**: Role-based access control for campaign reviewers and administrators
# User Experience
## User Personas
### Primary Users
- **Community Contributors**: Active CKB community members seeking structured ways to contribute and earn rewards
- **Content Creators**: Bloggers, video creators, and educators wanting to monetize their CKB-focused content
- **Developers**: Blockchain developers looking to build on CKB while earning rewards for contributions
- **Campaign Sponsors**: Organizations and foundations wanting to drive specific ecosystem outcomes
### Secondary Users
- **Platform Administrators**: Nervos Community Catalyst team managing overall platform operations
- **Campaign Administrators**: Trusted community members managing specific campaigns and quest reviews
- **Casual Participants**: Newcomers to CKB seeking entry-level engagement opportunities
## Key User Flows
### New User Onboarding
1. Connect CKB wallet and create profile.
2. Browse available campaigns and start participating in quests immediately.
3. Submit first proof and see earned (but locked) rewards accumulate.
4. To unlock/claim rewards, complete a verification process (initially, manual admin review).
5. Once verified, claim first rewards and see leaderboard position.
### Quest Participation Flow
1. Browse campaigns by category, difficulty, or reward
2. Check verification requirements and campaign rules
3. Start quest and review subtask requirements
4. Complete subtasks and gather proof materials. For on-chain tasks (e.g., "Mint iCKB"), this involves copying the transaction hash.
5. Submit proof (URL, text, or transaction hash) through the appropriate form.
6. Receive admin review and feedback (for v0, this is a manual process for all quest types).
7. Claim rewards upon approval.
### Campaign Creation Flow
1. Apply for campaign sponsor status
2. Define campaign objectives and success metrics
3. Create individual quests with detailed requirements
4. Set reward pools and verification requirements
5. Submit campaign for platform admin approval
6. Launch campaign and monitor participation
7. Review submissions and distribute rewards
## UI/UX Considerations
### Design Principles
- **Gamification-First**: Visual progress indicators, achievement badges, and celebration of milestones
- **Accessibility**: Multiple verification methods and difficulty levels to accommodate diverse users
- **Transparency**: Clear reward structures, leaderboard visibility, and open community voting
- **Trust & Safety**: Robust verification systems and clear community guidelines
### Mobile Responsiveness
- Touch-optimized interface for mobile quest completion
- Responsive design supporting various screen sizes
- Mobile-friendly proof submission (camera integration)
- Push notifications for quest deadlines and rewards
### Interaction Design
- Clear visual hierarchy with campaign > quest > subtask structure
- Progress bars and completion indicators throughout
- Social features integrated into quest completion
- Real-time updates on leaderboard positions and rewards
</context>
<PRD>
# Technical Architecture
## System Components
### Frontend Architecture
- **Next.js React Application**: Static site generation for fully decentralized hosting
- **Responsive Design**: Mobile-first approach with desktop optimization
- **Component Library**: Reusable UI components with consistent design system
- **State Management**: Context API for user authentication and blockchain state
- **Wallet Integration**: CCC (Common Chain Connector) for universal wallet support
### Smart Contract Architecture (Primary Data Layer)
The system will be built upon three core, specialized `Type Scripts`, ensuring modularity and clear separation of concerns:
1. **`ckboost-protocol-type`**:
* **Purpose**: Validation for protocol update and tipping proposal update.
* **Controls**:
* The list of whitelisted campaign sponsors.
* Protocol configs for updating the protocol data and tipping proposal.
2. **`ckboost-protocol-lock`**:
* **Purpose**: Authentication for protocol update and tipping proposal update.
* **Controls**:
* The permission to update the protocol data.
* The permission to update the tipping proposal.
2. **`ckboost-campaign-type`**:
* **Purpose**: Defines the logic and rules for all campaigns on the platform.
* **Logic**: Governs the lifecycle of a campaign, from creation to completion.
* **Controls**:
* Quest definitions, reward structures, and verification requirements.
* Rules for participation and proof submission.
* Quest completion and proof submission.
3. **`ckboost-campaign-lock`**:
* **Purpose**: A specialized `Lock Script` that acts as a secure vault for campaign assets. It also locks the campaign cell to the campaign creator.
* **Logic**: It locks the CKB or UDTs allocated as the reward pool for a specific campaign, or the campaign cell itself to the campaign creator.
* **Controls**:
* Ensures that locked assets can only be unlocked and distributed according to the rules defined in the corresponding `ckboost-campaign-type` script (e.g., after a proof is verified).
* Locks the campaign cell to the campaign creator.
4. **`ckboost-user-type`**:
* **Purpose**: Defines the logic and rules for all users on the platform.
* **Logic**: Governs the lifecycle of a user, from creation to completion.
* **Controls**:
* User data, including their public key, verification status, submission, and any other data that is relevant to the user.
### Data Architecture (CKB Celldata-First)
The platform's state will be stored in the `cell_data` of Cells, each governed by one of the core scripts:
- **Protocol Cell (governed by `ckboost-protocol-type`)**:
* The single, authoritative source for platform-wide settings.
* **Data Stored**: The list of whitelisted sponsor public keys, platform admin addresses, rules for Points UDT minting, etc.
- **Campaign Cells (governed by `ckboost-campaign-type`)**:
* Each Cell represents a single, unique campaign.
* **Data Stored**: All data related to a campaign, including its objectives, total reward pool, quest definitions, list of participants, and submitted proofs (as IPFS hashes or transaction hashes).
- **Campaign Vault Cells (locked by `ckboost-campaign-lock`)**:
* These cells hold the actual CKB/UDT assets for a campaign's reward pool. Their `cell_data` might be minimal, as their primary purpose is to lock assets.
- **User Cells (governed by `ckboost-user-type`)**:
* Each Cell represents a single, unique user.
* **Data Stored**: All data related to a user, including their public key, verification status, submission, and any other data that is relevant to the user.
### External Integrations
- **Telegram Bot**: Automated verification and notifications
- **KYC Providers**: Third-party identity verification services
- **DID Infrastructure**: Decentralized identity verification protocols
- **Social Media APIs**: Integration with X (Twitter) for social quest verification
## APIs and Integrations
### Serverless API Functions (Open Source & Stateless)
- **Campaign Read Functions**: Query campaign and quest data from CKB Celldata
- **User Profile Functions**: Aggregate user data from on-chain sources
- **Proof Validation Functions**: Validate submissions and trigger smart contract updates
- **Leaderboard Computation**: Calculate rankings from on-chain achievement data
- **Notification Functions**: Trigger notifications for quest updates and rewards
- **Cache Synchronization**: Manage temporary data consolidation to blockchain
### Blockchain Infrastructure
- **CKB Mainnet**: Primary blockchain for production deployments
- **CKB Testnet**: Development and testing environment
- **Indexer Services**: Transaction monitoring and event processing
- **RPC Providers**: Reliable blockchain connectivity
### Serverless Functions (Stateless & Open Source)
- **Netlify Functions**: Open-source, stateless API endpoints for quest validation and proof processing
- **Cloudflare Workers**: Periodic on-chain data consolidation and cache management
- **Notification Services**: Decentralized notification delivery without data persistence
- **Blockchain Indexing**: Real-time CKB Celldata indexing and query optimization
## Infrastructure Requirements
### Frontend Hosting
- **Netlify/Vercel**: Static site hosting with automatic deployments
- **CDN Distribution**: Global content delivery for optimal performance
- **Custom Domain**: Professional branding with SSL certificates
- **Environment Management**: Separate staging and production environments
### Data Storage (Decentralized-First)
- **CKB Celldata**: Primary storage for all governance, proof, and user achievement data
- **IPFS**: Decentralized storage for quest proofs, media, and large file attachments
- **Neon Serverless Database**: Temporary intermediate cache for performance optimization only
- **Local Storage**: Browser-based storage for user preferences and session data
- **Data Sovereignty**: All critical data consolidated on-chain with transparent access
### Monitoring & Analytics
- **Error Tracking**: Real-time error monitoring and alerting
- **Performance Monitoring**: Application performance and user experience metrics
- **Usage Analytics**: User behavior tracking and engagement metrics
- **Security Monitoring**: Suspicious activity detection and prevention
### Mock Campaigns
We would be using the following mock campaigns to visually represent the workflow, and test the platform and the smart contracts.
These campaigns would need some level of human oversight to ensure that tasks are completed appropriately and not abused, also because some tasks may require submitting evidence.
- AMA boost campaign. Points for:
- Posting a question on the reddit AMA thread
- Sharing the AMA thread on X
- Like/RT the main X post that points to the AMA thread
- Raid an X post or forum thread. Points for:
- Replying with comment
- Community fund DAO campaign
- Replying with comment or feedback on a proposal
- Knowledge boost campaign
- Share an article on X from the Knowledge Base and summarise in your own words
- Analytics websites boost
- Create accounts on CMC, Coingecko, Lunarcrush and upvote daily
- On-chain boost. (will need to develop an effective system to verify this). Points for:
- Deposit liquidity on a DEX (e.g. utxoswap)
- Lock CKB to create iCKB
- Lock CKB to create RUSD
- ? Hold USDI?
# Development Roadmap
## Phase 1: Foundation & Core Features (MVP)
- **User Authentication**: Wallet connection and profile management.
- **Campaign System**: Basic campaign creation by whitelisted admins and quest definition.
- **Quest Participation**: Quest completion with manual review for all task types (including on-chain ones).
- **Reward Distribution**: A point system implemented as a UDT, and support for CKB/other UDTs as rewards. Rewards are earned in a locked state pending verification.
- **Verification**: A simple admin-facing UI to manually approve users and unlock their rewards.
- **Leaderboard**: Simple ranking system with basic badges
- **Campaign Admin Dashboard**: Campaign management tools for campaign creators
- **Platform Admin Dashboard**: Essential campaign management tools
## Phase 2: Enhanced Engagement & Verification
- **Advanced Verification**: Implement the "Coming Soon" features: integration with DID protocols and optional third-party KYC providers.
- **Gamification Enhancement**: Streak bonuses, difficulty multipliers, achievement system
- **Social Features**: User profiles, activity feeds, social interactions
- **Tipping System**: Community-driven tipping with approval workflow
- **Mobile Optimization**: Responsive design and mobile-specific features
- **Analytics Dashboard**: Comprehensive metrics and reporting
## Phase 3: Advanced Features & Scaling
- **Advanced Quest Types**: Complex multi-step quests with conditional logic
- **Automated Verification**: Build an on-chain data indexer and oracle system to automatically verify specific on-chain actions (e.g., checking for a specific transaction type from the user's address)
- **API Ecosystem**: Third-party integrations and developer tools
- **Advanced Analytics**: AI-driven insights and recommendation engine
- **Multi-Language Support**: Internationalization for global community
- **Enterprise Features**: White-label solutions for other blockchain projects
# Logical Dependency Chain
## Foundation Layer (Must Complete First)
1. **Core Infrastructure Setup**
- Next.js application scaffold with TypeScript and static generation
- CCC wallet integration and blockchain authentication
- Basic UI component library and design system
- Smart contract architecture and CKB Celldata schemas
2. **User Management System**
- User registration and profile creation
- Wallet connection and verification
- Basic role-based access control
- Session management and security
3. **Campaign & Quest Framework**
- Smart contract-based campaign management
- On-chain quest definition and lifecycle contracts
- Immutable reward distribution mechanisms
- Decentralized admin controls through smart contracts
## Engagement Layer (Build Upon Foundation)
4. **Quest Participation System**
- Quest browsing and filtering
- Proof submission and file handling
- Progress tracking and status management
- Basic review and approval workflow
5. **Reward & Recognition System**
- Point calculation and badge assignment
- Token distribution mechanisms
- Leaderboard generation and ranking
- Achievement tracking and display
6. **Verification & Anti-Sybil**
- Multiple verification method implementation
- Verification status management
- Campaign-specific verification requirements
- Anti-sybil protection mechanisms
## Advanced Features Layer (Final Implementation)
7. **Community Features**
- Tipping system with approval workflow
- Social interactions and activity feeds
- Community governance features
- Advanced analytics and reporting
8. **Platform Administration**
- Comprehensive admin dashboards
- Platform-wide management tools
- Analytics and monitoring systems
- Automated processes and notifications
# Risks and Mitigations
## Technical Challenges
### Smart Contract Security
- **Risk**: Vulnerabilities in reward distribution and verification contracts
- **Mitigation**: Comprehensive security audits, formal verification, and gradual rollout with limited initial funds
### Scalability Concerns
- **Risk**: High gas costs and transaction bottlenecks during peak activity
- **Mitigation**: Batch processing, efficient CKB Cell design, and strategic use of Neon cache for read operations
### Decentralization Complexity
- **Risk**: Complex coordination between on-chain data and temporary cache systems
- **Mitigation**: Clear data consolidation protocols, automated cache-to-chain sync, and transparent data sovereignty principles
## MVP Strategy
### Core Value Proposition
- **Focus**: Deliver essential campaign and quest functionality with manual verification
- **Scope**: Basic reward distribution and leaderboard features
- **Timeline**: Rapid development with iterative improvements
### User Acquisition Strategy
- **Launch**: Soft launch with existing CKB community members
- **Growth**: Gradual expansion through successful campaign case studies
- **Retention**: Focus on user experience and meaningful rewards
### Resource Optimization
- **Development**: Prioritize features with highest user impact
- **Infrastructure**: Start with cost-effective solutions and scale as needed
- **Community**: Leverage existing community resources and volunteers
## Business & Community Risks
### Community Adoption
- **Risk**: Low initial participation and engagement
- **Mitigation**: Strong launch campaigns, influencer partnerships, and compelling initial rewards
### Reward Sustainability
- **Risk**: Insufficient funding for long-term reward distribution
- **Mitigation**: Diverse funding sources, sustainable reward economics, and gradual transition to community funding
### Governance Challenges
- **Risk**: Difficulty in maintaining platform quality and preventing abuse
- **Mitigation**: Clear community guidelines, robust moderation tools, and graduated enforcement mechanisms
# Appendix
## Research Findings
### Community Feedback Analysis
- High demand for structured contribution opportunities
- Preference for flexible participation levels
- Strong interest in skill-based recognition and rewards
- Need for clear progression pathways
### Competitive Analysis
- Limited existing solutions for blockchain community engagement
- Opportunity to lead in gamified contribution platforms
- Potential for cross-ecosystem expansion
### Technical Feasibility Assessment
- CKB infrastructure capable of supporting required functionality
- Existing tooling and libraries available for rapid development
- Strong developer community for technical support
## Technical Specifications
### Performance Requirements
- **Page Load Time**: <3 seconds for campaign browsing
- **Quest Submission**: <10 seconds for proof upload
- **Leaderboard Updates**: Real-time with <30 second delay
- **Mobile Performance**: Optimized for 3G+ networks
### Security Requirements
- **Data Encryption**: End-to-end encryption for sensitive user data
- **Access Control**: Role-based permissions with audit trails
- **Anti-Fraud**: Multi-layer verification and anomaly detection
- **Privacy**: GDPR compliance and minimal data collection
### Integration Specifications
- **Wallet Support**: CCC for all.
- **Blockchain**: CKB mainnet and testnet compatibility
- **Storage**: IPFS integration for decentralized proof storage
- **Notifications**: Email, push, and in-app notification systems
</PRD>