NakedPnL

The public registry of verified investment performance. Every return sourced from SEC filings, exchange APIs, or platform data.

Registry

  • Registry
  • Market Context
  • How It Works
  • Community

Verification

  • Get Verified
  • Connect Exchange

Legal

  • Terms of Service
  • Privacy Policy
  • Refund & Cancellation
  • Support
  • GDPR Rights
  • Cookie Policy
  • Disclaimers
  • Methodology
  • Compliance
Follow

NakedPnL is a publisher of verified performance data. Nothing on this site constitutes investment advice, a recommendation, or a solicitation to buy, sell, or hold any security, commodity, or digital asset. Past performance does not indicate future results. Trading carries a high risk of total capital loss.

© 2026 NakedPnLAll performance data is verified by the NakedPnL teamcontact@nakedpnl.com
NakedPnL
RegistryPricingHow It WorksCommunitySupport
NakedPnL/Glossary/Hash Chain — Definition, How It Detects Tampering
Glossary

Hash Chain — Definition, How It Detects Tampering

A hash chain links each record to its predecessor via a cryptographic digest, so any retroactive edit changes every later hash and is detected.

By NakedPnL Research·May 7, 2026·4 min read
TL;DR
  • A hash chain stores a sequence of records where each record's hash includes the previous record's hash.
  • Any retroactive edit forces every later hash to change, making silent rewrites detectable.
  • NakedPnL chains every daily NAV snapshot per trader using SHA-256, with the literal string 'genesis' as the seed.
On this page
  1. Definition
  2. How NakedPnL uses it
  3. Worked example
  4. Why it is tamper-evident, not tamper-proof
  5. Related terms
  6. Frequently asked questions

Definition

A hash chain is an append-only data structure in which each entry stores a cryptographic digest of its content together with the digest of the entry that came before it. The link is computed as `chainHash[i] = SHA-256(chainHash[i-1] || contentHash[i])`. Because SHA-256 is collision-resistant, an attacker cannot edit an old entry and recompute later hashes to match the original sequence without detection. The first record (the genesis entry) uses a fixed seed value in place of a previous hash so the chain has a well-defined starting point.

How NakedPnL uses it

Every trader on NakedPnL has their own per-account hash chain. When a daily NAV snapshot is fetched from a venue (Binance, Bybit, OKX, IBKR, Kalshi, or Polymarket), the raw exchange response is canonicalized to RFC 8785 byte-stable JSON, hashed to a contentHash, and then chained: `chainHash = SHA-256(previousChainHash + contentHash)`. The very first entry uses the literal string `"genesis"` as the previous hash. Each chain head is also fed into the daily Merkle root that is anchored to Bitcoin via OpenTimestamps, so the chain is independently re-verifiable against an external clock.

Worked example

import { createHash } from "node:crypto";

const sha256 = (input: string) =>
  createHash("sha256").update(input).digest("hex");

// Day 1: genesis entry
const content1 = sha256('{"nav":10000,"date":"2026-05-05"}');
const chain1 = sha256("genesis" + content1);

// Day 2: links to Day 1
const content2 = sha256('{"nav":10250,"date":"2026-05-06"}');
const chain2 = sha256(chain1 + content2);

// Day 3: links to Day 2
const content3 = sha256('{"nav":10180,"date":"2026-05-07"}');
const chain3 = sha256(chain2 + content3);

// Editing Day 1 changes content1 -> chain1 -> chain2 -> chain3.
// The break is detectable by anyone who saved an earlier chain head.
Three-day hash chain. Editing day 1 invalidates every later chainHash.

Why it is tamper-evident, not tamper-proof

A hash chain does not physically prevent edits. The publisher of the chain can always rewrite the entire history if it has full control of the storage. What a hash chain provides is detection: anyone who recorded an earlier chain head can recompute later hashes from the published records and check that the head still matches. NakedPnL combines per-trader chains with a daily Merkle root anchored to Bitcoin so the chain heads are committed to an external timestamp that the publisher cannot rewrite.

Related terms

  • SHA-256 — the cryptographic hash function used at every link.
  • Merkle tree — combines many chain heads into a single root for batch attestation.
  • OpenTimestamps — anchors NakedPnL's daily Merkle root to Bitcoin.
  • Canonical JSON — RFC 8785 serialization that makes contentHash deterministic.

Frequently asked questions

What happens if a single record in the chain is edited?
The contentHash of the edited record changes, which changes its chainHash, which changes every chainHash that comes after it. The break is visible to any third party who recorded an earlier chain head.
Why does NakedPnL use the literal string 'genesis' as the seed?
It is a deterministic, public, well-known starting value. Any verifier can reproduce the first chainHash from the published genesis record without trusting NakedPnL to disclose a private seed.
Can I verify the chain myself?
Yes. NakedPnL publishes a browser-side verifier at /verify/chain/[handle] that uses the Web Crypto API to recompute every chainHash from the raw records.

References

  • RFC 6234 — US Secure Hash Algorithms (SHA-256)
  • Haber & Stornetta, How to Time-Stamp a Digital Document (1991)
NakedPnL is a publisher of verified investment performance data. We are not an investment adviser, broker, dealer, or asset manager, and nothing on this page constitutes investment advice or a recommendation. See the compliance page for our full regulatory posture.