Search projects, hackathons, sponsors and tech

    ← All projects

    fly402

    An autonomous travel agent that watches flight fares and holds your seat while you sleep

    Demo

    About

    **Web3 doesn't meet in one place.** ETHGlobal, Devconnect, Token2049, EthCC — a different country every time, and if you build here you're on a plane six times a year. Every trip goes the same way: you know weeks ahead, you book days ahead. Not because you forgot — watching a fare is a job, and you already have one. By the time you open that tab the good flights are gone: the direct one, the sane hour, the price you saw first. **You book when you're free, which is never when it's best.** ## What Fly402 does Describe the trip once — where, when, your budget, and how much the agent may commit for you. Then close the tab. The agent watches real fares. When one fits, it doesn't just tell you the good option exists — **it takes the seat off the market, then emails you.** You open the link whenever you get to it. The price is still there. The seat is still there. Confirm, or walk away. ## What we actually built A price hold today is free and therefore worthless, or it doesn't exist at all. Fly402 makes it a real product: **an option on a seat**, with a price and a lifecycle. One payment, two kinds of money. A small fee buys the time and is gone — that's what the seller earns for pulling inventory. The ticket money goes into an escrow contract instead of the seller's pocket, and leaves by exactly one of three doors: you book and it pays for the seat, you pass and it comes back, you forget and it comes back anyway. "We'll refund you" is a promise; a contract isn't. Once the hold expires, anyone can trigger the refund — the seller doesn't have to cooperate, or even be online. No owner, no pause button, nobody who can change the rules once your money is in. That's why a traveller will pay for a hold, and why a seller can finally charge for one. Fly402 is **an agent with its own wallet and a spending limit you set once.** It pays for each search as it goes, and your money sits in a contract — the seller can't take it, and neither can the agent. The same pattern fits anything that sells out before you're ready to decide: hotels, conference tickets, limited drops.

    How it's made

    Fly402 is a React frontend, an Express 5 TypeScript seller, and a Solidity escrow on Hedera testnet. Two endpoints are x402-gated: `POST /holds` and `POST /booking`, priced in HBAR and quoted in tinybars under the `exact` scheme on `hedera:testnet`. The seller registers `ExactHederaScheme`on an `x402ResourceServer` pointed at the Blocky402 facilitator, so calling either endpoint without paying gets you a real `402` back. The buyer is an agent running in the browser. It holds an ECDSA Hedera key, and `wrapFetchWithPayment` does the rest — 402 → sign → retry, all inside one ordinary `fetch`. Booking a flight is a single function call. The payment is the transport. The fun part is what a seat hold actually is. It's an option on a seat, so one atomic x402 payment has to become two different kinds of money: a fee the seller keeps, and a deposit it is only holding. The seller splits them on arrival and forwards the deposit into `HoldEscrow.sol` with a `ContractExecuteTransaction`, keyed by a SHA-256 of the hold id so off-chain ids stay opaque on-chain. - **The escrow has no owner.** No pause, no upgrade, no admin key. `settle()` works only for the payer, and only before expiry. After expiry, `refund()` is open to anyone — a seller that disappears can't strand a traveller's deposit. - **TVL is a chain read.** The dashboard calls the contract's `stats()` instead of counting locally, and every settlement and escrow call resolves to a real HashScan link. - **The agent can't overspend.** Auto-hold, max fee and max deposit are checked before a 402 is ever answered, so it runs unattended inside limits the traveller set once. - **Real fares, not fixtures.** Live Google Flights data via server-side SerpApi, cached 12h and served stale if the upstream dies. Match emails go out through Resend and deep-link straight back into the booking page.