Introducing Haven Protocol — Privacy Reputation on CKB

Update: Multi-Platform Identity, Score Optimization

Since the last update where the full pipeline went live (TEE scoring, DCAP attestation, SP1 proof, on-chain verification), I’ve been focused on expanding the identity layer and fixing scoring accuracy.

Multi-Platform OAuth

GitHub, Discord, and LinkedIn OAuth flows are now live. Users link accounts directly from the dashboard through the Phala TEE:

  • GitHub (OAuth 2.0): repos, commits, PRs, issues, org contributions
  • Discord (OAuth 2.0): account age, server memberships, linked platform accounts (Steam, Twitch, YouTube, etc.)
  • LinkedIn (OpenID Connect): profile verification

Each connection is stored exclusively inside the TEE enclave. Twitter is implemented in code but currently blocked by Twitter’s API tier requirements (free tier doesn’t support OAuth 2.0 user authentication).

Scoring Now Uses All Platforms

Discord and LinkedIn data feed directly into the scoring formulas:

  • Proof of Human (20% weight): account ages are now averaged across all connected platforms (wallet, GitHub, Discord, LinkedIn). Connecting more platforms increases the multi-platform consistency bonus since it’s harder for sybils to maintain old accounts everywhere.
  • Community Engagement (10% weight): Discord guild count and linked accounts factor into interaction diversity alongside GitHub PRs/issues and on-chain activity.

On-Chain Scoring Fixed

The on-chain activity collector was returning zero for all users. The root cause: it derived lock args from the user’s public key assuming standard secp256k1, but users connecting via JoyID or omnilock have different lock scripts. The fix was straightforward. The lock script fields (code hash, hash type, args) saved during identity registration are now properly mapped through to the collector. Users get accurate on-chain scoring regardless of wallet type.

Scoring Cycle

The scoring cycle now runs every 24 hours (midnight UTC). When a user’s score hasn’t changed since the last successful on-chain submission, the TEE skips proof generation and chain submission entirely. No wasted SP1 network calls for unchanged scores.

Dashboard

The dashboard is live at https://haven-protocol.vercel.app/

Features working:

  • Score display with live refresh
  • Leaderboard with on-chain data (podium + sortable table)
  • Score history chart (Recharts, real data from TEE)
  • Identity management with GitHub, Discord, LinkedIn OAuth
  • Deposit creation and top-up
  • Notifications
  • Loading screens between page navigations

What’s Next

  • CKB ecosystem GitHub scoring: check user contributions to nervosnetwork repos and other ecosystem projects. Merged PRs, issues created, and commit history to ecosystem repos will directly boost the Contribution score.
  • Discord reputation from Nervos server: detect if users are members of the Nervos Discord server, their roles, and activity level. Active community members in the official server get a Community score boost.
  • LinkedIn Nervos engagement: check if users follow or engage with Nervos-related company pages and content on LinkedIn.
  • Twitter integration once API access tier is resolved
  • Shadow Job Board on the ecosystem page for anonymous talent matching based on score tiers

Repo: GitHub - truthixify/haven · GitHub
SDK: https://www.npmjs.com/package/@haven-protocol-ckb/sdk
Dashboard: https://haven-protocol.vercel.app/

4 Likes