CashETH gives AI agents working capital. When an agent sells work to another agent on credit, it holds an unpaid invoice but no cash to pay for the APIs, data and compute it needs to deliver. CashETH lets that agent borrow USDC against the invoice, spend it on paid APIs under strict limits, and repay automatically when the customer pays. Lenders earn yield on idle capital and are always paid back first.
How it works, step by step:
- A seller agent uploads an invoice through our MCP server. The file's hash becomes part of the receivable, so the terms cannot be changed later.
- The buyer agent confirms it owes the money by signing an EIP-712 message. The payee in that message is our repayment contract, not the seller, so the buyer's payment can never skip the lenders.
- CashETH checks both agents' identity levels (KYA), rejects duplicates and self-dealing, and computes a deterministic credit score from the seller's on-chain repayment record.
- The receivable is registered on Hedera as "Confirmed", an NFT is minted for it, and every step is written to a Hedera Consensus Service audit topic.
- Lenders keep USDC in their own wallets and publish strategies that say which risk levels they fund (low, medium or high) and, optionally, which sellers.
- One transaction funds the receivable: our custom instruction checks the receivable on-chain during every fill and prices the loan from the seller's score (6% to 14% APR). No lender, server or solver can charge a different rate.
- Worker agents spend the credit on paid APIs using x402. Each worker pays from a 2-of-2 wallet that only moves money when our policy co-signer agrees the payment matches an approved budget, merchant and amount. Overspending or paying an unknown merchant is refused by both our engine and the contract.
- When the buyer pays, the repayment contract pays lenders their principal plus interest first and sends the rest to the seller.
What we built:
- Smart contracts on Hedera testnet: an agent identity registry, a receivable registry, a credit facility with budgets and spend reservations, a repayment router, and scheduled overdue and default checks using the Hedera Schedule Service.
- A redeployed 1inch Aqua registry and a modified SwapVM router with a new opcode, ReceivableCredit, that only fills against confirmed receivables. The same lender balance also earns trading fees in a constant-product strategy while it waits, so lenders see what lending adds on top of plain yield farming.
- An MCP server with 24 tools and OAuth 2.1 sign-in, where agents prove their identity with a signed token checked against the on-chain registry.
- Agents that drive the whole flow: scripted agents, a local LLM seller agent, and Claude Code acting as the seller through MCP, with a local wallet so the buyer signs its own transactions.
- Real x402 merchants, including paid price-feed, web-scrape and summary APIs on Google Cloud Run, settled in USDC on Hedera.
- A public dashboard and admin console showing every agent, loan, payment and lender return, each linked to its HashScan transaction.
Why it matters: invoice finance is a multi-trillion-dollar market for human businesses, yet agents that sell to each other have no one to lend to them. CashETH makes agent-to-agent commerce work on credit, with every rule enforced on-chain and every transaction verifiable on HashScan.
CashETH is a pnpm TypeScript monorepo plus a Foundry project, all running on Hedera testnet (EVM chain 296).
Stack
- Contracts: Solidity 0.8.30 with Foundry (unit, fuzz and invariant tests). KYARegistry (agent identity and repayment record), ReceivableRegistry (EIP-712 confirmations, one canonical id per invoice), CreditFacility (funding, budgets, spend reservations), RepaymentRouter (lenders-first waterfall), a Receivable Credit Note token, and RiskPricing, a pure library that turns a seller's record into a score, a risk slab and an APR.
- Off-chain: Node 22, viem and the Hiero (Hedera) SDK. Shared packages hold the policy engine (credit score, spend policy, co-signer rules), Hedera helpers (HCS, HTS, HCS-14, spend wallets, mirror node) and Aqua tooling (strategy builder, discovery from logs, solver).
- Services: an OAuth 2.1 authorization server, an MCP server with 24 tools plus a read API, and x402 merchants (our /research endpoint, and price-feed, scrape and summary APIs on Google Cloud Run built with Express and the official @x402/express and @x402/hedera packages).
- Agents: scripted agents, a