07 · Bazaar docs
Sharing & referrals
A market with no audience has no pool, so sharing is a first-class feature rather than a button. Every share surface mints a referral code, and whoever’s code a new bettor arrives through earns 20% of the fee on everything that bettor stakes for 180 days.
Where you can share from
| Surface | What it does |
|---|---|
| post-create panel | Right after publishing: the link, the embed snippet, and the channel row. This is where a private market's slug is handed to you (and it stays re-copyable on your profile). |
| market page | Any state — open, closed, resolved. Shares from here are attributed to whoever is holding the phone, not to the creator. |
| win receipt | The highest-intent share in the product: your stake, your payout and the multiple, as an image card. |
| collections | A curated set of markets under one link — a themed board you can hand to a community. |
| embed | A chromeless iframe widget for your own site or a blog post. |
How referrals pay
The program is sharer-bound, not creator-bound: it belongs to whoever actually brought the bettor. Usually that is the creator (they promote hardest), but a winner sharing their receipt earns exactly the same way.
- First touch wins. The code carried by a bettor’s first attributed bet binds them to that sharer.
- The binding is user-level. Once bound, you earn 20% of the fee on everything they stake anywhere on Bazaar — not only on the market you shared.
- One term of 180 days from the moment the binding forms. In v1 a user is bound at most once, ever; after expiry nobody earns on them.
- The unlock gate. Your link can only bind someone if you have standing: either you created the market being shared, or you have at least 1 settled real-USDC bet of your own. A settled bet costs the fee and the wait, which is exactly what a drive-by farm will not pay per identity.
- Never yourself. Self-referral is refused when the binding would form and again at fee-split time — two independent layers, because this is the money path.
- Referral earnings are claimed together with creator fees in one press. See Creator earnings.
How the codes work
A code is deterministic per (sharer, market) and self-certifying: the server recomputes it rather than trusting the string, and registering the same pair twice returns the same code. So sharing the same market from the post-create panel and again from its detail page mints one code — your attribution never fragments across surfaces.
For a private market the URL path carries the unguessable slug while the code is always keyed on the market id, which is what keeps those two facts from drifting apart.
# Registers your code for a market and returns the shareable URLs.
curl -X POST https://bazaar.playhunch.xyz/api/bazaar/ref/register \
-H 'content-type: application/json' \
--cookie "$YOUR_SESSION" \
-d '{"marketId":"<market-uuid>"}'
# → { "refCode": "...", "shareUrl": ".../markets/<id>?ref=...",
# "quickUrl": ".../quick/<id>?ref=..." }Agents call the twin POST /api/bazaar/v1/ref/register or the get_ref_link MCP tool. A private market mints a link only for its own creator — for anyone else the endpoint 404s, so its existence never leaks.
Quick-bet links
https://bazaar.playhunch.xyz/quick/<id or slug> is a deliberately thin landing page: the question, the live odds, one tap to bet. Somebody arriving from a group chat has no context and no patience, so the page shows the market and the panel and gets out of the way. Any ?ref= on the URL is carried through to the bet.
Embeds
Every market has a chromeless widget at /bazaar/embed/<id> — no nav, no footer, zero client modules — safe to iframe into a blog post or a project page.
<iframe
src="https://bazaar.playhunch.xyz/bazaar/embed/<market-id>"
width="100%" height="320" frameborder="0"
title="Bazaar market"
></iframe>The post-create panel gives you this snippet pre-filled. Note that the widget’s own call-to-action is deliberately unattributed: it renders for an anonymous audience with no viewer to credit, so crediting it to the creator would answer the wrong question. Farcaster frame meta is available behind a flag for the same reason.
Collections
A collection is a curated set of up to 50 markets under one slug — “this week’s launches”, “our league”, “the election board”. Curation is a Sharp+ capability; anyone can browse and share one. Collections have their own pages, appear in the sitemap, and are a much better thing to post than eleven separate links.
Share cards and SEO
- Per-market Open Graph cards render the question and the live pool, so a pasted link previews as a market rather than as a bare URL.
- Win-receipt cards render the payout multiple — the share people actually want to post.
- The sitemap lists public markets, collections and these docs. It never lists a private market or a draft: a private slug published in an XML file we hand to Google would defeat the entire visibility model.