Inspiration

Managing Bitcoin-linked income manually is fragmented — people end up either spending everything or forgetting to save or invest. Traditional finance has payroll splits and auto-invest rules, but nothing like that exists natively for Bitcoin-layer income. We wanted to bring programmable money allocation to the Stacks ecosystem so anyone earning sBTC or USDCx can put their income on autopilot.

What it does

SatsStream is a smart allocation layer for Bitcoin-native income streams built on the Stacks blockchain. Every time a deposit arrives, a Clarity smart contract automatically routes it into three user-defined buckets:

  • Safe Savings — liquid and stable reserves
  • Growth — simulated yield strategies for long-term compounding
  • Instant Spending — immediately accessible funds

Users configure their percentage split once using the strategy builder UI, and every future deposit is allocated accordingly — no manual intervention needed. Strategies are shareable via a unique link, enabling DAOs or teams to adopt the same allocation ruleset.

How we built it

  • Smart Contracts (Clarity on Stacks): A core Router contract handles strategy configuration, payer allowlisting, deposits, and withdrawals. Three pluggable strategy modules (simple-yield-module, stable-module, growth-module) implement a shared trait, making the architecture composable and extensible.
  • Frontend (React + Vite + stacks.js): A browser app with wallet connect (Leather/Xverse), a drag-and-drop strategy builder with sliders, a live dashboard reading on-chain state via read-only contract calls, deposit/withdraw flows, and a shareable strategy page.
  • Indexer (Express.js): An optional free API service that indexes contract events for faster history queries.
  • CI/CD: GitHub Actions auto-builds and deploys the frontend to GitHub Pages on every push to main — zero cloud cost.
  • No localStorage policy: The app intentionally disables browser persistence; all state is read live from the chain.

Challenges we ran into

  • Clarity's strict type system required careful design of the strategy module trait to ensure all modules were composable without runtime surprises.
  • Keeping the frontend stateless (no localStorage) while maintaining a snappy UX required leaning heavily on Stacks read-only contract calls and optimizing query patterns.
  • Designing a shareable strategy URL that encodes allocation rules without a backend database.

Accomplishments that we're proud of

  • A fully on-chain allocation engine with pluggable strategy modules — extensible to real DeFi protocols with no frontend changes.
  • Zero-cost deployment pipeline using GitHub Actions + Pages.
  • Clean, non-technical UX (bucket language + sliders) that abstracts contract complexity away from end users.
  • A reusable primitive applicable to payroll automation, DAO treasury management, and recurring income routing.

What we learned

  • How to structure composable Clarity contracts using traits and module patterns.
  • The power of Stacks' read-only calls for building stateless frontends backed entirely by on-chain truth.
  • How to design for extensibility: adding a new strategy module requires no changes to the core router.

What's next for SatsStream

  • Integration with real Stacks DeFi protocols (e.g., ALEX, Arkadiko) for live yield on the Growth bucket.
  • sBTC support for native Bitcoin settlement.
  • DAO treasury tooling — multi-sig strategy approval flows.
  • Mobile-friendly UI and push notifications on deposit events.
  • A public strategy marketplace where users can browse and fork community allocation templates.
Share this project:

Updates