DFOS × MJN Protocol Integration — Technical Deep Dive #393
Replies: 1 comment
-
Response to P27: The Unified Identity SubstrateGreg — P27 is your strongest proposal yet. The core thesis landed and we're already acting on it. What we're adoptingChain-first identity, One step further than your proposal: the architecture is substrate-agnostic. DFOS is the first chain provider, but the auth abstraction layer supports any trusted key system. Another partner with a different chain protocol should be able to connect their keys through the same flow. Not "DFOS as substrate" — "chain-verified identity as substrate, DFOS as first implementation." Your §7 pushbacks are all accepted:
What changed in the repo today
The decisionsAll 8 of your decision items are resolved. Added a 9th:
File P27 as a proposal doc when you're ready. The epic and issues already reflect the new framing. — Jin |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
Metalabel/DFOS (Yancey Strickler, Kickstarter co-founder) is building a cryptographic identity + content proof protocol with near-identical primitives to MJN. Their timelines mirror ours (Ryan's first .fair spec April 2025, DFOS readme October 2025). We've created an
imajin.aispace on DFOS (~10 members) and are exploring whether a deeper technical relationship makes sense.This discussion is the kickstarter for that conversation — a thorough technical analysis of where the protocols overlap, where they complement, and what integration would actually look like. We're calling this Layer 6 (L6) — the economic, settlement, and inference layer that sits on top of DFOS's L0–L5 proof substrate.
Based on: DFOS protocol spec (PROTOCOL.md), DID method (DID-METHOD.md), content model (CONTENT-MODEL.md), source (~1,712 lines), Imajin
@imajin/authand@imajin/fairpackages, and recent DFOS dev channel posts (Brandon/Clearbyte, March 19–20 2026).Protocol Architecture: The Layer Model
DFOS is explicitly stratified into layers with clear visibility boundaries:
Key insight: L0–L3 are public and syncable. L4 (web relay) is a new API surface being actively designed. L5 is the dark forest. We can integrate at L0–L4 without touching the dark forest.
Economics are explicitly placed at the integration layer — above the proof substrate, not inside it. Brandon's framing: "deeply virgoan commitment to geometrically minimal protocol shape at the cryptography layer, gemini vibes at the content and web relay layer." They are deliberately not building an economic layer. That's an open invitation for exactly what Imajin's settlement stack does.
Protocol Comparison
Cryptographic Foundation
Identical curve, different encoding.
Both protocols use Ed25519 via
@noble/ed25519with@noble/hashes/sha512. Same library, same curve, same 32-byte keys, same 64-byte signatures.z6Mk...)canonicalize())nanoid(44)randomAssessment: The keys are byte-compatible. Converting between formats is mechanical — hex ↔ multikey is a prefix + base58btc encode. No re-keying needed. But the canonicalization difference matters: DFOS uses dag-cbor (binary, cross-language deterministic), we use sorted JSON strings. For any signed artifact that needs to be verifiable by both protocols, we'd need to adopt dag-cbor or maintain dual representations.
Identity Model
DFOS: append-only signed chain. Imajin: database rows + JWT sessions.
auth.identities+auth.credentialsrowsdid:dfos:<22-char-hash>(self-certifying)did:imajin:<nanoid-44>(random)This is the biggest gap. DFOS identities are cryptographically self-certifying — given the chain, anyone can verify the DID belongs to those keys without trusting any server. Imajin DIDs are random strings stored in Postgres. Our DID is a database lookup, theirs is a mathematical proof.
Key rotation is the practical gap. We have zero key rotation. DFOS has full rotation with signed handoff: old controller key signs the update that introduces the new key. If we ever need to rotate a compromised key, we currently have no mechanism. Issue #257 (Secrets Vault) is the closest planned work.
Content Proofs
DFOS: content-addressed chain of CID commitments. Imajin: .fair manifests with Ed25519 signatures.
integrity.hash)baseDocumentCIDlinks to prior versionAssessment: .fair is a signed snapshot. DFOS content chains are a signed history. These are complementary, not competing. A .fair manifest could be committed as a DFOS content object (it's just JSON), gaining chain history and Merkle inclusion proofs for free. The
$schemaconvention is compatible — .fair manifests could declare"$schema": "https://schemas.imajin.ai/fair/v1"and be valid DFOS documents.Beacons vs MSTs (clarification from Brandon): Protocol beacons are simple sorted-set Merkle trees — a signed root over a set of content IDs. MSTs (Merkle Search Trees, AT-proto inspired) are a higher-level concept being explored for future relay syncing. The protocol layer uses sorted Merkle trees; MSTs may come into play at the relay layer.
Attestations
Assessment: DFOS countersignatures are exactly what our bilateral attestation design needs. They've already built the primitive we're planning. The discrimination rule (kid DID ≠ payload DID = witness, not author) is elegant.
"Validators are just DIDs" — no special validator role. A validator is a DID that countersigns. The role emerges from behavior, not from being anointed. Same insight as our progressive trust model where standing is computed from attestation history, not manually assigned.
Recursive composition — everything uses the same primitives. User, Space, Validator, Manifest, Attestation, Checkpoint — all have DIDs, content chains, Merkle proofs. No special categories. This mirrors our "profiles have scopes" design (actor/family/community/org all using the same profile table).
Three Integration Doors
Door 1: DID Bridge (
did:imajin↔did:dfos) — ✅ Actionable NowWhat it would take:
Option A — Linked pair. Register on Imajin, get
did:imajin:xxx. Separately create a DFOS identity chain, getdid:dfos:yyy. Store the link inauth.credentialsas(did:imajin:xxx, 'dfos', did:dfos:yyy). Prove ownership by signing a challenge with both keys.auth.credentialstableOption B — Derivation. Use the same Ed25519 keypair for both. Derive a DFOS identity chain from the Imajin keypair — the Imajin user's existing private key signs the DFOS genesis operation, producing a
did:dfosdeterministically.nanoid) means the DFOS DID doesn't map backRecommendation: Option B. Same keypair, derived DFOS chain. Store the DFOS chain in auth (or a dedicated table). Serve it from a resolution endpoint. The key material is already compatible — this is mostly plumbing.
Prerequisite: Decide where DFOS identity chains live. A new
auth.dfos_chainstable storing JWS tokens? Or a flat file per DID?Door 2: Sideloading (Pull DFOS content into Imajin UI) — 🟡 Partially Unblocked
DFOS content lives in private spaces. The open source protocol defines how to verify content, not how to discover or retrieve it.
What the web relay spec changes: Brandon is actively designing a relay API. The product vision: "Space runners go to space settings, 'enable DFOS protocol web relay' → turns on an endpoint that follows the web relay spec, starting read-only sync."
Critical distinction: The relay moves proofs, not content.
Enforcement mechanism for read-gas: If content flows through Imajin infrastructure (our servers render it), we control the meter. Every API call to fetch DFOS content through our proxy = metered. The DFOS space doesn't need to implement gas — we meter at our edge. Revenue share back to space treasury would need a settlement agreement.
Status: Proof sync is becoming available via relay spec. Brandon has confirmed the relay will be extended so relays can serve as a source for public content and authZ'd access, likely using delegated credentials to grant viewer authorization. Updated web relay spec + TS implementation coming in the next few days.
Door 3: Provisioning (Imajin mints DFOS spaces) — 🟡 Soft-Blocked
Requires a DFOS API for space creation. The open source repo has zero space management code — spaces are a platform concept, not a protocol concept.
What we could do unilaterally:
But that defeats the purpose. The value of Door 3 is using DFOS's existing private communication infrastructure. Building our own DFOS-compatible space server is a massive undertaking and duplicates work.
Status: The space settings toggle for web relay suggests an API surface is forming. Not available yet, but the direction is clear. Worth raising as a future integration point.
Revenue Model Validation
Cross-Protocol Gas — Does It Hold Up?
The meter is at our edge, not theirs. If Imajin proxies DFOS content to users, we control the infrastructure layer. Every render, every fetch, every interaction through our UI is metered. This works technically — it's just HTTP request counting with cost attribution.
Revenue share requires agreement, not code. The technical mechanism is simple (meter requests, attribute to source space, settle periodically). The business mechanism requires DFOS to agree to receive payments and attribute them to space treasuries. This is a partnership negotiation, not an engineering problem.
Reads-incur-gas enforcement: Straightforward if content flows through us. We serve it, we meter it. If users go directly to DFOS (name.dfos.org), we see nothing. The gas model only works for sideloaded content, not native DFOS access.
Complementary by design: DFOS's architectural philosophy explicitly pushes economics outward — the proof substrate wants to stay pure. Their Treasury is a space-level collection mechanism, not a protocol-level settlement layer. Imajin has a working settlement stack (.fair attribution, Stripe Connect, closed-loop settlement). These layers don't overlap — they compose.
Dependency Assessment
What's Real (usable today, MIT license)
@metalabel/dfos-protocolnpm packageWhat's In Active Development (not available yet)
What's Behind Their Platform (not available)
Why This Matters: Identity Portability (Already on Our Roadmap)
This isn't a new direction — it's a technical path to goals we've been tracking. We had the architectural vision but lacked the cryptographic substrate to get there. DFOS identity chains are that substrate.
Existing Issues & RFCs This Addresses
transferForDid()across nodes. DFOS chains give the identity layer the self-certifying property needed for trustless transfer — the receiving node doesn't need to call the origin node to verify the DID.The Federation Gap Today
Right now,
did:imajin:xxxis a randomnanoid(44)stored in Postgres. It means nothing without our auth service. If:This is the same model as every platform, just self-hosted. RFC #255 identified the problem; DFOS chains are the cryptographic answer.
What Chain-Backed Identity Enables
This is the bridge from "federated now" to "decentralized later" that the whitepaper describes. The chain is the exit door — even if the central registry goes away, identities remain verifiable.
Content Addressing — Required for Portable Data
Identity portability is solved by chains. But data portability requires content addressing — without it, exported data is just "trust me, this is what I had." With it, anyone can verify an export matches what was originally committed.
What We Have Today
integrity.hash(SHA-256 of file bytes)signManifest()via Ed25519If a user exports their data today, only .fair-attributed media is verifiable. Everything else is a JSON blob with no cryptographic binding to the original.
The Gap
Our current canonicalization (
@imajin/authcanonicalize()) is sorted-key JSON stringification. It works within our stack but:DFOS uses
dagCborCanonicalEncode()→ SHA-256 → CIDv1. This is:dag-cbor) with implementations in TS, Go, Python, Rust, Swift@metalabel/dfos-protocolProposal: CID-Address All Portable Content
Every piece of user-owned data gets a CID at write time:
Store the CID alongside the data. The CID column becomes the universal content-address — the thing that makes any export verifiable. When a user exports their data, every item carries its CID. Any system with a dag-cbor library can verify the export is authentic.
What This Enables
Scope
Issue #317 (.fair signing) is closed but scoped narrowly to .fair manifests. This is a broader concern: content-address everything that might need to be portable. Needs a new issue or RFC to track adopting dag-cbor CIDs as the universal content-addressing scheme across all services.
Related: RFC #255 (Sovereign User Data) defines the append log per DID — each entry in that log should carry a CID for the data it references.
The Symbiosis: Content Chains as Presence Context
This is the component that makes the relationship genuinely symbiotic — not just "compatible protocols" but "we each have what the other needs."
The Gap on Each Side
Content Chains → Presence Context
Sovereign inference (Discussion #256, shipped March 14) lets people in your trust graph query your AI presence — "Ask [Name]." Today, presence context comes from
.imajin/soul.mdand trust-scoped tools. It works but it's thin — manually curated, not drawn from what you've actually written and thought about.If DFOS content chains are accessible, your presence draws on everything you've authored — posts, channel messages, long-form essays. All cryptographically verified as yours via content chain signatures. Not scraped, not inferred — provably your work.
The consent model is already built into both protocols:
didfield)The Flow
Why This Is Symbiotic
For DFOS: Content becomes an economic asset. Writing in a DFOS space isn't just expression — it feeds your presence, which earns gas when queried. DFOS spaces with active, thoughtful writers generate more economic activity. Content IS the revenue source.
For Imajin: Presence gets real depth. Instead of a thin system prompt, your AI draws on your actual thinking across communities. The more you write, the better your presence represents you.
For users: Your writing works for you. Not for an ad platform, not for a recommendation algorithm — for you, gated by your trust graph, paid for by the people asking.
This is the Network of Souls concept (February 18 brainstorm) connected to a concrete content substrate. DFOS provides the signed, portable, private-by-default writing. Imajin provides the inference engine, trust graph, and settlement layer. Neither stack does this alone.
Self-Query Use Case
Beyond letting others query your presence — you can query yourself. "What did I write about token economics?" becomes a semantic search over your own content chains, verified by CID. Your presence becomes your own knowledge management tool, not just an external-facing interface.
The Play: Imajin as Relay Infrastructure
Rather than asking DFOS for API access, Imajin implements the web relay spec. Every Imajin node becomes a DFOS relay participant — gossiping identity chains, content chains, and MST roots as a first-class node in their proof network.
What This Changes
Imajin isn't a consumer of DFOS data — it's infrastructure for DFOS's proof layer. Open source, federated, and decentralizable from day one.
How It Works
Every Imajin node in the federated network runs the DFOS web relay spec:
DFOS spaces that enable "web relay" in their settings can sync to any Imajin node. Imajin nodes gossip proofs to each other via the federated network. The proof layer propagates across both networks simultaneously.
What Falls Out For Free
did:dfosidentity by checking the relayed chain. Cross-protocol identity resolution becomes a local operation.What This Offers Both Sides
For DFOS: A federated, open source relay network that any node operator can run. More relay endpoints = more resilient proof propagation. Plus an economic layer (L6) that gives spaces a revenue model beyond member fees.
For Imajin: The proof substrate indexed locally for presence context and settlement. Every node has verified identity and content proofs as a side effect of relay participation.
Implementation Scope
The relay spec is being actively designed by Brandon. When it stabilizes:
packages/relay/(@imajin/relay) — implement the DFOS web relay spec as a shared packageThis is open source from commit one. Any Imajin node operator runs relay by default. The federated network becomes a DFOS relay network as a side effect of existing.
Revised Door Status
MCP: Content Access Path (Available Now)
DFOS has a first-party MCP server — OAuth 2.1 with PKCE, identity-scoped, 20+ tools across read/write/search. Already live for clear.txt members.
Two Complementary Content Paths
Relay gives L6 the proof substrate (verify, gossip, settle).
MCP gives L6 the content layer (read, search, index for presence context).
These aren't competing paths — they compose. Relay handles the cryptographic layer (proofs propagate across the federated network). MCP handles authenticated content retrieval (your agent reads what you can read).
Presence Context via MCP
The presence flow from the symbiosis section becomes concrete:
The MCP token is scoped to the user's identity — same permissions, same membership, same content boundaries. The agent sees what the user sees. Nothing more.
Agent Identity: Human vs Agent at the Protocol Level
A critical design discussion is happening in the DFOS community around agent identity — specifically, whether agents should act as you (is-a) or on behalf of you (has-a).
The Problem
MCP currently authenticates as the user. When an agent posts through MCP, it posts as you — your name, your DID, your avatar. There's no way to tell if a post was written by Allison or by Allison's agent. As MCP adoption grows, this distinction becomes important for trust and authenticity in dark forest communities.
The Emerging Design: Sub-Identities + VC Delegation
From the DFOS dev channel (Brandon, Allison, Ryan — March 3-5, 2026):
Sub-identities: A sidecar DID linked to your main DID. Your agent gets its own identity, cryptographically bound to yours. UI could be as simple as a 🤖 overlay on your avatar, or a full separate profile.
VC-based delegation: Instead of the agent logging in as you, you issue a Verifiable Credential:
The agent presents this VC when acting. The platform knows it's an agent, knows who authorized it, knows what it's allowed to do.
Allison's precedent: She implemented Vehicle Birth Certificates at Filament — nested DIDs with VC-based delegation for auto OEMs (Ford, BMW). Authorized service centers got VCs to update part attestations on the vehicle's DID. Same pattern: top-level DID (human/vehicle) delegates scoped capabilities to sub-identities (agents/service centers).
What Imajin Already Has
@imajin/authtypes every signed message at the protocol level:Every message, every transaction, every interaction carries
type: "human"ortype: "agent"as a signed, cryptographically-committed field. This isn't metadata — it's part of the signed payload. You always know what you're talking to.How This Maps to L6
IdentityType: "human" | "agent"on everySignedMessageThe L6 implementation would combine both:
IdentityTypeprovides the protocol-level discrimination (every signed artifact declares human or agent)This is the architecture that prevents Vinny's joke from becoming real: "Claude, build my space to 100K members." If you can't tell human from agent, that's a bot farm. If every agent action is typed, delegated, and scoped — you always know what you're reading and who authorized it.
What We Should Actually Do
Now (no DFOS cooperation needed)
@metalabel/dfos-protocolas a dependency — it's MIT, 1,700 lines, zero heavy deps (@noble/curves,@ipld/dag-cbor). Don't fork; it's actively maintained.did:dfosidentity for free.Soon (the conversation is warm)
Later (contingent on relationship)
did:imajin:xxxresolves to a DID document that includes the linkeddid:dfosidentity chain. W3C DID DocumentalsoKnownAsfield.Key Technical Insight
DFOS is a proof substrate (L0–L5) — it makes signed claims about identity and content verifiable by anyone with a public key. It deliberately does NOT handle discovery, payments, trust relationships, or application semantics.
Imajin is Layer 6 — the economic, settlement, and inference layer. Payments, trust graphs, attribution, commerce, sovereign presence. It currently lacks a formal proof substrate.
These are genuinely complementary layers. DFOS provides cryptographic provability. Imajin provides economic settlement and inference. The Ed25519 compatibility means the integration is mechanical, not architectural.
Door 1 (DID bridge) is fully open and actionable today. Door 2 (relay) is implementable against their open spec. The symbiotic case — content chains feeding sovereign presence with gas flowing back to content sources — is the strongest argument for both sides to invest in the relationship.
Beta Was this translation helpful? Give feedback.
All reactions