THREAT MODEL
Attacks, detection, and what's out of scope
No system is invulnerable. This section maps the attack surface, what ChainMemory detects or prevents, and what remains the user's responsibility.
Attack vectors
| Attack | Target | Detection / Prevention | Severity |
|---|---|---|---|
| Retroactive state modification | API database | ✓ Detected — recomputed hash won't match the on-chain anchor | Critical |
| Silent event deletion | API database | ✓ Detected — missing events change the hash chain | Critical |
| Fake anchor (forge tx hash) | Verification layer | ✓ Prevented — anchors are on-chain; forging requires blockchain control | Critical |
| API Key theft | User credentials | ~ User responsibility — use env vars, rotate keys, never expose in frontend | High |
| Man-in-the-middle on API calls | Network | ✓ Prevented — all API traffic uses HTTPS/TLS | High |
| Malicious memory injection | Project state | ~ Mitigated — memories are scoped to API key owner; Consolidation Engine validates semantic coherence | Medium |
| Validator collusion (>50% signers) | Blockchain consensus | ~ Mitigated — Clique PoA requires majority; validator set will expand to 21 seats | Medium |
| Replay attack (resubmit old anchor) | Smart contract | ✓ Prevented — contract tracks version numbers; same version can't be re-anchored | Medium |
| Content inference from hashes | Privacy | ✓ Prevented — SHA-256 is one-way; content can't be reversed from hash | Low |
| DDoS on API | Availability | ~ Mitigated — rate limiting (30–600 req/min by plan); blockchain unaffected | Medium |
Out of scope
ChainMemory does not protect against:
- User storing false information — if you save a lie as a memory, ChainMemory anchors it faithfully. The system guarantees integrity (the data hasn't changed), not truthfulness (the data was correct).
- Compromised user device — if your machine has malware, your API key and local data are exposed before they reach ChainMemory.
- AI hallucinations — ChainMemory stores what you save, not what an AI generates. It doesn't validate whether the AI's output was accurate.
Defense in depth
ChainMemory's security model follows defense in depth: even if the centralized API is compromised, the on-chain layer provides an independent verification mechanism. No single point of failure can silently corrupt project history.