Data flow: from receipt to bINT
1.3 Data flow: from receipt to bINT
A receipt's journey runs in two phases.
Phase A — Synchronous (the user is waiting):
- The client sends the file to the upload endpoint. The server compresses the image, strips EXIF metadata, and stores the result in object storage. A perceptual-hash deduplication index is checked before analysis.
- For image input, the vision LLM (02 Stage 2) reads the receipt directly from the image in a single call. For PDF input, an OCR layer (02 Stage 1) first extracts the text, which then feeds the same LLM stage.
- The LLM returns labeled plain text: a block of
FIELD: valuelines for merchant, date, totals, and payment fields, plus a pipe-separated table for line items. Parsing is defensive — a missing or malformed line leaves that fieldnulland the pipeline continues. - The regex/rule layer (02 Stage 3) reconciles totals and validates dates.
- The merchant resolver (02 Stage 5) attaches a merchant identity.
- The trust layer (03) classifies the receipt's quality, and the reward is computed within the same request, so the user sees the verified preview and the reward together.
Phase B — Asynchronous (background settlement):
- A background post-process worker resolves each line item to a canonical product ID (02 Stage 4) using database-side fuzzy matching with an LLM fallback, and folds the receipt's quality classification into the user's cumulative trust score.
- For Epoch 9 and later, the settlement worker selects post-cutover bINT v2 movements in
lockedstate, applies the published source-bucket and quota rules, and produces an epoch distribution root for the corresponding INT claims. Epoch 8 remains the historical cPoints settlement boundary. - An independent verifier recomputes the bINT v2 allocation and confirms the 1:1 bINT-to-INT relationship before a release can fund a distributor. The claimant then signs the claim from their own wallet and pays the Solana transaction fee from their own SOL balance.
The user sees Phase A in seconds. Phase B finalises asynchronously. The off-chain bINT v2 movement ledger remains the source of truth for Epoch 9+ economic credits; cPoints remains a separate background contribution metric. The on-chain root and later claim transfers record the corresponding INT distribution after the release gates are complete.