r/ethdev • • 3h ago

My Project We paid 25,011 x402 API calls on Base with our own USDC and recorded what came back. 6.3% settled and failed the buyer. Data with transaction hashes.

2 Upvotes

x402 is the HTTP 402 flow: request, 402 with a USDC price, sign an EIP-3009 transfer, retry, facilitator settles. Nothing in it tells the buyer whether the seller will deliver or charge the listed price, so since October we have been the paying customer of every seller we could find in the Coinbase Bazaar.

Numbers as of today (live):

  • 25,011 paid calls to 1,036 sellers, about 135 USDC in total
  • 1,587 failed the buyer: 6.3%, 95% Wilson interval 6.0% to 6.7%
  • 1,080 of those settled on-chain, then returned 4xx/5xx, an empty or wrong-typed body, or nothing within the seller's own declared timeout
  • 507 quoted a price above the one the seller lists in the Bazaar; the official client has no expected price to compare with, so it paid every one; 428 were at 2x or more
  • Of 312 sellers with at least 30 paid calls, 228 have never failed one; 27 are rated avoid
  • The top 20 sellers by 30-day on-chain inflow fail at 10.3% [9.5%, 11.1%]; a random tail at 3.6% [3.1%, 4.0%]

The protocol finding: the exact scheme has no idempotency key. We sent one intent twice with fresh signatures to 10 sellers and 5 settled both. A plain retry after a dropped connection settled a second time at 5 of 10. Each new signature is a new payment, so a client that retries after a timeout or a paid 500 pays again unless it stores the nonce per intent and replays the stored result.

Method: u/x402/fetch 2.28, exact only, no retries, caps in code before any signature (0.50 USD a call, 20 a seller a day, 100 a day). Every settlement is matched to the AuthorizationUsed log for the nonce we signed. Wrong goods are unmeasured (no per-service schemas), so every rate is a lower bound. The sample is weighted to cheap calls; the dollar-weighted rate is 18.5% with an effective n of about 3,300, so treat it with care.

Harness, MIT: https://github.com/sarmadahsan/x402-audit Data, hourly, with hashes: https://github.com/sarmadahsan/paidfor-data Method and limitations: https://paidfor.dev/methodology

Disclosure: we run paidfor.dev, which publishes these as per-seller verdicts, and maintain two buyer-side clients on the official SDK. Sellers do not pay for ratings; every seller page has a reply route and one seller has already used it to get a correction published.


r/ethdev • • 13h ago

My Project Lasso RPC v0.9.0: routing around hung endpoints, head-aware reads, and standalone builds

1 Upvotes

[Lasso RPC](https://github.com/jaxernst/lasso-rpc) is an open source (Apache-2.0) smart proxy for aggregating EVM RPC providers. You drop in one Ethereum JSON-RPC URL with a programmable routing strategy in the path (`/rpc/fastest/ethereum`, `/rpc/load-balanced/ethereum`), and Lasso measures each provider from live traffic and routes between them.

The annoying part is that providers all fail differently with transient network issues, rate limits, and frequent latest-block lag. v0.9.0 ([release notes](https://github.com/jaxernst/lasso-rpc/releases/tag/v0.9.0)) closes a few of those gaps:

- **Hung or unstable endpoints leave rotation.** A hang isn't an error response, so a timeout didn't count against the endpoint and it kept getting traffic. Now a timeout triggers a health check, and two failed checks take it out.

- **`latest` reads always go to endpoints at the chain head.** This replaces the fixed `max_lag_blocks` setting and ensures latest blocks can be strictly monotonic (except for during reorgs). Lagging endpoints still serve historical reads.

- **Fast modes don't trust unproven endpoints.** `fastest` no longer sends traffic to failing endpoints that haven't proven themselves, and `balanced-fast` no longer locks a method onto whichever endpoint qualified first.

- **Standalone builds** for Linux (x86_64, aarch64) and macOS on Apple silicon. No Docker or Erlang needed: unpack, run `lasso/bin/lasso start`, and point your client at `http://localhost:4000/rpc/ethereum`.

Since my last post here (v0.6), Lasso also started learning provider limits from live traffic (v0.7) and pinning tx sends to providers you choose (v0.8).

**Where these fixes came from:** Bloom, an open source wallet, had a failover bug where it never reached a chain's third endpoint ([#527](https://github.com/bloom-directory/bloom/issues/527)). I built a harness that reproduces wallet failure cases like that one and posted the results on [their tracker](https://github.com/bloom-directory/bloom/issues/540). Run 1 exposed the hung endpoint problem. Run 2, on v0.9.0 meaningfully improved these results.

Still hard: a burst of txs to an endpoint that silently drops them can lose some before Lasso notices, and a lagging endpoint can serve stale reads between head checks (faster head checks are next).

I'll rerun this every release. If you've hit an RPC failure in prod that's worth testing, drop it here and I'll add it to the next run.