🎮 Pallet XP
pallet-xp is a Substrate runtime module for managing Experience Points (XP) as a programmable, non-monetary primitive.
✨ Think of XP as reputation you earn, not value you trade.
What is XP?
XP in this system is:
| Property | Meaning |
|---|---|
| Pseudo-fungible | Numerically comparable, but not economically fungible |
| Non-monetary | Balance-like, but not a transferable asset |
| No issuance | No total supply, no global inflation |
| Earned | Comes from actions, not minting |
| Identity-bound | Linked to XP keys (XpId) |
Each XP entry = a context-specific unit of progress or reputation
💸 Why not tokens?
Traditional tokens assume:
| 🪙 Tokens | ⚡ XP |
|---|---|
| Global supply | ❌ No supply |
| Transferable | ❌ Not transferable |
| Monetary value | ❌ No market-price |
| Inflation model | ❌ None |
XP is earned, not traded
When should you use pallet-xp?
Use this pallet when building systems like:
- 🗳️ DAO governance (reputation-based)
- 🧑💻 Contributor scoring
- 🎮 Gamification layers
- 📊 Participation tracking
- 🧠 Skill / progress measurement
- 🎁 Non-financial incentives
Key Design Principles
1. Identity-first
XP is tied to keys, not accounts
2. Reputation-driven
Growth depends on consistent activity, not one-time actions
3. Anti-abuse by design
Built-in protections against:
- 🚫 Same-block farming
- 🚫 Burst activity exploitation
️ 4. Programmable
XP behavior is controlled by runtime logic, not fixed rules
High-Level Flow
create -> earn -> call (via XpId) -> (lock / reserve) -> reap
| Step | Description |
|---|---|
| Create | Initialize an XP identity |
| Earn | Gain XP through actions |
| Call | Execute logic via XpId |
| Lock / Reserve | Constrain XP if needed |
| Reap | Remove inactive XP |
🚀 Next Steps
Not sure where to begin?
👉 Start with 🧭 Start Here
It helps you choose the right path based on what you want to do.