Skip to main content

🎮 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:

PropertyMeaning
Pseudo-fungibleNumerically comparable, but not economically fungible
Non-monetaryBalance-like, but not a transferable asset
No issuanceNo total supply, no global inflation
EarnedComes from actions, not minting
Identity-boundLinked 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
StepDescription
CreateInitialize an XP identity
EarnGain XP through actions
CallExecute logic via XpId
Lock / ReserveConstrain XP if needed
ReapRemove 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.