Inspiration
In college I kept seeing the same thing: for every party, formal or concert, the group chats filled up with people asking for tickets. "Anyone selling one for Saturday?" "Need two for the formal, will pay." The demand was right there, out loud, and it had nowhere to go. It got buried under the next message, and the sellers who might have helped never saw it.
That made me realize most marketplaces are built one way. On Amazon, eBay or StubHub, sellers list and buyers browse. There's no real place to say "this is what I want, at this price" and let the person who has it come to you. For student tickets, where demand often shows up before supply does, that missing half of the market is most of the market.
So we built SellWant as a two-sided marketplace: you can post a ticket you're selling or a ticket you want, and every offer is public. But posting was only half the problem. Every sale between strangers is still a standoff. Pay first and the seller can stop answering. Hand the ticket over first and the buyer can walk away. Most student tickets are static QR codes that can't be transferred, so the two people have to meet and scan in together. The handoff is physical, so nothing digital can prove it happened, except the two people who were there.
What we were missing was a way to agree on a price without endless back-and-forth, and a way to pay that neither side has to trust. That's what we built for this hackathon.
What it does
- You approve the terms. An AI drafts a mandate from what you say you want. You review the exact price limit, the expiry and the number of negotiation rounds, and you approve it. The agent can't.
- Agents negotiate in public. A background watcher posts offers and counters on the public offer board, each with its reasoning, always inside both people's approved limits.
- One deal locks. The database locks exactly one deal at the agreed price.
- PayPal holds the money. The buyer approves checkout in PayPal. The backend authorizes the payment and verifies the hold belongs to this deal, this exact amount and this seller.
- Both confirm, then capture. Approving checkout isn't delivery. Each person separately confirms the in-person handoff, and only then does the backend capture. If the deal is cancelled, the authorization is voided and the listing reopens.
A deal can only lock at a price $p$ that both mandates allow:
$$ s_{\min} \;\le\; p \;\le\; b_{\max} $$
where $s_{\min}$ is the seller's approved minimum and $b_{\max}$ the buyer's approved maximum, both in integer cents. If $s_{\min} > b_{\max}$, no deal is possible and the agents stop when their rounds run out.
The agent can draft, read public listings, counter and accept. It can never approve its own terms, raise a limit, approve the PayPal checkout, confirm the handoff, or see contacts, completed prices or ticket QR codes.
How we built it
- Mandates and scoped agent access (PostgreSQL / Supabase). Immutable, human-approved limits; hashed, scoped, revocable agent tokens. Every limit, expiry, round and role is checked inside the trading transaction, so a confused or hijacked agent is refused rather than trusted.
- AI negotiator. OpenAI Responses API with JSON-schema structured outputs produces both the mandate draft for human review and each negotiation move with its reasoning. Marketplace text is treated as untrusted input. A durable, leased watcher runs on a Cloudflare cron, keeps negotiating after the browser closes, and resumes after a restart without repeating an action.
- Product MCP server inside the Cloudflare Worker. MCP clients discover public active offers and counter or accept within their token's scope.
- PayPal. Orders v2 with
intent: AUTHORIZE, then authorize; Payments v2 capture and void on the authorization. Amounts are integer cents end to end. Every call carries a persistedPayPal-Request-Id; capture and cancel are serialized; an unknown provider outcome stays locked until it is reconciled instead of being retried blind. Money moves buyer to seller; SellWant never holds funds. - On top of the existing marketplace: Expo / React Native web, Supabase with row-level security, a Cloudflare Worker. The hackathon demo runs as its own Worker and database, so the live site is never touched.
Challenges we ran into
- Keeping "approved", "authorized", "handed over" and "captured" as four different facts. A checkout return proves nothing about delivery, so each is its own state with its own evidence.
- Recovering the database contract first. Most of the existing schema lived in the hosted dashboard, not in migrations. We reconstructed it in an isolated stack and verified it against production before changing any core function.
- Races. We reproduced a capability expiring while a trade waited on a row lock. The guarded action created no offer and consumed no round.
- The edge runtime is not Node. Two bugs passed every offline test and only appeared on Cloudflare:
fetch(..., { redirect: 'error' })throws on Workers, and a Worker can't call its own custom domain. Both were fixed by serving discovery in process and treating any redirect as a failure. - Security before the demo. Two audit passes found and closed holes in the existing marketplace (anonymous calls to trading functions, author-controlled fields that could break other users' pages) before we turned the new features on.
Accomplishments that we're proud of
- 305 offline tests; 129 payment and watcher checks against real Postgres, REST and concurrent races; MCP tested through a real Worker.
- A hosted demo where a real model drafts mandates and PayPal sandbox orders are created, authorized and voided through the same guarded ledger.
What we learned
An agent is only as trustworthy as the narrowest thing it is allowed to do. The useful design wasn't a smarter model. It was moving every limit into the database transaction and keeping every money-moving and delivery-confirming step with a person.
What's next
Deadlines that release a hold automatically, notifications when the other side acts (the email outbox already exists), and moving from sandbox to live PayPal merchant onboarding for sellers.
New vs. existing work
SellWant's marketplace (listings, public offers, deals) existed before October 1, 2026. New during the submission period: human-approved mandates and scoped agent access, the AI negotiator and durable watcher, the product MCP server, the full PayPal authorize, handoff, capture and void integration with its ledger and reconciliation, and the isolated hosted demo.
Built With
- bun
- cloudflare-workers
- expo.io
- javascript
- model-context-protocol
- openai
- openai-responses-api
- paypal
- paypal-orders-api
- paypal-payments-api
- paypal-sandbox
- postgresql
- react-native
- row-level-security
- supabase
- typescript
- wrangler
- zod