Decentralized Savings Platform on Stellar
Stow is a decentralized savings protocol built on Stellar using Soroban smart contracts. It enables individuals and communities to save transparently using stablecoins, with flexible, locked, goal-based, group, and group-split savings mechanisms enforced fully on-chain.
The project solves the problem of opaque, centralized savings platforms in emerging markets by providing a non-custodial, transparent alternative where users maintain full control of their funds and save in a dollar-denominated stablecoin (USDC) as a hedge against local-currency depreciation. Stow is designed for developers, contributors, and financial communities interested in building open, composable savings infrastructure using low-fee, fast-finality blockchain primitives.
- Non-custodial savings via Soroban smart contracts β funds move only under contract rules you can read
- Flexible savings β deposit and withdraw any time
- Locked savings with deterministic, on-chain withdrawal rules
- Goal-based savings with automated milestones
- Group savings pools with shared rules and payouts enforced by the contract, not an organizer
- Group split savings β a group saves into a shared pool and the balance is split back among members by their agreed shares, calculated and settled on-chain
- Dollar-denominated by default β save in USDC, cash in and out in local currency via Stellar anchors
- Passwordless onboarding with passkey smart wallets and sponsored fees
- Web interface for seamless contract interaction
- Detailed savings product reference:
SAVINGS_PRODUCT_REFERENCE.md
Stow is built so mainstream users never have to touch crypto mechanics:
- Passkey smart wallets β accounts are Soroban smart contracts signed with device biometrics (WebAuthn / secp256r1). No seed phrases. Integrate with
passkey-kitor an OpenZeppelin smart-account SDK. - Sponsored (gasless) fees β a relayer pays transaction fees so users don't need XLM to make their first deposit.
- Social recovery (optional) β recovery signers so a lost device doesn't mean lost savings (disclosed as a trust trade-off).
- Local-currency ramps β via the SDF Anchor Platform using SEP-24 / SEP-6 for hosted deposit and withdrawal, and SEP-38 for quoted local-currency β USDC conversion. Anchors also handle KYC at the fiat boundary, keeping the protocol layer permissionless.
-
Frontend (
apps/web)
Next.js application for interacting with Stow smart contracts. Provides a user interface for creating savings accounts, depositing funds, tracking progress, and onboarding via passkey smart wallets. -
Backend (
apps/api)
Node.js API for off-chain services such as indexing contract events, sending notifications, managing user metadata, aggregating analytics, and orchestrating anchor on/off-ramps. -
Smart Contracts (
contracts/)
Soroban smart contracts written in Rust that manage all savings logic, fund custody, group rounds, and withdrawal rules. Yield integration lives behind a swappable adapter so the custody core can be audited independently.
contracts/
βββ vault/ # Solo savings: flexible, locked, goal. Holds USDC. No yield logic.
βββ group_pool/ # Group savings & split pools: contributions, payouts, share splits, default handling.
βββ yield_adapter/ # OPTIONAL, opt-in. Routes idle balances to an external yield source (swappable).
βββ registry/ # Factory + directory of pools/vaults. Emits events for the indexer.
βββ fee_collector/ # Transparent, on-chain protocol fees.
βββ policy/ # Reusable auth rules (limits, timelocks) shared with the smart-wallet layer.
/
βββ apps/
β βββ web/ # Next.js frontend
β βββ api/ # Node.js backend API
βββ contracts/ # Soroban smart contracts (Rust)
βββ packages/ # Shared utilities and types
βββ scripts/ # Deployment and automation scripts
βββ tests/ # Integration and E2E tests
βββ README.md
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher) - Download
- npm or yarn - Comes with Node.js
- Rust (stable toolchain) - Install
- Soroban CLI - Instructions below
- Stellar testnet account - We'll create this in setup
- Clone the repository
- Set up smart contracts
- Set up backend API
- Set up frontend
- Run tests
git clone https://github.com/your-org/stow.git
cd stowcargo install --locked stellar-cli --features optOr use the install script:
curl -fsSL https://github.com/stellar/stellar-cli/raw/main/install.sh | shVerify installation:
stellar --versionstellar network add --global testnet \
--rpc-url https://soroban-testnet.stellar.org:443 \
--network-passphrase "Test SDF Network ; September 2015"stellar keys generate --global alice --network testnetGet your address:
stellar keys address aliceFund your account using Friendbot:
curl "https://friendbot.stellar.org?addr=$(stellar keys address alice)"Verify balance:
stellar account balance --id alice --network testnetcd contracts
cargo build --target wasm32-unknown-unknown --releasestellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/stow_contract.wasm \
--source alice \
--network testnetSave the contract ID output - you'll need it for frontend and backend setup.
stellar contract invoke \
--id YOUR_CONTRACT_ID \
--source alice \
--network testnet \
-- initialize \
--admin $(stellar keys address alice)Note: The admin role's powers are limited and documented in the Trust & Security Model above. It cannot move user principal.
cd apps/api
npm installCreate .env in apps/api/:
PORT=3001
NODE_ENV=development
# Stellar Network
STELLAR_NETWORK=testnet
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
HORIZON_URL=https://horizon-testnet.stellar.org
# Contract
CONTRACT_ID=YOUR_DEPLOYED_CONTRACT_ID
# Anchor / on-ramp (SEP-24 hosted deposit/withdraw)
ANCHOR_HOME_DOMAIN=your-anchor-domain
ANCHOR_ASSET_CODE=USDC
# Database (if using)
DATABASE_URL=postgresql://user:password@localhost:5432/stow
# Optional
REDIS_URL=redis://localhost:6379npm run migratenpm run devBackend should now be running at http://localhost:3001
curl http://localhost:3001/healthcd apps/web
npm installCreate .env.local in apps/web/:
# Stellar Network
NEXT_PUBLIC_STELLAR_NETWORK=testnet
NEXT_PUBLIC_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
NEXT_PUBLIC_HORIZON_URL=https://horizon-testnet.stellar.org
# Contract
NEXT_PUBLIC_CONTRACT_ID=YOUR_DEPLOYED_CONTRACT_ID
# Backend API
NEXT_PUBLIC_API_URL=http://localhost:3001
# Passkey smart wallet (optional, for passwordless onboarding)
NEXT_PUBLIC_PASSKEY_RELAYER_URL=your_relayer_urlnpm run devFrontend should now be running at http://localhost:3000
npm run build
npm startcd contracts
cargo testcd apps/api
npm testRun with coverage:
npm run test:coveragecd apps/web
npm testRun E2E tests (requires running backend and deployed contracts):
npm run test:e2eFrom project root:
npm run test:integration- Network Passphrase:
Test SDF Network ; September 2015 - RPC URL:
https://soroban-testnet.stellar.org:443 - Horizon URL:
https://horizon-testnet.stellar.org - Friendbot:
https://friendbot.stellar.org
- Main Savings Contract:
CXXXXXX...(Update after deployment) - USDC Token:
CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA
Stow's fees are transparent and on-chain:
- Performance fee on Tier-1 yield - a small percentage of yield earned only, never of principal. Stow earns only when users do.
- Optional pool-creation / per-round fee for group savings.
No token is required to use Stow. Any future governance mechanism would be introduced only after real usage exists.
Error: insufficient balance
Solution: Fund your account using Friendbot:
curl "https://friendbot.stellar.org?addr=$(stellar keys address alice)"Error: Failed to connect wallet
Solution:
- Ensure you have a supported wallet installed (Freighter or a passkey smart wallet)
- Switch wallet to Testnet network
- Check that
NEXT_PUBLIC_STELLAR_NETWORK=testnetin.env.local
Error: RPC connection timeout
Solution:
- Verify RPC URL is correct in
.env - Check Stellar testnet status: https://status.stellar.org
- Try alternative RPC:
https://soroban-testnet.stellar.org:443
Error: wasm32-unknown-unknown target not found
Solution: Add wasm target:
rustup target add wasm32-unknown-unknownError: Network connection error
Solution: Ensure contracts are deployed and environment variables are set correctly in test config.
- Stellar Documentation: developers.stellar.org
- Soroban Docs: developers.stellar.org/docs/build/smart-contracts
- Anchors & On/Off-Ramps: developers.stellar.org/docs/learn/fundamentals/anchors
- Passkey Smart Wallets: github.com/stellar/passkey-kit
- Soroban Examples: github.com/stellar/soroban-examples
See our detailed CONTRIBUTING.md for coding standards (Rust/Soroban, TypeScript), Git workflow, naming conventions, and full PR process.
- Additional anchors & cash on/off-ramps
- More yield venues behind the adapter
- Mobile app (Flutter)
- Progressive decentralization (timelock β community input)
- Cross-chain savings
- Advanced analytics dashboard
This project is licensed under the MIT License - see the LICENSE file for details.