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.
=== Built from scratch during the 0G APAC Hackathon ===
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.
Smart Contract Layer
- Designed and deployed three production contracts to 0G mainnet:
- Escrow.sol — core trustless escrow protocol with atomic create+fund pattern
- NettingSettlement.sol — batch settlement contract that executes netted transfers in a single transaction via in-contract loop
- RiveUSD.sol — ERC20 demo token (18 decimals) with permissionless capped minting for judge self-serve testing
- Used Foundry for testing and deployment; OpenZeppelin SafeERC20 and ReentrancyGuard for production-grade security
- All three contracts verified on 0G Explorer with readable source code
Backend (Go, Clean Architecture)
- Implemented double-entry bookkeeping engine with invariant tests enforcing sum(debits) == sum(credits) per transaction — the project's core moat
- Built netting engine with 60-second settlement windows
- Integrated 0G Storage SDK for persisting Work Order specs, per-event escrow journal entries, and netting batch manifests
- Designed REST API with clean separation of concerns (domain → usecase → repository → delivery layers)
- PostgreSQL ledger with referential integrity between on-chain events and journal entries
Event Pipeline
- QuickNode webhooks for reliable on-chain event delivery (OrderCreated, OrderReleased, OrderRefunded)
- State reconciliation logic to handle webhook retries idempotently
- Per-event journal entry generation triggered automatically on webhook receipt
Frontend (Next.js + Tailwind)
- Landing page at riveprotocol.tech communicating positioning to developers and judges
- 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).
Key Architectural Decisions
- 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.
- 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.
- Atomic create+fund: createOrder() locks funds in the same transaction as order creation — eliminates entire class of "zombie order" bugs.
Demonstrated Results
- End-to-end work order flow: spec upload → escrow lock → delivery → release, with cryptographic proof at every step
- Netting demo: 20 payment intents from 5 agents → 5 net positions → 1 batch transaction on-chain. 95% reduction in transaction count.
- Live P&L generation with cryptographically verifiable audit trail linking every line item to 0G Storage anchors
Current Status: Self-funded, solo builder.
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.
Plan forward:
- 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)
- Open to 0G ecosystem support (grants, technical mentorship, integration opportunities) where it accelerates the protocol's roadmap
- 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
Contact: harundarat@gmail.com