XP & Level System
smo1 beginner 4 min read
ELI5
Every time you do something useful in SMO1 — create a link, get clicks, log in daily — you earn experience points (XP). Collect enough XP and you level up, like in a video game. The higher your level, the more XP you need for the next one. There is also a login streak: come back every day and you get bonus XP at 7, 30, 100, and 365 days.
Technical Deep Dive
XP Events
| Event | XP Reward | Condition |
|---|---|---|
LINK_CREATED | 10 | Every new link |
FIRST_LINK | 50 | One-time bonus for the very first link |
CLICK_MILESTONE_10 | 25 | Link reaches 10 total clicks |
CLICK_MILESTONE_100 | 50 | Link reaches 100 total clicks |
CLICK_MILESTONE_1000 | 100 | Link reaches 1,000 total clicks |
DAILY_LOGIN | 5 | Once per calendar day |
STREAK_7 | 50 | 7-day login streak |
STREAK_30 | 150 | 30-day login streak |
STREAK_100 | 500 | 100-day login streak |
STREAK_365 | 1500 | 365-day login streak |
Level Formula
Each level requires exponentially more XP:
XP for level N = 100 × (1.5)^(N-1)| Level | XP to reach | Cumulative XP | Approximate effort |
|---|---|---|---|
| 1 | 100 | 100 | 2 links + daily logins |
| 2 | 150 | 250 | First week of regular use |
| 3 | 225 | 475 | Active user |
| 4 | 338 | 813 | Power user |
| 5 | 506 | 1,319 | Heavy usage |
| 6 | 759 | 2,078 | Influencer tier |
| 7 | 1,139 | 3,217 | Community leader |
| 8 | 1,709 | 4,926 | Prolific creator |
| 9 | 2,563 | 7,489 | SMO1 veteran |
| 10 | 3,845 | 11,334 | Legend |
The level is computed by summing the series until the cumulative threshold exceeds the user’s total XP.
Streak Mechanics
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#e8f4f8', 'primaryTextColor': '#2d3748', 'primaryBorderColor': '#90cdf4', 'lineColor': '#718096', 'secondaryColor': '#f0fff4', 'tertiaryColor': '#fefcbf'}}}%%flowchart TD A[User logs in] --> B{Last login was<br/>yesterday?} B -->|Yes| C[Increment streak] B -->|No| D{Last login was<br/>today?} D -->|Yes| E[No change] D -->|No| F[Reset streak to 1] C --> G{Streak milestone?} G -->|7| H[Grant +50 XP] G -->|30| I[Grant +150 XP] G -->|100| J[Grant +500 XP] G -->|365| K[Grant +1500 XP] G -->|Other| L[No bonus] F --> M[Grant +5 XP<br/>daily login] E --> N[No XP]Streak state lives on the User model:
streak_current— consecutive daily loginsstreak_longest— all-time maximum streaklast_streak_at— timestamp of the most recent streak-affecting login
A login “counts” once per calendar day (UTC). Multiple logins on the same day do not double-count.
XP Event Persistence
Every XP grant is recorded as an xp_event row:
| Column | Description |
|---|---|
id | UUID |
user_id | Recipient |
event_type | link_created, click_milestone_10, etc. |
xp_amount | Points granted |
reference_id | Optional foreign key (e.g., link UUID) |
created_at | Timestamp |
This audit trail prevents double-granting and enables “recalculate XP from events” disaster recovery.
Key Terms
- Base XP → 100 points required for level 1; each subsequent level multiplies by 1.5×
- Cumulative threshold → The running sum of base × 1.5^(N-1); your total XP is compared against this to determine level
- Streak → Consecutive calendar days with at least one login
- Milestone bonus → Large one-time XP grants at 7, 30, 100, and 365 days
- XP event → Immutable audit row recording why XP was granted
Q&A
Q: Why 1.5× exponential instead of linear? A: Linear progression would make high levels trivial to reach. Exponential growth keeps early levels accessible while making top levels genuinely rare and prestigious.
Q: Can a user lose XP? A: No. XP is monotonically increasing. Links can be deleted, but earned XP is not revoked. This avoids negative emotional feedback.
Q: What happens if a user logs in at 23:59 and again at 00:01? A: The second login counts as the next calendar day (UTC), so the streak increments by 1. The gap between logins is only 2 minutes, but the calendar date changed.
Q: How is level calculated if a user’s XP is between thresholds? A: The user stays at the highest level whose cumulative threshold they have met. Excess XP carries over toward the next level but does not grant partial progress bonuses.
Examples
Think of the XP system like a coffee shop loyalty card:
- Creating a link is buying a coffee (+10 stamps)
- First link bonus is your welcome drink (+50 stamps)
- Click milestones are referrals — each time a friend buys a coffee because of you, you get bonus stamps
- Daily login is showing your face at the counter (+5 stamps)
- Streak bonuses are the monthly “regular customer” rewards: free pastry at 7 days, free bag of beans at 30 days, a branded mug at 100 days, and a VIP membership at 365 days
- Leveling up is earning a new tier on your card: bronze, silver, gold, platinum — each tier requires more total stamps than the last
neighbors on the map
- Core Data Models designing a new feature that touches users, links, or achievements
- Cat Mode & Personality Mapping Layer adding a new UI label that needs both cat and professional versions