A Freeport mini-app demo — dispute resolution for P2P escrow
This is a Freeport mini-app. Open it inside Freeport (Settings →
Experimental → Mini-apps, add apps.freeport.network/arbitrator) to
draft escrows, open disputes and issue verdicts against your npub.
An arbitrator is a Nostr identity (npub) offering escrow dispute
resolution for Freeport trades. Happy path — buyer and seller both signal
completion — the arbitrator earns nothing. On a dispute the arbitrator
decides and earns 2% of the trade, capped at 20 USDT. The arbitrator's
npub accumulates normal Freeport karma: this page is just UI, the
reputation attaches to the operator's pubkey.
1 · Create escrow
2 · Open dispute
3 · Dashboard
Specimen escrow — no real funds are held. WebLN / Spark can't do a
real 2-of-3 multisig, so escrow here is modelled as
"the arbitrator holds the hold-invoice preimage": happy path both
parties signal completion → auto-release; dispute → the arbitrator settles
to the seller or refunds the buyer. This tab only mints a demo contract.
Your npub is prefilled from
window.nostr.getPublicKey(). The dispute fee shown
is 2% of the trade capped at 20 USDT — what the arbitrator would earn if
this deal went sour.
Stake the fee, attach encrypted evidence, and publish a signed
kind 32105 dispute event tagging the buyer, seller and
arbitrator. What's real here: the Nostr event, its signature, and
the evidence encryption. What's mocked: the escrow itself.
No escrow drafted yet — draft one in tab 1, or paste a 64-hex id.
Tap to attach an image (stays in this page; encrypted before it goes into the event)
Evidence is encrypted with a random AES-GCM key; that key
is then wrapped for the buyer, seller and arbitrator (NIP-44 via the
bridge when available) so all three can re-open the case file — not only
the arbitrator.
Your verdicts are rated by both parties — your npub's karma is your
license. A biased arbitrator bleeds karma and stops getting picked.
Case files listed here are the disputes opened this session. A real
arbitrator scans the relays for kind 32105 events p-tagging their npub
and decrypts each with their own key; that needs the operator's key, so the
demo shows the in-session cases instead.