About CeloRefer
CeloRefer is a decentralized referral system that allows users to earn rewards by referring others to participate in DeFi activities. This SDK provides a simple interface for integrating CeloRefer functionality into your applications.Features
- π User Management - Registration with referral codes and genesis user setup
- ποΈ Badge System - Dynamic tier system (Bronze, Silver, Gold, Platinum) based on referrals
- π° Dynamic Rewards - Multi-level referral rewards with tier-based multipliers
- π― Quest System - Gamified challenges with rewards for completing milestones
- π Seasonal Competitions - Time-based leaderboards with prize pools
- πΌοΈ Reputation NFTs - On-chain achievement badges with dynamic metadata
- π€ Partner Integration - DApp subscription and authorization system
- π Leaderboard - Real-time ranking and statistics
- π΅ Token Operations - cUSD balance checking and staking
- π Referral Links - Easy link generation for sharing
Deployed Contracts
Network: Celo Sepolia Testnet (Chain ID: 11142220)| Contract | Address |
|---|---|
| CeloReferEnhanced | 0xCCAddAC9Ac91D548ada36684dB2b3796A0c7Ea73 |
| ReputationNFT | 0xe667437aF0424Ee9cb983b755Ccccf218779E37b |
| cUSD | 0xdE9e4C3ce781b4bA68120d6261cbad65ce0aB00b |
Badge System
The CeloRefer system includes a tiered badge system based on referral count:| Tier | Name | Threshold | Level 1 Rate | Level 2 Rate |
|---|---|---|---|---|
| 0 | Bronze | 0+ | 5% | 2% |
| 1 | Silver | 5+ | 6% | 2.5% |
| 2 | Gold | 15+ | 7% | 3% |
| 3 | Platinum | 50+ | 8% | 3.5% |
- Bronze: Starting tier for new users
- Silver: Improved reward rates + quest access
- Gold: Premium features + priority support
- Platinum: Elite status + maximum benefits + exclusive perks
Reward Structure
Multi-Level Referral System:- Level 1 (Direct Referrer): Dynamic rate based on badge tier (5-8%)
- Level 2 (Grandparent): Dynamic rate based on badge tier (2-3.5%)
- User performs action (e.g., stakes 100 cUSD)
- Platform fee deducted (15 cUSD to treasury)
- Remaining 85 cUSD distributed:
- Direct referrer gets their tier rate (e.g., 5% = 4.25 cUSD)
- Level 2 referrer gets their tier rate (e.g., 2% = 1.7 cUSD)
- Rest goes to userβs activity
Key Benefits
For Users
β Earn passive income from referralsβ Unlock higher tiers and better rewards
β Compete in seasonal challenges
β Build on-chain reputation
β Receive soulbound NFT badges
For Developers
β Ready-to-use referral infrastructureβ No need to build from scratch
β Type-safe SDK with TypeScript
β Customizable quest and season systems
β White-label support
For Platforms
β Viral growth mechanismβ Sustainable revenue model (platform fees)
β Gamification increases engagement
β On-chain reputation system
β Partner ecosystem management
Technology Stack
- Blockchain: Celo (EVM-compatible)
- Smart Contracts: Solidity ^0.8.20
- Framework: OpenZeppelin contracts
- SDK: TypeScript + viem
- Token Standard: ERC-20 (cUSD), ERC-721 (NFT)
Security Features
- β ReentrancyGuard on all state-changing functions
- β Ownable access control
- β Input validation and require statements
- β Soulbound NFTs prevent reputation trading
- β Partner authorization system
- β Emergency withdrawal for owner