Skip to main content

Badge & Reputation

Methods for working with badge tiers and the reputation system.

getBadgeTier

Gets the badge tier for a user based on their referral count.
async getBadgeTier(userAddress: Address): Promise<number>

Parameters

NameTypeDescription
userAddressAddressAddress of the user

Returns

number - Badge tier (0-3 for Bronze, Silver, Gold, Platinum).

Example

const tier = await sdk.getBadgeTier('0x1234...');
console.log('Badge tier:', tier);

getBadgeInfo

Gets information about a specific badge tier.
getBadgeInfo(tier: number): BadgeInfo

Parameters

NameTypeDescription
tiernumberBadge tier (0-3)

Returns

BadgeInfo object containing badge details.

Example

const badgeInfo = sdk.getBadgeInfo(2); // Gold badge
console.log('Badge name:', badgeInfo.name);
console.log('Level 1 rate:', badgeInfo.level1Rate);

Badge Tiers

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