Inspiration

3 years ago I was running a Stablecoin PoS startup for small restaurants at my school, the University of Virginia. The value was immediately clear to the mom & pop shops we partnered with: 0% transaction fees & immediate cashflow. However we, as many other blockchain/web3 startups, faced the "cold-start" problem. Onramping and offramping(or in other words converting between crypto & fiat) was cumbersome, expensive, and at the time required SSN's to comply with government regulations.

Last week I discovered https://www.peer.xyz/, a protocol for fully peer-to-peer offramping/onramping powered by zktls. On Friday 2/13 I dm'd the team on X/Twitter about my idea to leverage this for agentic payments and got API access to leverage them as the Agent402 settlement layer. Today, Agent402 lets any AI agent developer monetize with the x402 standard, and most importantly bridges the gap between fiat & crypto rails to bring seamless agentic commerce to the masses.

What it does

Imagine your an AI Agent developer monetizing with x402(https://www.x402.org/) to accept internet money(stablecoins) at internet speed, x402 lets other humans & agents pay your agent seamlessly, but when it comes to paying YOU its quite the opposite

You'd need to send funds from your agents crypto wallet to a CEX(Centralized Exchange) like Coinbase, once there your funds are locked from withdrawing to your bank account for 4-7 days

With Agent402, our platform IS your agents wallet no extra transfers necessary. The best part, you are able to withdraw to your bank account in just minutes thanks to our integration with Peer. Even better, onramping is much cheaper, you can onramp as little as a dollar, and it settles instantly(unlike Coinbase).

Agent402 is a non-custodial platform for AI agent developers that abstracts away all of the complexities of crypto(smart contracts, token standards, delegation, onramp/offramp, gas fees - we sponsor those seamlessly) and provides an API standard to integrate us with your x402 stack in just one line of code.

How we built it

Agent402 was built with a React + Typescript frontend with Cloudflare workers backend via the Hono framework and Supabase for PostgreSQL DB persistence, all running on the Base L2 Blockchain with the USDC stablecoin. For non-custodial wallets, we integrated Privy's embedded wallets -- users sign in with an email, get a wallet automatically, and all transactions are gas-sponsored so they never touch ETH. The offramp & onramp are powered by zkp2p's Peer protocol as our settlement layer.

Challenges we ran into

Too many to list but if I had to name a few...

Our wallet Provider(Privy) deprecated JWT's to allow for server wallet signing so we had to architect a way to have the wallet keys client-side in a still secure & non-custodial manner.

Our indexers to pull the blockchain data relevant to our offramp/onramp flow lag behind, so we implemented "optimistic state changes" which would get either confirmed or fixed when the indexer catches up.

Since our platform is "web2 in the front, web3 in the back" it was too much friction to force users to somehow acquire the blockchains native gas token, so we implemented custom transaction routing and paymaster which covers gas so users only need to think about the stablecoin cryptoasset not ETH.

Accomplishments that we're proud of

This Hackathon served as the accelerant to take this weekend idea from 0-1, and in just two days we've been able to build a real public beta with real developer interest in using it

What we learned

Ship fast, action always resulted in more information than inaction. Also the unique environment of a hackathon definitely teaches you how to prioritize given the time-bounded constraint.

What's next for Agent402

Hackfax incubated our beta! Now we get our product in the hands of x402 AI agent developers as early testers, and do outreach to prominent AI agent companies who happen to not have an x402 integration yet.

Built With

Share this project:

Updates