<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Carlos Revelo</title>
    <description>The latest articles on DEV Community by Carlos Revelo (@crevelop).</description>
    <link>https://dev.to/crevelop</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3970081%2F8734463f-9c76-43e8-944c-249b8c567690.jpeg</url>
      <title>DEV Community: Carlos Revelo</title>
      <link>https://dev.to/crevelop</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/crevelop"/>
    <language>en</language>
    <item>
      <title>How to Build Your Own Polymarket</title>
      <dc:creator>Carlos Revelo</dc:creator>
      <pubDate>Fri, 05 Jun 2026 16:18:16 +0000</pubDate>
      <link>https://dev.to/crevelop/how-to-build-your-own-polymarket-8g8</link>
      <guid>https://dev.to/crevelop/how-to-build-your-own-polymarket-8g8</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;What it takes to build a prediction market platform like Polymarket in 2026, why you can't just fork it, and how to ship one on Base with an onchain CLOB, dual-oracle resolution, and a TypeScript SDK.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;People ask me how to build their own Polymarket more than they ask anything else. The reasons vary. Polymarket isn't available where they live. They want a venue for a specific crowd: a sports community, a DAO, an NFT project, a trading desk. They have an audience and want to give it somewhere to trade.&lt;/p&gt;

&lt;p&gt;The question underneath is always the same. Where do you start?&lt;/p&gt;

&lt;p&gt;Short answer: you don't build the hard part. You build on top of it. The orderbook, the matching engine, custody, settlement, and resolution add up to roughly a year of engineering before a single trade clears. That work is already done and live onchain. What's left for you is the part that makes a platform yours: the brand, the markets, the frontend.&lt;/p&gt;

&lt;p&gt;This post covers why building from scratch is so expensive, and then two concrete paths to ship one anyway. There's code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can You Just Fork Polymarket?
&lt;/h2&gt;

&lt;p&gt;Not really, and the reason shapes everything else.&lt;/p&gt;

&lt;p&gt;Polymarket and Kalshi are platforms, not protocols. Polymarket's stack has two halves. The onchain half (outcome tokens, collateral, settlement, UMA resolution) is public and forkable. The other half (the orderbook, the matching engine, the API, the indexer) runs on their own servers and isn't open. When you place an order on Polymarket, it sits in their offchain book. Their backend matches it. Only the settled result lands onchain.&lt;/p&gt;

&lt;p&gt;So "forking Polymarket's contracts" gets you the bottom of the stack. The part traders actually touch, the order matching, you'd rebuild from scratch. That's a backend project on its own: API servers, a signature scheme, batching logic, anti-front-running protections, indexers, monitoring, and the ops to keep all of it running every hour of every day.&lt;/p&gt;

&lt;p&gt;The real question isn't how to fork Polymarket. It's which engineering you want to do yourself, and which you want already done.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Building From Scratch Costs You
&lt;/h2&gt;

&lt;p&gt;From zero, here's the shape of the work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Outcome tokens.&lt;/strong&gt; Usually ERC-1155 conditional tokens via Gnosis CTF. Easy. The standard exists.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The exchange.&lt;/strong&gt; Order representation, the matching engine, settlement against collateral. This is where most of the work lives. Offchain means servers, signatures, and 24/7 ops. Onchain means a matcher that fits inside gas limits and handles the cases with no direct counterparty.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resolution.&lt;/strong&gt; Wire UMA's optimistic oracle for human-asserted markets. Wire Pyth or Chainlink for price-based ones. Then handle disputes, edge cases, and markets nobody resolves.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Access control and fees.&lt;/strong&gt; Who can list, who can trade, what each side pays, how fees route.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The frontend.&lt;/strong&gt; Order entry, positions, discovery, portfolio, wallet flows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The data layer.&lt;/strong&gt; An indexer or subgraph, because the frontend needs fast reads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ops and distribution.&lt;/strong&gt; Hosting, monitoring, an entity, banking, and the only part that decides whether anyone shows up: an audience.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Honest estimate for a competent team: twelve to eighteen months before the platform takes its first trade. That's why most "Polymarket competitor" announcements never ship. The work is real.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build on Top Instead
&lt;/h2&gt;

&lt;p&gt;The other path is to not build the infrastructure at all. Build on something that already did.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://oddmaki.com" rel="noopener noreferrer"&gt;OddMaki&lt;/a&gt; is permissionless onchain infrastructure for prediction markets, live on Base. One Diamond proxy contract (EIP-2535, 21 facets) at &lt;code&gt;0x025d086a62d93e24f3cb3f161612ca8e9530127d&lt;/code&gt;, deployed on Base (chain ID 8453) and Base Sepolia (84532). It's an open protocol: no subscription, no listing fee, no charge to deploy. You pay gas, plus a flat protocol fee on trades (50 bps, taker-only) that your users pay.&lt;/p&gt;

&lt;p&gt;What you get without writing it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A fully onchain CLOB.&lt;/strong&gt; A tick-based central limit order book in a smart contract, denominated in USDC. Every order, fill, and cancel is a transaction on Base. No offchain matching server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Three settlement paths.&lt;/strong&gt; The matcher runs them in one call: &lt;strong&gt;Normal Fill&lt;/strong&gt; (a YES buyer meets a YES seller), &lt;strong&gt;Mint-to-Fill&lt;/strong&gt; (two opposite buyers whose prices sum to at least $1 fund fresh token issuance from collateral), and &lt;strong&gt;Merge-to-Fill&lt;/strong&gt; (two opposite sellers redeem a matched pair back to collateral). That last two are what keep thin markets liquid when there's no direct counterparty.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custody and settlement, onchain.&lt;/strong&gt; Outcome tokens are ERC-1155 via Gnosis CTF, the same standard Polymarket uses. Collateral sits in the protocol contract, not in anyone's wallet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dual-oracle resolution, permissionless.&lt;/strong&gt; UMA V3 for human-asserted markets, Pyth for price markets (instant, no dispute window). Anyone can submit the result. No privileged resolver, including the protocol team.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A subgraph.&lt;/strong&gt; Every market, order, fill, and position indexed into a GraphQL API, so your frontend has fast reads out of the box.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What's left for you is two things. Your frontend, and your distribution. The frontend reads straight from the chain and the subgraph, so there's no backend to run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path A: Fork, Brand, Deploy (No Contract Code)
&lt;/h2&gt;

&lt;p&gt;The fast path uses a white-label Next.js 15 frontend called the Venue Starter. It ships with trading (limit, market, batch), market creation, UMA resolution flows, a leaderboard, and a live theme editor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Create your venue.&lt;/strong&gt; Run the wizard at &lt;a href="https://app.oddmaki.com" rel="noopener noreferrer"&gt;app.oddmaki.com&lt;/a&gt; → Create Venue. Set your fees, access rules, and oracle params. It registers onchain and hands you a &lt;code&gt;venueId&lt;/code&gt;. About ten minutes, gas only.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Fork the starter.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Fork + clone in one step (needs the GitHub CLI)&lt;/span&gt;
gh repo fork oddmaki/oddmaki-venue-starter &lt;span class="nt"&gt;--clone&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;oddmaki-venue-starter
pnpm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Point it at your venue.&lt;/strong&gt; Two env vars are all you need to boot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cp&lt;/span&gt; .env.local.example .env.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# .env.local&lt;/span&gt;
&lt;span class="nv"&gt;NEXT_PUBLIC_VENUE_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1        &lt;span class="c"&gt;# the venueId from step 1&lt;/span&gt;
&lt;span class="nv"&gt;NEXT_PUBLIC_CHAIN_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;84532    &lt;span class="c"&gt;# 8453 = Base, 84532 = Base Sepolia (start here)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Brand it.&lt;/strong&gt; Two colors generate the full design system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;theme.config.json&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"brand"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"primary"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"#00F0FF"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"secondary"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"#FF00E5"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm dev   &lt;span class="c"&gt;# http://localhost:3000 — your market grid, your branding&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. Deploy.&lt;/strong&gt; &lt;code&gt;vercel&lt;/code&gt; from the CLI, or use the one-click Deploy with Vercel button in the starter README, which forks and ships in the same flow. Any Next.js host works.&lt;/p&gt;

&lt;p&gt;That's a live prediction market platform with no contract code and no backend. The app talks directly to Base over RPC and to the subgraph over GraphQL. If your hosting goes down, users can still hit the contracts directly.&lt;/p&gt;

&lt;p&gt;Forking (not cloning) is the recommended path, because GitHub's Sync fork button pulls starter updates into your repo with one click while your &lt;code&gt;theme.config.json&lt;/code&gt; and any custom code stay yours.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path B: Drive It With the SDK
&lt;/h2&gt;

&lt;p&gt;If you're building a custom frontend, a market-making bot, or an AI agent that trades onchain, skip the starter and use the TypeScript SDK directly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm add @oddmaki-protocol/sdk viem
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The SDK wraps the Diamond ABIs, handles decimal and tick conversions, and exposes the subgraph through one client with eight modules: &lt;code&gt;venue&lt;/code&gt;, &lt;code&gt;market&lt;/code&gt;, &lt;code&gt;trade&lt;/code&gt;, &lt;code&gt;priceMarket&lt;/code&gt;, &lt;code&gt;accessControl&lt;/code&gt;, &lt;code&gt;public&lt;/code&gt;, &lt;code&gt;token&lt;/code&gt;, and &lt;code&gt;uma&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createOddMakiClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@oddmaki-protocol/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;base&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;viem/chains&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createPublicClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;createWalletClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;custom&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;http&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;viem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;publicClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createPublicClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;transport&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;http&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;walletClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createWalletClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;transport&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;custom&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ethereum&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createOddMakiClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;publicClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;walletClient&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// pass baseSepolia to target the testnet&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The method names below are exact. Treat the snippet as the shape of the flow, and check the &lt;a href="https://www.oddmaki.com/docs/ecosystem/sdk" rel="noopener noreferrer"&gt;SDK reference&lt;/a&gt; for full parameter and return types.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 1. Register a venue onchain (fees, access rules, oracle params)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;venueId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;venue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createVenue&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="cm"&gt;/* ...config */&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// 2. List a binary market on it&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;marketId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;market&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createMarket&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="cm"&gt;/* question, venueId, ... */&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// 3. Place a limit order. Simple variants take human strings and&lt;/span&gt;
&lt;span class="c1"&gt;//    handle approvals for EOAs when you pass autoApprove.&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;trade&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;placeOrderSimple&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="nx"&gt;marketId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;side&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;BUY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;outcome&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;YES&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.62&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;     &lt;span class="c1"&gt;// 62 cents&lt;/span&gt;
  &lt;span class="na"&gt;quantity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;100&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;expiry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;24h&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;autoApprove&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// 4. Anyone can trigger matching and earn the 10 bps operator fee&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;trade&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;matchOrders&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;marketId&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// 5. Read state straight from the subgraph (no backend)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;top&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTopOfBook&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;marketId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Price-handling is the part people usually reinvent, so the SDK ships the conversions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;priceToTick&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;parseTokenAmount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;createExpiry&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@oddmaki-protocol/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;priceToTick&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.75&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;          &lt;span class="c1"&gt;// 75n  (at 1% tick size)&lt;/span&gt;
&lt;span class="nf"&gt;parseTokenAmount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;100.5&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 100500000n  (USDC, 6 decimals)&lt;/span&gt;
&lt;span class="nf"&gt;createExpiry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;24h&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;          &lt;span class="c1"&gt;// BigInt(now + 86400)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Batch operations are first-class too: up to 20 orders in one transaction, up to 100 cancels across markets, or an atomic cancel-and-replace.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resolution: UMA and Pyth
&lt;/h2&gt;

&lt;p&gt;Resolution is per-market, picked at creation.&lt;/p&gt;

&lt;p&gt;For markets a human has to settle (did the bill pass, who won the race), it's UMA V3. Someone asserts the outcome with a bond, a dispute window opens, and if undisputed it settles. Disputes fall back to UMA's DVM. In the SDK that's &lt;code&gt;client.uma.assertMarketOutcome&lt;/code&gt; and friends.&lt;/p&gt;

&lt;p&gt;For markets a price feed can settle (did ETH close above a strike), it's Pyth. Anyone calls &lt;code&gt;client.priceMarket.resolvePyth(marketId)&lt;/code&gt; after the close time. The contract verifies the Pyth historical price and resolves. No bond, no liveness wait, no dispute path. Stuck markets can be invalidated for a 50/50 refund after seven days.&lt;/p&gt;

&lt;p&gt;Both are permissionless. There is no "OddMaki resolves the market" step, because the team isn't a resolver and couldn't be.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Can Build
&lt;/h2&gt;

&lt;p&gt;The protocol doesn't care what your markets are about or who trades them, so the shape is up to you. Access control is two independent axes (who can list, who can trade), each set to open, whitelist, NFT-gated, token-gated, or a custom contract.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An open public venue, anyone listing and trading.&lt;/li&gt;
&lt;li&gt;A regional venue for a place the big platforms don't serve.&lt;/li&gt;
&lt;li&gt;A community venue gated to your DAO or NFT holders.&lt;/li&gt;
&lt;li&gt;A private institutional book, whitelisted counterparties, onchain clearing, no public exposure.&lt;/li&gt;
&lt;li&gt;An agent-native venue with open contracts and a public subgraph instead of a gated API.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Markets can be crypto prices, news, events, election outcomes, RWA milestones, anything with a clean answer a market can price. Multi-outcome groups (up to 50 mutually exclusive outcomes) resolve as a unit through a NegRisk cascade.&lt;/p&gt;

&lt;p&gt;Same protocol underneath all of it. Polymarket is one venue. So is Kalshi. OddMaki is the thing that lets there be many.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to Start
&lt;/h2&gt;

&lt;p&gt;The infrastructure is the hard part, and it's done. My honest take, as someone obviously biased here: building on top instead of from scratch is the right call unless you have a genuinely novel mechanism existing primitives can't express. Everyone else should spend their year on users, not on rebuilding an orderbook.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docs and the full launch playbook: &lt;a href="https://oddmaki.com/docs" rel="noopener noreferrer"&gt;oddmaki.com/docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The app (create a venue): &lt;a href="https://app.oddmaki.com" rel="noopener noreferrer"&gt;app.oddmaki.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;A live venue to click around: &lt;a href="https://base-sepolia.demo.oddmaki.com" rel="noopener noreferrer"&gt;base-sepolia.demo.oddmaki.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Code: &lt;a href="https://github.com/oddmaki" rel="noopener noreferrer"&gt;github.com/oddmaki&lt;/a&gt; · SDK: &lt;a href="https://www.npmjs.com/package/@oddmaki-protocol/sdk" rel="noopener noreferrer"&gt;&lt;code&gt;@oddmaki-protocol/sdk&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything works end to end on Base Sepolia, so you can rehearse the whole launch on testnet before going to production. You don't need anyone's permission. Start at &lt;a href="https://oddmaki.com" rel="noopener noreferrer"&gt;oddmaki.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;— Carlos Revelo&lt;/p&gt;

</description>
      <category>web3</category>
      <category>tutorial</category>
      <category>opensource</category>
      <category>blockchain</category>
    </item>
  </channel>
</rss>
