Synapse.
Synapse is a financial infrastructure protocol and SDK engineered for the autonomous agent economy. Combining high-performance Rust services (Actix-web, SQLx) with Yellow Network's Nitrolite state channel protocol and Polygon Amoy smart contract custody, Synapse enables machines and users to stream gasless, sub-cent micropayments in real time—enabling pay-as-you-go AI model inference (e.g., 0.001 USDC per 100 generated tokens) without blockchain latency or transaction fees.
- Role
- Protocol & Backend Engineer
- Domain
- State channels · Machine-to-Machine (M2M) payments · Yellow Network Nitrolite · AI inference streaming · Polygon Amoy
System at a glance
What the system does
Gasless off-chain state channel streaming
Yellow Network Nitrolite SDK integration
Real-time pay-per-token LLM inference
High-throughput Actix Web & SQLx gateway
Architecture flow
From intent to verified state.
- 01
A user or AI agent deposits funds into a Nitrolite smart contract custody on Polygon Amoy to open a state channel.
- 02
During inference, the client signs off-chain cryptographic micro-payment commitments per token chunk.
- 03
The Synapse Rust gateway validates each cryptographic state channel signature in milliseconds via Yellow Network nodes.
- 04
Upon payment verification, the gateway streams LLM tokens generated by Ollama in real time back to the client.
- 05
Channel balances settle off-chain with zero gas fees, requiring on-chain reconciliation only when closing the channel.
01 / State channel mechanics
Zero-gas, millisecond micropayments for machine communication
High-frequency financial settlement operating at the speed of data streaming.
Yellow Network Nitrolite protocol
Employs state channels to bypass blockchain block times and gas fees, allowing micro-transactions to settle at internet latency.
Off-chain cryptographic signing
Each micro-payment is an off-chain cryptographic state update signed by the client, eliminating transaction costs for sub-cent transfers.
Solvency and dispute protection
Balances remain secured by on-chain custody on Polygon Amoy, with deterministic dispute windows guaranteeing fund safety.
02 / Machine-to-machine economy
Financial sockets for autonomous software agents
Empowering AI agents to transact autonomously without human or credit card bottlenecks.
Pay-per-token inference
Demonstrates real-time AI inference where users stream fractions of a cent as text renders, paying only for the exact compute consumed.
Agent-to-agent resource trading
Provides a lightweight SDK enabling autonomous agents to purchase data, search APIs, and compute from other agents dynamically.
Eradicating subscription friction
Replaces rigid monthly SaaS subscriptions and credit card barriers with granular pay-as-you-go financial sockets.
03 / Gateway architecture
High-concurrency Rust and PostgreSQL pipeline
A resilient backend coordinating state updates, model generation, and ledger durability.
Actix Web streaming server
Manages concurrent client WebSocket and HTTP sessions, coordinating inference streams and payment checks without thread contention.
SQLx and PostgreSQL persistence
Records state transitions, channel events, and session histories with compile-time checked SQL queries and transactional durability.
Local AI model integration
Integrates with local Ollama runtimes (e.g., Gemma, Llama) to stream tokens with minimal latency overhead.
04 / On-chain custody
Trust-minimized settlement on Polygon Amoy
Smart contract custody enforcing fair exchange and capital protection.
Smart contract channel custody
Escrows collateral tokens safely in audited Nitrolite contracts on Polygon Amoy, enabling predictable deposits and withdrawals.
Multi-token payment support
Designed around flexible ERC-20 token interfaces allowing payment streaming in stablecoins (USDC) or custom protocol assets.
Graceful channel closure
Enables cooperative mutual closure with instantaneous payout settlement, or unilateral closure with provable timeout states.