Real-time, linear asset streaming on the Stellar Network.
Money shouldn't move in lump sums. It should flow.
StellarStream is a decentralized, non-custodial protocol built on Soroban (Stellar's smart contract platform) that turns payments into continuous flows instead of one-time transfers. Assets move from sender to receiver second-by-second, unlocking in real time as the Stellar ledger advances — no intermediaries, no waiting periods, no trust required beyond the smart contract itself.
Think of it as a financial tap: once it's turned on, value drips continuously into the receiver's wallet, available to withdraw at any instant.
Traditional payment systems — payroll, subscriptions, vesting schedules, invoicing — all rely on discrete, scheduled events: a paycheck every two weeks, an invoice paid net-30, tokens vesting in quarterly cliffs. This creates real problems:
| Problem | StellarStream's Fix |
|---|---|
| Employees/freelancers wait weeks to get paid for work already done | Funds unlock continuously, available to withdraw anytime |
| Senders must fully trust receivers (or vice versa) with lump-sum transfers | Non-custodial smart contract enforces the terms — no party controls the other's funds |
| Canceling a subscription/payroll mid-cycle means overpaying or clawing back funds | Cancellation instantly and precisely splits funds pro-rata by the second |
| Cross-border payroll is slow and expensive | Built on Stellar, designed for fast, low-cost settlement with stablecoins |
By making payment a continuous function of time rather than a series of transactions, StellarStream gives receivers instant liquidity and gives senders precise, programmable control over how their capital is disbursed.
Common use cases:
- 💼 Payroll — employees earn and can withdraw wages in real time instead of biweekly
- 🧑💻 Freelance & contractor payments — get paid continuously as work happens
- 🔓 Token vesting — linear unlock schedules for team/investor allocations, fully on-chain
- 🔄 Subscriptions — pay-as-you-go services billed by the second instead of the month
- 🤝 Grants & retainers — funders stream capital that recipients draw down as needed
Every StellarStream payment is called a stream. A stream has three key parameters set at creation:
- Total Amount — the full sum being streamed
- Start Time — when unlocking begins
- End Time — when the stream is fully vested (100% unlocked)
Once initialized, the smart contract doesn't "do" anything on a timer — instead, it calculates how much has unlocked on demand, using the current ledger's timestamp. This is what makes it trustless and gas-efficient: there's no background process, just math evaluated at the moment someone interacts with the stream.
In plain terms: the fraction of time that has elapsed between StartTime and EndTime determines the fraction of TotalAmount that has unlocked. If a stream is 30% of the way through its duration, 30% of the funds are unlocked and withdrawable — down to the precision of a single ledger close (Stellar ledgers close roughly every 5 seconds).
Example: A sender streams 10,000 USDC over 30 days. After exactly 10 days (⅓ of the duration), the receiver has ~3,333 USDC unlocked and available to withdraw — whether or not they've withdrawn anything yet.
Receivers don't wait for a stream to end. Calling withdraw at any point pulls out whatever portion has unlocked up to that exact ledger timestamp. Multiple partial withdrawals are supported — the contract simply tracks how much has already been claimed and pays out the difference.
Streams don't have to run to completion. Depending on how the stream is configured, either the sender, the receiver, or both can cancel early:
- The receiver immediately receives everything earned up to the cancellation second.
- The sender is automatically refunded whatever remains unearned.
This means no manual reconciliation, no disputes over "how much was owed" — the contract settles it exactly, atomically, at the moment of cancellation.
Built on the Soroban Token Interface (SEP-41), StellarStream works with any compliant token, including:
- Fiat-backed stablecoins: USDC, BRLG, ARST
- Stellar Asset Contracts (SAC): wrapped XLM and other classic Stellar assets bridged into Soroban
Because it speaks the standard token interface, StellarStream can support new assets as they become SAC-compliant without any contract changes.
Streaming math involves continuous division over potentially long durations — a naive implementation risks rounding errors or overflow. StellarStream's math.rs module uses fixed-point arithmetic purpose-built for accurate, safe streaming calculations at scale.
StellarStream is organized as a modular monorepo — each layer (contract, frontend, backend) is decoupled so teams can build and ship independently without cross-dependencies slowing each other down.
StellarStream/
├── contracts/ # THE CORE PROTOCOL (Rust + Soroban)
│ ├── src/
│ │ ├── lib.rs # Main entry points (initialize, withdraw, cancel)
│ │ ├── types.rs # Data structures (Stream, UserProfile)
│ │ ├── math.rs # Precise fixed-point arithmetic for streaming
│ │ ├── validation.rs # Safety guards (TTL, Auth, Bounds)
│ │ └── errors.rs # Custom Error Enum with 40+ variants
│ └── tests/ # Comprehensive test suite (try_ pattern)
│
├── frontend/ # THE USER DASHBOARD (Next.js 14)
│ ├── src/
│ │ ├── components/ # "Ticking" balance UI, Stream cards
│ │ ├── hooks/ # Soroban-Client & Freighter Wallet hooks
│ │ ├── store/ # Global state for active streams (Zustand/Redux)
│ │ └── layout/ # Responsive Dashboard for Senders/Receivers
│
├── backend/ # THE ANALYTICS LAYER (Node.js + TS)
│ ├── src/
│ │ ├── indexer/ # Event listener for Horizon/Soroban-RPC
│ │ ├── db/ # PostgreSQL schema for historical data
│ │ └── api/ # REST/GraphQL endpoints for stream stats
│
└── docs/ # Technical specs and Wave assets
contracts/— The source of truth. All stream logic, balance calculations, and fund custody live here, on-chain. Nothing in the frontend or backend can override what this layer enforces.frontend/— Where users actually watch their money move. The dashboard renders live, "ticking" balances so senders and receivers can see funds unlock in real time, plus tools to create, manage, and cancel streams via a connected Freighter wallet.backend/— A read-only analytics and indexing layer. It listens to on-chain events and mirrors them into a queryable database, powering historical charts, notifications, and stats — without ever holding custody of funds itself.
We follow an Issue-Oriented workflow: browse open issues, assign yourself before starting work, and open a PR that references the issue it resolves. This keeps effort from being duplicated and makes review easier.
- Focus: State management, security, and gas optimization.
- Setup: Requires
rustupandsoroban-cli. - Rule: No logic changes without a corresponding test update. Run
cargo testbefore submitting a PR.
- Focus: UX/UI, real-time data visualization, and wallet connectivity.
- Setup:
npm installinside the directory. - Rule: Components must be responsive. Use
framer-motionfor the ticking number animations.
- Focus: Indexing performance, data persistence, and API reliability.
- Setup: Docker Compose is provided for local DB setup.
- Rule: The indexer must be idempotent and capable of handling ledger rollbacks.
1. Clone the repository
git clone https://github.com/your-username/stellar-stream.git
cd stellar-stream2. Build the smart contracts
cd contracts
soroban contract build3. Run the frontend dashboard
cd ../frontend
npm install
npm run dev4. (Optional) Spin up the backend indexer
cd ../backend
docker-compose upBuilt for the Drips Stellar Wave. Pushing the boundaries of real-time finance. 🌊