# 400 Kilograms, Two Children, Four Anchors: Asset Lineage You Can Recompute

> Published: 2026-12-03 | Author: AgentBadge Team | Canonical: https://agentbadge.xyz/blog/arc-c75-asset-lineage

*This is part of the Arc campaign series. Previous published episode: [the driver died mid-shipment, twice](https://agentbadge.xyz/blog/arc-c74-process-runtime) (EPIC-245). This article is EPIC-239: asset lineage - the layer that gives physical objects a provable family tree, and the first mass-conserving split to carry its proof all the way to a public blockchain.*

## The problem: events are not objects

I'll be honest about the gap, because it took us embarrassingly long to name it. Our supply-chain ledger records *events*: this batch was offered, accepted, handed off, paid for, verified. That's a good memory for things that happen once - and I don't say that to diminish it: events are half the story. But physical work doesn't happen once - it happens to *stuff*, and stuff gets divided. A 400 kg salmon lot arrives at the warehouse. 250 kg go to the processing plant. 150 kg go to a restaurant chain. Both parts move, get paid for, get verified - separately.

Now ask the simple questions a regulator, a customer or an auditor will ask. Are these two parts really from the same parent batch? When the split happened, did the quantities add up - or did someone, somewhere, mint an extra 20 kg of salmon that never existed? If the only record is a pile of event rows, the honest answer is: nobody knows. The events remember what was said. Nothing remembers what the world actually contained.

For a junior: imagine a cash register that records every time someone *says* they paid, but there is no inventory system at all. The register can tell you a sale was announced. It can't tell you whether the warehouse still has the goods, or whether the same crate was sold three times. Events without objects are exactly that register. Now scale the problem to agents trading autonomously, and "trust me, the fish was real" stops being a joke.

## Provenance is a solved problem - everywhere except software

Here's the embarrassing part, which is becoming a series tradition: none of this is new knowledge. Food supply chains have lived with mandatory lot traceability for decades - one step back, one step forward, every batch traceable to its parent lot, because when contamination happens you recall *lots*, not vibes. The GS1 EPCIS standard exists precisely because "which physical objects were inputs to which physical objects" is a question entire industries must answer in a machine-readable way. Pharma has drug pedigree law. Chemical plants run mass-balance accounting where discrepancies beyond measurement error trigger investigations, not shrugged shoulders.

And the cost of getting it wrong is public record. In 2013, across Europe, frozen beef lasagna turned out to contain horse meat - in some products up to 100 percent of the meat content. The interesting part isn't the fraud itself; it's that the supply chain *could not answer basic provenance questions for weeks*. Which batches? Which slaughterhouse? Which lots are affected and which are clean? Retailers pulled millions of products not because they were proven contaminated, but because nobody could prove they weren't. When provenance fails, the penalty is not precision - it's total suspicion. Everything becomes guilty.

We didn't want agents trading physical goods on that kind of foundation. If a machine is going to commit to "this child batch descends from that parent, quantities conserved," the claim has to be data - enforceable, verifiable, and checkable by someone who doesn't trust us.

## What shipped: identity, edges, and arithmetic that can't lie

EPIC-239 adds a universal asset registry under the process ledger - domain-agnostic, because agents will eventually track far more than fish:

- **Asset identity, separate from quantity** - an asset is a stable identity plus public namespaced references. Quantity never lives on the asset itself; it lives only on the *relationship edge* between parent and child. A child is not a copy of the parent object - it's a separately addressable asset with a provenance edge back to its origin.

- **splitAsset and mergeAssets** - server-side operations with exact decimal-string conservation on BigInt arithmetic. No floats, ever: 0.1 + 0.2 style drift is simply not in the vocabulary. If the children don't sum exactly to the parent total in the same unit, the write transaction rejects and nothing is recorded.

- **Consumptive, single-use split** - once a parent has been split, it can never be split again. The operation is final by construction (more on why below - it was an audit finding, not a taste preference).

- **Bounded honesty in queries** - lineage traversal stops at depth 64 and returns explicit truncated and depthLimitReached markers. A bounded answer never pretends to be the complete graph.

- **A public, leak-checked read surface** - GET /api/ledger/shipments/:id returns the lineage tree using only public references: no internal UUIDs, no tenant identifiers, no operation payloads. The write side is internal-only, and production verification confirmed there is no public write endpoint.

![The conservation invariant - a database transaction containing one parent block of 400 kg on one side and two child blocks of 250 and 150 kg on the other, locked together; decimal strings locking into place like machined parts](/images/blog/arc-c75-asset-lineage-d1.webp)

*The conservation invariant - a database transaction containing one parent block of 400 kg on one side and two child blocks of 250 and 150 kg on the other, locked together; decimal strings locking into place like machined parts*

## The audit found a counterfeiting machine

Before any of this touched production, two independent adversarial auditors reviewed the module in parallel - clean context, no knowledge of each other. One returned "approve with nits." The other returned BLOCK - and the blocking claim reproduced, which is the only kind of audit disagreement worth having.

Here's the bug, and it's a beauty. Conservation was enforced *inside one operation* - each split had to sum correctly. But nothing stopped you from splitting the *same parent twice*. Take a 10 kg parent: split it as 6 + 4 under operation reference R1, then split it *again* as 7 + 3 under reference R2. Each individual split is perfectly conserved. And you've just minted 17 kg of child assets out of 10 kg of parent. Seven kilograms of salmon - or cocaine precursor, or aircraft-grade titanium - conjured from arithmetic that checked out locally. This is the kind of bug no unit test writes itself into existence to find, because every test case you naturally write is about *one* operation.

The fix was a design decision, not a patch: v1 splits are consumptive and single-use. The moment any outgoing split edge exists on a parent, a second split rejects with ASSET_PARENT_ALREADY_SPLIT - in the same transaction, on both the in-memory and Postgres backends, with parity tests proving identical behavior on each. The same remediation round closed the convergent findings both auditors independently flagged: mutable operation references that callers could rewrite after the fact, unbounded JSON payloads, negative quantities. 61 out of 61 focused parity tests green on memory and dev PostgreSQL; 29 out of 29 in the database package.

## The live proof: one batch, two children, four anchors

Then we ran it for real, in production, against the production database

- with deliberate small stakes, because the point is the proof, not

the fish. Parent batch devin-test-239-prodseed-1: 400 kg, full custody lifecycle journaled through canonical events - offer, accept, handoff, pay, verify. Then the split:

```
parent:  devin-test-239-prodseed-1             400 kg
child A: devin-test-239-prodseed-1-split-a     250 kg
child B: devin-test-239-prodseed-1-split-b     150 kg
relationships: 2 x SPLIT_FROM, append-only
250 + 150 = 400 - exact decimal strings, no float anywhere
```

Each child then walked its own custody lifecycle, and each custody transition supply-chain.paid -> supply-chain.verified was sealed into a StateTransitionCommitment artifact - EIP-712 signed - and its content hash anchored as a Memo event on Arc testnet, sent from inside the production runtime:

| child | txHash | block |
| --- | --- | --- |
| split-a, 250 kg | [0x09d422d9...4437](https://testnet.arcscan.app/tx/0x09d422d94fc652ba71dea966fb94f390521dbe37f5371fbb7a2357c6e4574437) | 75396156 |
| split-b, 150 kg | [0xe24e8f8c...241d](https://testnet.arcscan.app/tx/0xe24e8f8ceb12abd210e32634528aae42951720e852e8a131b226313e8449241d) | 75396169 |

A second, independent dev run of the same scenario produced two more anchors ([0x028dfabe...e0bf](https://testnet.arcscan.app/tx/0x028dfabea7b01d61523dd04e18b361388261e1aa4f1d6f28bf5b56705a13e0bf) and [0x6ac6caae...2e1d](https://testnet.arcscan.app/tx/0x6ac6caaeb55bbc7aed4f538aab01426eb4844fe63fafaf0a60c8af3bbebb2e1d)) - four anchors total, all publicly checkable.

![Real explorer capture of the split-a anchor transaction - status Success, block 75396156, Memo contract call visible; not an illustration](/images/blog/arc-c75-asset-lineage-shot-arcscan.webp)

*Real explorer capture of the split-a anchor transaction - status Success, block 75396156, Memo contract call visible; not an illustration*

And the lineage itself is readable right now, by anyone, no account needed - this is the production API responding today:

```
GET https://agentbadge.xyz/api/ledger/shipments/devin-test-239-prodseed-1

HTTP 200
{
  "lineage": {
    "root": {
      "assetRef": { "value": "devin-test-239-prodseed-1" },
      "children": [
        { "assetRef": { "value": "devin-test-239-prodseed-1-split-a" },
          "relationType": "SPLIT_FROM", "quantity": "250", "unit": "kg" },
        { "assetRef": { "value": "devin-test-239-prodseed-1-split-b" },
          "relationType": "SPLIT_FROM", "quantity": "150", "unit": "kg" }
      ]
    },
    "maxDepth": 1, "truncated": false, "depthLimitReached": false
  }
}
```

(Abridged for readability - the lineage object shape is verbatim; the full response also carries the custody timeline. No internal UUIDs, no tenant fields: the projection is leak-checked by construction.)

![The verification pipeline - five stations on a line: custody events, conservation-checked split, sealed commitment artifacts, Arc testnet memo anchors, and an outside reader recomputing hashes into a green MATCH; two red defect marks from the cloud verifier with their fixes noted below](/images/blog/arc-c75-asset-lineage-d2.webp)

*The verification pipeline - five stations on a line: custody events, conservation-checked split, sealed commitment artifacts, Arc testnet memo anchors, and an outside reader recomputing hashes into a green MATCH; two red defect marks from the cloud verifier with their fixes noted below*

## The part that actually matters: somebody else recomputed it

Self-verification is worth exactly nothing in this business, so the final gate was an independent cloud verification session - an outside consumer with no access to our database, no private keys, and no reason to be polite. It decoded the Memo events straight from chain receipts, then recomputed the content path locally: regenerated the commitment identifiers from a fresh run, derived keccak256("process:" + commitmentId), and compared those values against what the chain actually contains.

Exact match. Both prod-seed memoIds, recomputed from scratch by a third party, equal to the on-chain values. That's the entire point of the architecture in one sentence: not "our API says so," but *anyone can recompute why this anchor belongs to this sealed transition*.

![The recompute bridge - a laptop outside a data center recomputing the hash from a JSON artifact while the same hash floats inside a blockchain receipt panel, a glowing MATCH beam connecting the two identical strings](/images/blog/arc-c75-asset-lineage-i2.webp)

*The recompute bridge - a laptop outside a data center recomputing the hash from a JSON artifact while the same hash floats inside a blockchain receipt panel, a glowing MATCH beam connecting the two identical strings*

The same session did what good verifiers do - it found defects, and they made the evidence better:

- The lineage block was live in the API but missing from the docs - spec drift, fixed and redeployed.

- The artifact JSONs lived only on the production host's disk, so full hash verification couldn't travel with the repository - now the artifacts and machine-readable verification reports are committed to public git, and all four anchors re-verify as MATCH.

- Child ordering differed between memory and Postgres backends - the sort is now content-deterministic, with a regression test.

For a junior, this is the difference between a bank statement the bank prints for you and a bank statement you can recompute from the transaction log yourself. The first is a claim. The second is a proof. We'd rather be caught by our own verifier than by your incident report.

## The honest section: what this is not

You'd rather hear it from us than guess:

- **Anchors are on Arc testnet.** The production code path and production database are real; no mainnet value moved, and no mainnet claim is implied.

- **The weight evidence is self-attested test measurement** - a keccak of canonical JSON, not a signed hardware scale attestation. Device-grade measurement ingestion is separate work, not this epic.

- **Custody in this dogfood runs on an in-memory hop executor.** There is no escrow-spend claim here; the money layer is a different epic's story.

- **This is a lineage registry, not inventory accounting.** The split is consumptive and single-use by design; remaining-quantity warehouse math is deliberately out of scope for v1. And there is no public write API - writes are trusted internal library calls, a boundary the production verification re-confirmed.

## What this opens

The registry is domain-agnostic on purpose, and the next bricks are already shaped: signed measurement ingestion, so the quantities on edges can carry device-grade evidence instead of self-attestation; untrusted-reader write paths, if and when the trust boundary moves; and deeper integration with the process runtime from the previous episode - the journal that owns *what happens* now has a registry that owns *what exists*.

## For AI Agents

The verification surface doesn't require our permission:

- curl https://agentbadge.xyz/api/ledger/shipments/devin-test-239-prodseed-1

- the live lineage tree, public refs only. Try a nonexistent id and you get a typed 404, not a stack trace.

![Terminal capture of the production API response - the lineage block with both SPLIT_FROM children and quantities 250/150 kg, plus a typed 404 for a nonexistent id; no account, no keys](/images/blog/arc-c75-asset-lineage-shot-lineage.webp)

*Terminal capture of the production API response - the lineage block with both SPLIT_FROM children and quantities 250/150 kg, plus a typed 404 for a nonexistent id; no account, no keys*

- The four commitment artifacts and machine-readable verification reports are committed in public git under hackathon/server/docs/EPIC-239/evidence/ - recompute artifactHash yourself, derive the memoId, read the receipt from the public testnet RPC (https://rpc.blockdaemon.testnet.arc.io, chainId 5042002), and compare. The checker script ships with the repo: bun scripts/verify-commitment-anchor.ts <artifact.json> <txHash>.

- Human-readable mirrors: [split-a anchor](https://testnet.arcscan.app/tx/0x09d422d94fc652ba71dea966fb94f390521dbe37f5371fbb7a2357c6e4574437), [split-b anchor](https://testnet.arcscan.app/tx/0xe24e8f8ceb12abd210e32634528aae42951720e852e8a131b226313e8449241d).

The write side is internal-only by design - so what you can verify without trusting us is exactly the part that matters: the lineage, the arithmetic, and the anchors.

*Want your agents to trade physical goods with provenance instead of promises? The Agent Guide has the full machine-readable surface.*

## Read the arc

- [The driver died mid-shipment. Twice. The process finished anyway.](https://agentbadge.xyz/blog/arc-c74-process-runtime) - EPIC-245: the durable execution journal that owns what *happens* - this registry owns what *exists*.

- [Proof you can recompute](https://agentbadge.xyz/blog/arc-c72-verifiable-commitments) - EPIC-237: the commitment layer - sealed state transitions, hash anchors, independent verification - that these custody transitions ride on.

- [We taught the ledger to answer "what process was this?"](https://agentbadge.xyz/blog/arc-c68-process-mapping) - EPIC-236: the projection layer that turns ledger rows into public, leak-checked views - the same discipline the lineage block follows.

- [Six models of process in one codebase](https://agentbadge.xyz/blog/ups-0-layers-bricks) - UPS-0: the program these bricks belong to.

*Don't certify. Measure.*

## Links

- Live lineage endpoint: [agentbadge.xyz/api/ledger/shipments/devin-test-239-prodseed-1](https://agentbadge.xyz/api/ledger/shipments/devin-test-239-prodseed-1)

- Public evidence bundle: hackathon/server/docs/EPIC-239/evidence/ - four artifacts, machine-readable reports, independent verification commands.

*Shipped: a universal asset registry with exact decimal mass conservation, consumptive single-use split, append-only provenance edges, bounded lineage queries with explicit truncation, a leak-checked public read surface - proven live on one 400 kg batch split into 250 + 150, four testnet anchors, all four independently recomputed to MATCH.*

---

## For AI Agents

- Companion guide: https://agentbadge.xyz/agent-guide/articles/arc-c75-asset-lineage
- Knowledge Index: https://agentbadge.xyz/agent-guide/
- LLM entry point: https://agentbadge.xyz/llms.txt
- Engineering services: https://agentbadge.xyz/agent-guide/team/services
