Stripe + QuickBooks for AI agents — trustless escrow, double-entry bookkeeping, and gas-efficient netting for autonomous agent-to-agent payments, with every transaction cryptographically auditable on-
Rive is payment and accounting infrastructure for the AI-to-AI economy. As autonomous agents increasingly transact with each other — paying for compute, data, and delegated tasks — current Web3 payment systems only handle simple token transfers. Three critical gaps remain: no accountability for work quality before funds move, no professional accounting for agents to track P&L or balance sheets, and prohibitive gas costs for high-frequency micropayments.
Rive solves these gaps with three integrated components:
1. Trustless Escrow Protocol — funds are locked until work is delivered and confirmed, eliminating the need to trust counterparty agents.
2. Double-Entry Bookkeeping Engine — every escrow and payment event auto-generates journal entries (Debit/Credit), enabling auditable P&L and Balance Sheet reports per agent. This is the moat: no other agent-payment project provides professional-grade accounting that's cryptographically verifiable.
3. Netting Engine — aggregates micropayments by computing net positions between agents, then batches all transfers into a single on-chain transaction. Demonstrated: 20 payment intents netted to 5 net positions, executed as 1 batch transaction (20 → 1, 95% reduction in transaction count). Massive gas savings for high-frequency agent-to-agent payments.
0G components used:
- 0G Chain — Escrow, NettingSettlement, and RiveUSD contracts deployed on 0G mainnet; netting batch settlements
- 0G Storage — Work Order specifications, per-event escrow journal entries, and netting batch manifests anchored for end-to-end audit trail
Live at riveprotocol.tech with a working demo dashboard showing P&L reports with on-chain audit trail verification.
<p>=== Built from scratch during the 0G APAC Hackathon ===</p><p>The entire Rive protocol — from architecture to mainnet deployment — was built during the hackathon period. Below is a summary of key milestones and engineering decisions.</p><p><strong>Smart Contract Layer</strong></p><p>- Designed and deployed three production contracts to 0G mainnet:</p><p>- Escrow.sol — core trustless escrow protocol with atomic create+fund pattern</p><p>- NettingSettlement.sol — batch settlement contract that executes netted transfers in a single transaction via in-contract loop</p><p>- RiveUSD.sol — ERC20 demo token (18 decimals) with permissionless capped minting for judge self-serve testing</p><p>- Used Foundry for testing and deployment; OpenZeppelin SafeERC20 and ReentrancyGuard for production-grade security</p><p>- All three contracts verified on 0G Explorer with readable source code</p><p><strong>Backend (Go, Clean Architecture)</strong></p><p>- Implemented double-entry bookkeeping engine with invariant tests enforcing sum(debits) == sum(credits) per transaction — the project's core moat</p><p>- Built netting engine with 60-second settlement windows</p><p>- Integrated 0G Storage SDK for persisting Work Order specs, per-event escrow journal entries, and netting batch manifests</p><p>- Designed REST API with clean separation of concerns (domain → usecase → repository → delivery layers)</p><p>- PostgreSQL ledger with referential integrity between on-chain events and journal entries</p><p><strong>Event Pipeline</strong></p><p>- QuickNode webhooks for reliable on-chain event delivery (OrderCreated, OrderReleased, OrderRefunded)</p><p>- State reconciliation logic to handle webhook retries idempotently</p><p>- Per-event journal entry generation triggered automatically on webhook receipt</p><p><strong>Frontend (Next.js + Tailwind)</strong></p><p>- Landing page at <a href="http://riveprotocol.tech">riveprotocol.tech</a> communicating positioning to developers and judges</p><p>- Functional MVP dashboard scoped for demo purposes: agent address input → renders P&L report from live API, work order history, and audit trail viewer with direct links to 0G Storage anchors. The dashboard is intentionally early-stage and prioritized for demo verification; significant UX polish and analytics features are planned post-hackathon (V2 roadmap).</p><p><strong>Key Architectural Decisions</strong></p><p>- Trust model: backend never holds private keys or signs escrow transactions. Because Rive serves AI-to-AI transactions, agents sign their own escrow txs directly with their wallet keys — no meta-transaction or relayer abstraction required. Backend acts only as webhook handler, helper service, and read layer.</p><p>- Audit trail strategy: escrow journal entries anchored per-event to 0G Storage; netting journal entries anchored per-batch via manifest. Each anchoring strategy matches its natural operation boundary.</p><p>- Atomic create+fund: createOrder() locks funds in the same transaction as order creation — eliminates entire class of "zombie order" bugs.</p><p><strong>Demonstrated Results</strong></p><p>- End-to-end work order flow: spec upload → escrow lock → delivery → release, with cryptographic proof at every step</p><p>- Netting demo: 20 payment intents from 5 agents → 5 net positions → 1 batch transaction on-chain. 95% reduction in transaction count.</p><p>- Live P&L generation with cryptographically verifiable audit trail linking every line item to 0G Storage anchors</p>
<p><strong>Current Status:</strong> Self-funded, solo builder.</p><p>Rive is currently bootstrapped. I'm building this independently because I believe AI-to-AI payment infrastructure is a genuine problem worth solving, and the engineering work needed in the near term doesn't require external capital — it requires focused execution.</p><p><strong>Plan forward:</strong></p><p>- Continue development self-funded; hackathon prize (if awarded) will go directly toward continued development — extending the contract suite, hardening the dashboard, and expanding 0G integration depth (including 0G Compute for V2 work verification)</p><p>- Open to 0G ecosystem support (grants, technical mentorship, integration opportunities) where it accelerates the protocol's roadmap</p><p>- Investor conversations are not a priority at this stage — happy to talk if there's strong alignment, but the focus right now is shipping, not fundraising</p><p><strong>Contact:</strong> harundarat@gmail.com</p>