FBatchEx dev paper Sign in

PAPER ยท no real money

Where your order and your money go

The venue data model and its flows (spec 64). Every drawing shows where a kind of data moves. The same pages live under docs/data/ in the repo, cut from the code, so they cannot drift.

Flows

  • An order's life

    A tap becomes a signed order, seals into a batch, clears, and books a fill.

    flowchart LR
      U[User or maker] --> G[Gateway]
      G --> S[Seal into batch]
      S --> X[Uncross]
      X --> F[Fill]
      F --> B[Blotter]
  • The auction

    A sealed book clears at one price on the beat; speed does not pay.

    flowchart LR
      O[Sealed orders] --> C[Clear at one price]
      C --> A[Allocate fills]
      A --> P[Put out result]
  • Money in and out

    A deposit is confirmed, booked to the ledger, and guarded on the way out.

    flowchart LR
      D[Deposit] --> V[Confirm]
      V --> L[Ledger]
      L --> W[Withdraw with guards]
  • Journal and replay

    Every input and result is logged, so any fill can be proved by replay.

    flowchart LR
      I[Inputs and results] --> J[Journal]
      J --> R[Replay]
      R --> M[Match the recorded result]
  • Market data out

    The resting book gives an indicative guide and curve, in sums only.

    flowchart LR
      K[Resting book] --> Q[Query store]
      Q --> Gv[Guide and curve]
      Gv --> Sc[Screens and feed]
  • Envs and deploys

    One build reads its env from config and stands up any env from the same path.

    flowchart LR
      Cf[Env config] --> Bd[One build]
      Bd --> Ev[dev, uat, paper, sandbox, prod]
      Ev --> Bg[Env badge]
  • The daily scout

    A daily job reads the feature list and asks what is missing, then reports.

    flowchart LR
      Fl[Feature list] --> Dj[Daily job]
      Dj --> As[Ask what is missing]
      As --> Rp[Report]

Stores

  • Journal

    The ordered log of every input and result. The single truth.

    Owned by fbx-journal.

  • Read store

    The screen view rebuilt from the journal for fast reads.

    Owned by fbx-querystore.

  • Ledger

    The double-entry cash and position book, balanced on a fill.

    Owned by fbx-settlement.

  • Custody

    The wallet balances and the proof-of-reserves records.

    Owned by fbx-treasury.

  • Feature list

    The catalog of shipped features and how to exercise each.

    Owned by fbx-health.