A neuroscience-inspired layered architecture where each component maps to a brain structure — from brainstem rhythm (Medulla) to episodic memory (Hippocampus) to executive control (Cortex).
REST + WebSocket endpoint for all external interactions. Handles stack creation, perceive/recall operations, sleeve management, needlecasting, and real-time event streaming. The single entry point to the cognitive system. Port 7070.
Five specialized services: Thalamus Router (coherence folding), DHF Compositor (memory reconstruction), Needlecast Router (re-sleeving saga), Quellist Treasury (token emission), and Bandwidth Faucet (development token drip).
Sleeve Runtime: 4-in-1 parametric process dispatcher for human, AI, mining, and memory sleeves. Worker Runner: 6-in-1 background worker handling drift checks, epoch anchoring, residue collection, memory reconciliation, treasury emission, and sleeve watchdog.
Merkle Mountain Range built over Medulla block hashes. Rolling window of 256 leaves provides O(log 256) = 8-hash cross-shard proofs. The binding layer between independent chains.
Go • Custom PoW chain • Sequencing + coherence anchoring • Epoch timing • Difficulty retarget • Port 8332
Go • Content-addressed memory • Epoch-gated recall • Pin semantics • Fidelity scoring • Port 5001
geth • StackIdentity NFT • BandwidthToken × 5 • Treasury • ResidueRegistry • NeedlecastRouter • Port 8545
One 32-byte hash that cryptographically binds three independent chains, committed to Proof-of-Work every 4 seconds.
// Step 1: Compute per-shard Merkle roots
evmRoot = merkleRoot([
txHash for tx ∈ cortex-evm
where contract ∈ ECCA_CONTRACTS
])
ipfsRoot = merkleRoot([
sha256(cid) for write ∈ hippocampus-dag
])
sleevesRoot = merkleRoot([
sha256(type ‖ id) for sleeve ∈ active_sleeves
])
btcRoot = 0x00...00 // reserved for v3.1
// Step 2: Fold into coherence root
crossRoot = sha256(
"ecca-coh-v1" ‖
evmRoot ‖ btcRoot ‖
ipfsRoot ‖ sleevesRoot
)
// Step 3: Commit via PoW
medulla.submitCoherenceRoot(
epoch, crossRoot,
evmRoot, ipfsRoot, sleevesRoot
)
If the same thalamus operator submits two distinct coherence tuples for the same epoch → automatic routing-equivocation residue with operator slash via QuellistTreasury.
Memory survives partial chain death. If hippocampus wedges, cortex keeps running, medulla keeps mining. Discrepancies become residues — the system degrades gracefully, never catastrophically.
The autonomic rhythm of the ECCA system. Like the medulla oblongata controls heartbeat and breathing, this chain provides the fundamental timing and sequencing layer.
// Submit coherence root
POST /rpc
{
"method": "submitcoherenceroot",
"params": [epoch, crossRoot,
evmRoot, ipfsRoot, sleevesRoot]
}
// Get chain info
POST /rpc { "method": "getinfo" }
// Get block by height
POST /rpc
{ "method": "getblock",
"params": [height] }
// Health check
GET /health
The hippocampus is responsible for forming and consolidating episodic memories. In ECCA, this is a content-addressed DAG where every node is encrypted, epoch-tagged, and token-gated.
ecca://<sha256>@<epoch>// Store a DAG node
PUT /dag
{
"cid": "ecca://abc123@42",
"data": "encrypted-payload",
"links": ["parent-cid-1"],
"epoch": 42, "stackId": "stack:..."
}
// Retrieve a node (epoch-gated)
GET /dag/:cid?epoch=44
// Pin for durability
POST /dag/:cid/pin
// Recall (depth-bounded walk)
POST /recall
{ "root": "cid", "depth": 16,
"epoch": 44 }
// Health check
GET /health
fidelity = |decryptable_fragments| / (|decryptable| + |broken|). If fidelity drops below 0.6, a historical-non-canonical residue is spawned — the system flags degraded memory integrity.
The cerebral cortex handles executive decisions — identity, ownership, economic logic, and coordination contracts. Built on a private geth instance with Clique PoA consensus.
StackIdentity.sol | ERC-721 NFT — Stack identity with CPV, epoch counter, episodicHead |
BandwidthToken.sol | ERC-20 × 5 — Cognitive token minting, burning, stack-scoped balances |
QuellistTreasury.sol | Per-epoch emission engine with CPV scaling and EBC decay |
NeedlecastRouter.sol | On-chain coordination for atomic re-sleeving sagas |
SleeveRegistry.sol | Sleeve lifecycle: spawn, authorize, decommission |
ResidueRegistry.sol | Failure detection, bounty tracking, proof submission, ResidueToken minting |
EpochAnchor.sol | Per-epoch coherence root commitment and verification |
ECCA needs sub-5-second epoch cycles with guaranteed inclusion. Public Ethereum can't provide this. The Cortex chain is purpose-built for cognitive coordination — identity, tokens, and residues — while Medulla provides PoW finality and Hippocampus provides memory.
The thalamus is the brain's sensory relay — filtering and routing information. In ECCA, this service collects all epoch events across all three chains, computes per-shard Merkle roots, folds them into the coherence root, and submits to Medulla for PoW finality.
Runs every epoch (4s). The heartbeat of the coherence loop.
Digital Human Freight — the reconstructable mind. This service walks the Hippocampus DAG breadth-first, decrypting nodes with per-epoch HKDF keys, scoring fidelity, and returning the reconstructed memory to the requesting sleeve.
Recall depth bounded by min(requested, memoryToken_balance).
Orchestrates the atomic 6-step re-sleeving saga: freeze source → shard episodicHead → pin critical shards → anchor route on medulla → reconstruct target → settle with RoutingToken. Like downloading consciousness into a new body.
Per-epoch token emission engine. Issues 100 units of each core token per stack, scaled by the Stack's Coherence Profile Vector and decayed by the Epoch Binding Curve. The economic heartbeat of the system.
4-in-1 parametric sleeve dispatcher. Each sleeve kind (human, AI, mining, memory) has different tick rates, token preferences, and behavior patterns. Sleeves are the embodiments of Stacks — temporary bodies for persistent minds.
Background worker dispatcher running six continuous passes: drift-checker, epoch-anchor, residue-collector, memory-reconciler, treasury-emitter, and sleeve-watchdog. The maintenance system that keeps coherence intact.
Memory in ECCA is not a database blob. It's a capability-bounded walk over a content-addressed, encrypted DAG with formal properties from graph theory.
{
"cid": "ecca://<sha256>@<epoch>",
"ciphertext": "AES-256-GCM(
plaintext,
epochKey(stackId, epoch)
)",
"links": ["parent-cid-1", "parent-cid-2"],
"epoch": 42,
"kind": "perceive" | "recall" | "pin",
"pinned": false,
"stackId": "stack:0x..."
}
This means: after ~100 epochs without pinning, an agent's memory fidelity naturally degrades to the threshold — triggering historical-non-canonical residues and incentivizing memory maintenance.
Inspired by Altered Carbon's cortical stack transfer — moving a mind between bodies in six atomic steps.
The source sleeve's tick loop is paused. No further perceive/recall operations. The Stack's current episodicHead is captured as the transfer root.
The DHF Compositor collects the 8 most recent CIDs from the episodicHead. These are the critical memory fragments needed for continuity.
All 8 shards are pinned on the Hippocampus DAG for durability. Pinned nodes are exempt from epoch-gating — they survive indefinitely. Costs MemoryToken.
The NeedlecastRouter contract records the transfer route on-chain. This creates a globally auditable record: "Stack X transferred from Sleeve A to Sleeve B at epoch E."
The target sleeve is spawned with the same Stack identity. It derives fresh per-epoch HKDF keys, loads the pinned shards, and resumes from the transferred episodicHead. Drift resets to 0.
The source Stack's RoutingToken balance is debited: cost = 5 + 0.1 × shards + 0.5 × |Δepoch|. Source sleeve is decommissioned. The mind has moved; the old body is discarded.
ECCA's architecture isn't metaphorically inspired by neuroscience — it's structurally isomorphic. Every design decision maps to a neurological principle.
| Brain Structure | ECCA Component | Neuroscience Function | Cryptographic Function |
|---|---|---|---|
| Medulla Oblongata | Medulla PoW | Autonomic rhythm (heartbeat, breathing) | PoW sequencing, epoch timing, coherence anchor |
| Hippocampus | Hippocampus DAG | Episodic memory formation & consolidation | Content-addressed encrypted DAG with epoch gating |
| Cerebral Cortex | Cortex EVM | Executive decision-making, identity | Smart contracts, NFT identity, token logic |
| Thalamus | Thalamus Router | Sensory relay, information gating | Cross-shard event folding, coherence root computation |
| Axon Fibers | NATS JetStream | Long-range neural transport | Durable message bus (AxonalBus) |
| Synaptic Field | MMR | Cortico-thalamic firing patterns | Merkle Mountain Range for cross-shard proofs |
| Cortical Stack (Altered Carbon) | StackIdentity NFT | Persistent identity across bodies | Ed25519 keypair + CPV + EBC + epoch counter |
| Sleeve (Altered Carbon) | Process + HKDF key | Temporary embodiment | Per-epoch capability, bound to sleeve lifecycle |
| Cognitive Dissonance | Drift Counter | Divergence between perception and reality | perceive increments, sync resets, threshold → desync |
| Scar Tissue | Residue Objects | Permanent record of neural damage | Tradeable failure objects with token bounties |
| Synaptic Decay | EBC (Epoch Binding Curve) | Unused pathways weaken over time | Exponential token decay with floor |
| Cortical Column Tuning | CPV (Coherence Profile Vector) | Specialization of neural regions | 5-coefficient vector scaling token issuance |
Deep-dive into every component, API, and protocol detail.