Inspiration
In Nairobi informal settlements (Mathare, Kibera, Mukuru), clean water from community kiosks costs roughly KES 0.15 per litre (~$0.00115 USD). A base Solana transaction fee (~0.000005 SOL) costs as much as a single litre of water, and intermittent cellular connectivity breaks cloud-dependent prepaid systems.
What it does
Tiririka (Swahili: 'to flow, to trickle') uses Solana payment channels so water kiosks only pay two on-chain fees per full session while streaming micropayments off-chain:
- One on-chain escrow deposit: Customer locks a spending cap (e.g., 0.01 SOL) into a Solana Devnet PDA escrow.
- Off-chain Ed25519 vouchers: Every 0.1L drawn, the client signs a cumulative voucher (
TIRIRIKA_V1:<channelId>:<nonce>:<cumulativeLitres>:<cumulativeLamports>) verified locally in under 1 ms, even when internet drops. - Replay & solvency guards: The kiosk rejects stale nonces, non-monotonic amounts, or over-cap vouchers.
- One on-chain settlement: When the tap closes, the highest voucher settles to the operator and refunds unused lamports; a 24-hour timelock lets customers exit unilaterally if hardware goes offline.
How I built it
Built with Next.js 16, React 19, TypeScript, @solana/web3.js, tweetnacl for local Ed25519 verification, an Anchor v0.30 smart contract blueprint (contracts/tiririka), and 7 cryptographic verification unit tests.
Built With
- anchor
- ed25519
- nextjs
- react
- rust
- solana
- tailwindcss
- typescript