Page cover

Capsules & FlowDAG — the network’s long-term memory

These components are fundamental to Vela's operation across all phases.

5.1  Key objects

Object
Role

CapsuleNFT

Immutable package of code, model, or data

parentCapsuleID

Pointer to the Capsule being upgraded (optional)

AgentID

Bonded runtime that executes Capsules. Stored in a registry plus collateral stake on-chain

Receipt

{inputHash, outputHash, peerSigs} verification record

FlowDAG

Directed‑acyclic graph linking Receipts to Capsules

5.2 How a new edge is added

```mermaid
graph TD
  C1[Capsule #01]
  C2[Capsule #02]
  R1[Receipt R1]

  C1 --> C2
  C2 --> R1
  R1 --> C1
  1. Agent runs Capsule #02 (which depends on Capsule #01).

  2. It produces Receipt R1 with hashes + signature.

  3. The on-chain event creates two edges, extending the global FlowDAG.


5.3 Why lineage matters

When value reaches any leaf agent, smart contracts stream a programmable share backward through the FlowDAG. A firmware hacker who published Capsule #01 in 2026 can still earn micro-royalties in 2036 if newer agents build on her work.


5.4 Upgrade workflow

  1. Publish a new Capsule that sets parentCapsuleID = <oldCapsuleID>.

  2. DAO verifiers review the diff; if approved, it becomes the active version.

  3. Reputation & royalties migrate forward, but the old Capsule keeps its historical share.


5.5 Takeaways

  • Immutable history, flexible future — Capsules can’t be edited, only superseded.

  • No central index — anyone can rebuild the FlowDAG from events.

  • Economics baked in — lineage is the payment rail that keeps upstream contributors paid.

Last updated