Architecture
bitCaster is composed of independent services that communicate over open protocols.
Each user runs their own instance of the app in their browser. All users connect to the same shared infrastructure.
Cashu Mint
Section titled “Cashu Mint”The mint is the core of the system. It issues both regular ecash tokens and conditional ecash tokens locked to specific market outcomes. When an event resolves, the mint settles from the verified outcome supplied through the matching-engine flow: winning tokens become redeemable for sats, and losing tokens expire.
bitCaster App
Section titled “bitCaster App”The user-facing progressive web app (PWA). It runs entirely in your browser and holds your tokens locally. The app communicates directly with the mint for all token operations (minting, swapping, redeeming) and with the matching engine for order book access.
Matching Engine
Section titled “Matching Engine”The matching engine maintains a central limit order book (CLOB) for each market. It matches buy and sell orders and broadcasts real-time price updates. It also connects to the Nostr oracle network, watches the oracle announcements and attestations relevant to registered markets, verifies them, and coordinates market closure when an attestation arrives.
For everyday market pages, the app reads market state, deadlines, outcomes, and order-book data from the matching engine first. Treat that as a fast cache of the mint’s condition data: it is what keeps list and detail pages responsive. When a user performs a critical action that can move funds, the app or protocol must still rely on mint-enforced checks or a fresh mint comparison before the action becomes final.
This is the only centralized component — it exists because order matching is inherently a coordination problem that benefits from a single sequencer.
Oracle Network
Section titled “Oracle Network”Oracles can publish announcements and attestations to Nostr relays. Those relays act as an untrusted public network: they can transport, cache, or withhold events, but they cannot make an invalid announcement or attestation valid. bitCaster treats Nostr as a discovery and audit channel, not a trust anchor; signed DLC oracle data can also be submitted directly to the mint or matching engine and is verified before use.
Oracle
Section titled “Oracle”An oracle is an entity from Discreet Log Contracts (DLC) that announces real-world events and later attests to their outcomes. Oracles may publish announcements and attestations as Nostr events, making them publicly discoverable and auditable. Any bitCaster App can read oracle announcements directly from the Nostr network — no special server is needed.
Importantly, oracles are completely independent of bitCaster — they don’t need to know about the app or ecash at all. They simply attest to real-world facts using the DLC protocol.
Open Source
Section titled “Open Source”Of the components above, every piece other than the matching engine is open source. The source code lives here. Because everything that touches your assets or personal information is open source, you are free — and encouraged — to verify and improve it at your own discretion.
The matching engine is the only closed-source component. Keeping its internals private is sometimes desirable, for example to make spam mitigation harder to game. The API specification is open, however, so you can build your own matching engine against it.