DotPassport · Milestone 1

Building Polkadot’s On-Chain Identity & Reputation Layer

A deep dive into the first milestone of DotPassport: architecture, badge engine, reputation scoring, and why we chose Subscan for data.

Milestone 1 — Outcomes

  • Badge Engine: static badge catalog with clear metrics and levels; automatic evaluation from on-chain data.
  • Reputation Scoring: category-based score (longevity, txs, governance, staking, token diversity, NFT activity, extrinsic depth) aggregated into a total.
  • Subscan Integration: fast hosted API for extrinsics, referenda, staking rewards/slashes, token holdings, and events; local caching to cut latency and calls.
  • REST API Skeleton: auth flow and documented endpoints to read badges and scores; OpenAPI spec included.
  • Live Demo: basic UI atdotpassport.io.

Why Subscan, not Subsquid?

For milestone speed and reliability, we chose Subscan’s hosted API. It gives low-latency access to Polkadot chain data without running our own indexer. That keeps ops lean and lets us focus on reputation logic. We added a simple in-memory cache with sensible TTLs to avoid redundant calls and smooth out bursty traffic.

Architecture Overview

Data Layer

  • Subscan API: extrinsics, governance, staking, tokens
  • Optional NFT fetchers for ecosystem coverage
  • Per-function caching with 10-minute TTL

Domain Layer

  • Badge catalog with metric keys and level thresholds
  • Evaluators per badge (standard ≥ threshold model)
  • Category scores + total weighted reputation

API Layer

A REST API provides endpoints to interact with user profiles, badges, and scores. The authentication flow is wallet-based: users sign a one-time challenge to receive access and refresh tokens. All endpoints are fully documented with an OpenAPI specification.

Authentication & User APIs

# User Authentication
POST /auth/challenge     -> Get a message to sign with your wallet
POST /auth/polkadot      -> Verify signature & issue JWT tokens
POST /auth/refresh       -> Get a new access token using a refresh token
POST /auth/logout        -> Invalidate the current session

# User Profiles
GET  /users/me            -> Get the authenticated user's detailed profile, score, and badges
GET  /users/public/{address} -> Get a public user's profile, score, and badges by address

Scores & Badges APIs

# Scores
GET  /scores              -> Get the authenticated user's current reputation score
GET  /scores/categories   -> Get definitions for all score categories
POST /scores/refresh      -> Trigger a recalculation and update of the user's score

# Badges
GET  /badges              -> Get the authenticated user's earned badges
GET  /badges/definitions  -> Get definitions for all available badges
POST /badges/refresh      -> Check for new achievements & update user badges

DotPassport Badge Catalog

Badges are earned based on your on-chain activity, each with multiple levels that track your progress. Here are all the badges and their levels available in Milestone 1:

Relay Chain Initiate

Marks your first active participation on the Polkadot Relay Chain. This badge is awarded upon the successful confirmation of your very first transaction on the Polkadot network.

  • Level 1: Complete 1 On-Chain Transaction. Achieved by executing a single transaction, which writes your presence onto the blockchain permanently.

Polkadot Regular

Recognizes your sustained presence and long-term commitment to the ecosystem. Longevity is a key indicator of trust and commitment.

  • Level 1: 90+ Days Active. Achieved when your account's first transaction is at least 90 days in the past.
  • Level 2: 1+ Year Active. Awarded for maintaining an on-chain presence for over a year.
  • Level 3: 3+ Years Active. This elite level recognizes you as a true veteran of the network.

Extrinsic Engine

Measures your overall activity level on the network. A high extrinsic count demonstrates deep and frequent engagement.

  • Level 1: 10+ Confirmed Extrinsics. Shows you are an active and engaged network participant.
  • Level 2: 50+ Confirmed Extrinsics. Demonstrates a strong pattern of interaction and marks you as a power user.
  • Level 3: 250+ Confirmed Extrinsics. Showcasing a deep and consistent integration with the Polkadot ecosystem.

Parachain Traveler

Highlights your exploration of Polkadot's multi-chain ecosystem. It shows you are leveraging the true interoperable power of the network.

  • Level 1: Interact with 1+ Parachain. Your first step into the cross-chain ecosystem.
  • Level 2: Interact with 3+ Parachains. Shows a broad engagement with diverse applications.
  • Level 3: Interact with 5+ Parachains. Marks you as a true cross-chain expert.

Referendum Voter

Recognizes your participation in Polkadot's on-chain governance, signifying your commitment to the network's democratic process.

  • Level 1: Cast Your First Vote. Making your voice heard in network decision-making.
  • Level 2: Vote on 5+ Referenda. Demonstrates consistent commitment to governance.
  • Level 3: Vote on 20+ Referenda. Places you in a dedicated group of governance participants.

Treasury Contributor

Awarded for directly influencing the allocation of the on-chain Treasury by voting on funding proposals.

  • Level 1: Vote on a Treasury Proposal. Directly influencing how community funds are allocated.

NPoS Guardian

For contributing to the security of Polkadot's Nominated Proof-of-Stake (NPoS) system by staking and nominating validators.

  • Level 1: First-Time Nominator. Marks your entry as a contributor to network security.
  • Level 2: 3+ Months Active Nominator. Highlights your consistent support for validators.
  • Level 3: 1+ Year Active Nominator. Proving your long-term dedication to network security.

Trusted Nominator

Rewards your skill in selecting reliable validators by maintaining a clean staking record without slashes.

  • Level 1: 6+ Months Slash-Free. Demonstrates prudent and effective decision-making.

Polkadot Collector

Measures the scale of your collection of Non-Fungible Tokens (NFTs), reflecting your engagement with the ecosystem's creators.

  • Level 1: Own 5+ NFTs. You've started a meaningful collection.
  • Level 2: Own 25+ NFTs. Marks you as a serious collector.
  • Level 3: Own 100+ NFTs. A remarkable achievement, signifying a deep commitment to the Polkadot art scene.

Cross-Chain Holder

Showcases your engagement with Polkadot's interoperability by holding assets from different parachains.

  • Level 1: Hold Assets from 2+ Parachains. Your initial exploration of the multi-chain ecosystem.
  • Level 2: Hold Assets from 4+ Parachains. Demonstrates a deep and diversified investment.

Identity Confirmed

For cryptographically verifying your account details on-chain. This signifies a higher level of trust within the ecosystem.

  • Level 1: Identity Verified by Registrar. Your on-chain identity has been verified, marking your account with a check of trust.

Utility Maximizer

Recognizes your expertise in using advanced features to optimize on-chain actions, such as batching transactions to save on fees.

  • Level 1: Execute a Batch Transaction. Demonstrates a sophisticated understanding of network efficiency.

How Reputation Scoring Works

Your total reputation score is a weighted sum of points from several categories. Each category rewards different types of on-chain activity.

Account Longevity

Rewards how long an address has been active on-chain. Tiers include: New (under 7 days), One Week, One Month, Three Months, and Veteran (over 1 year), with points increasing from 0 to 10.

Transaction Count

Tracks how many extrinsics you’ve submitted. Tiers start at First Steps (1-9 txs) and go up to Transaction Master (50+ txs), with points from 2 to 10.

Transaction Volume

Measures the total DOT you’ve moved on-chain. Rewards range from Small Mover (1+ DOT) to High Roller (100+ DOT), with points from 2 to 10.

Module Diversity

Rewards interacting with multiple Polkadot runtime modules. Tiers go from Module Explorer (1 module) to Polkadot Power User (5+ modules), with points from 1 to 5.

Governance Participation

Rewards active engagement in on-chain referenda voting. Points increase from Partial Voter (under 50% of votes) to Governance Champion (100% of votes), with points from 2 to 20.

Staking Rewards

Measures the total DOT you’ve earned through staking. Tiers range from Tiny Rewards (0.1+ DOT) to Reward Master (10+ DOT), with points from 2 to 10.

Staking Nominator Diversity

Rewards you for nominating a variety of validators. Tiers go from Single Nominee (1+ validator) to Nomination Pro (10+ validators), with points from 1 to 5.

Staking Slash Penalties

Tracks slash events on your nominations. Your reputation is negatively impacted, with penalties from -1 point for a Minor Penalty (1 slash) up to -5 points for a Major Penalty (5+ slashes).

Token Diversity

Rewards holding a variety of tokens beyond the native DOT. Tiers range from Diversifier (1+ token) to Token Connoisseur (5+ tokens), with points from 1 to 5.

NFT Holdings

Recognizes your participation in the NFT space. Tiers go from Collector (1+ NFT) to NFT Aficionado (10+ NFTs), with points from 1 to 5.

NFT Activity

Rewards how actively you interact with NFTs (buys, sells, transfers, etc.). Points are awarded for reaching tiers like Engaged (10+ events) and Active Collector (50+ events).

Extrinsic Depth

Measures how many on-chain calls you’ve submitted across different modules. Tiers range from Starter (1+ call) to Veteran Caller (100+ calls), with points from 1 to 10.

What’s Live Right Now

  • Backend services to fetch and cache on-chain data via Subscan
  • Badge definitions and evaluation logic
  • Reputation score calculation and persistence model
  • Auth endpoints and a basic UI at dotpassport.io

Roadmap — Next Milestone

  • Public read endpoints for badges and scores
  • Developer SDK (TypeScript) and examples
  • Wallet integration and profile widgets
  • Automated tests and improved documentation