Skip to main content

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)
ContractAddress
CeloReferEnhanced0xCCAddAC9Ac91D548ada36684dB2b3796A0c7Ea73
ReputationNFT0xe667437aF0424Ee9cb983b755Ccccf218779E37b
cUSD0xdE9e4C3ce781b4bA68120d6261cbad65ce0aB00b
Block Explorer: https://alfajores.celoscan.io

Badge System

The CeloRefer system includes a tiered badge system based on referral count:
TierNameThresholdLevel 1 RateLevel 2 Rate
0Bronze0+5%2%
1Silver5+6%2.5%
2Gold15+7%3%
3Platinum50+8%3.5%
Benefits by Tier:
  • 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%)
Platform Fee: 15% (goes to treasury for sustainability) Reward Distribution:
  1. User performs action (e.g., stakes 100 cUSD)
  2. Platform fee deducted (15 cUSD to treasury)
  3. 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