{"id":49672089,"url":"https://github.com/oddmaki/oddmaki-core","last_synced_at":"2026-05-25T22:04:19.983Z","repository":{"id":355301978,"uuid":"1195380925","full_name":"oddmaki/oddmaki-core","owner":"oddmaki","description":"Smart contracts for the OddMaki protocol.","archived":false,"fork":false,"pushed_at":"2026-05-25T20:33:05.000Z","size":576,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-25T21:32:10.121Z","etag":null,"topics":["clob","defi","gnosis-conditional-tokens","prediction-markets","protocol","pyth-network","smart-contracts","uma"],"latest_commit_sha":null,"homepage":"https://oddmaki.com","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oddmaki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-29T15:52:42.000Z","updated_at":"2026-05-25T20:30:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/oddmaki/oddmaki-core","commit_stats":null,"previous_names":["oddmaki/oddmaki-core"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/oddmaki/oddmaki-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddmaki%2Foddmaki-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddmaki%2Foddmaki-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddmaki%2Foddmaki-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddmaki%2Foddmaki-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oddmaki","download_url":"https://codeload.github.com/oddmaki/oddmaki-core/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddmaki%2Foddmaki-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33494796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T14:31:05.219Z","status":"ssl_error","status_checked_at":"2026-05-25T14:31:02.878Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clob","defi","gnosis-conditional-tokens","prediction-markets","protocol","pyth-network","smart-contracts","uma"],"created_at":"2026-05-07T00:07:11.721Z","updated_at":"2026-05-25T22:04:19.975Z","avatar_url":"https://github.com/oddmaki.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OddMaki Protocol\n\nPermissionless prediction market factory with a fully on-chain Central Limit Order Book (CLOB). Built on Base.\n\nOddMaki lets anyone launch their own prediction market platform — what we call a **venue**. Each venue is an independent marketplace where operators control who can create markets, who can trade, fee structures, and oracle configuration. Think of it as Shopify for prediction markets: the protocol provides the trading engine, order matching, and settlement infrastructure; operators bring their audience and markets.\n\nAll trading happens on-chain through a CLOB — no off-chain components, no centralized matching, no custodial risk.\n\n## Architecture\n\nSingle [EIP-2535 Diamond](https://eips.ethereum.org/EIPS/eip-2535) proxy with modular facets:\n\n```\nsrc/\n├── OddMaki.sol              # Diamond proxy\n├── facets/                   # Public entry points\n│   ├── VenueFacet.sol        # Venue creation and configuration\n│   ├── MarketsFacet.sol      # Market lifecycle\n│   ├── MarketGroupFacet.sol  # Mutually exclusive market groups (neg-risk)\n│   ├── LimitOrdersFacet.sol  # Limit order placement and cancellation\n│   ├── MarketOrdersFacet.sol # FOK / FAK market orders\n│   ├── MatchingFacet.sol     # Order matching engine\n│   ├── OrderBookFacet.sol    # On-chain orderbook reads\n│   ├── VaultFacet.sol        # Collateral deposits and withdrawals\n│   ├── ResolutionFacet.sol   # Oracle-based market resolution\n│   └── ...\n├── aggregates/               # Domain orchestration (write path)\n├── services/                 # Business logic\n├── validators/               # Domain invariants and guard checks\n├── storage/                  # Namespaced Diamond storage\n└── libraries/                # Pure utilities\n```\n\n### Key Concepts\n\n- **Venues** — Permissionless market factories. Each venue defines who can create markets, who can trade, fee structure, and oracle configuration.\n- **Matching Engine** — Three settlement paths: direct fill (existing tokens), mint-to-fill (split collateral into YES + NO), and merge-to-fill (redeem YES + NO to collateral).\n- **Market Groups** — N mutually exclusive binary markets sharing collateral. One resolves YES, the rest cascade to NO.\n- **Fees** — Protocol fee, venue fee, creator fee, and operator fee. Fee rates are snapshotted per market at creation to protect resting orders.\n\n### External Dependencies\n\n- [Gnosis Conditional Token Framework (CTF)](https://github.com/gnosis/conditional-tokens-contracts) — ERC-1155 outcome tokens\n- [UMA Optimistic Oracle V3](https://docs.uma.xyz/) — Market resolution\n- [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts) — Security primitives\n\n## Deployments\n\n### Base mainnet (chainId 8453)\n\n**Diamond:** [`0x025d086a62d93e24f3cb3f161612ca8e9530127d`](https://basescan.org/address/0x025d086a62d93e24f3cb3f161612ca8e9530127d)\n\nAll protocol calls go through the Diamond proxy. Full facet manifest: [`deployments/base/latest.json`](./deployments/base/latest.json).\n\nInspect the live facet → selector graph on [Louper](https://louper.dev/diamond/0x025d086A62d93E24F3CB3f161612CA8E9530127d?network=base) — the standard explorer for EIP-2535 diamonds. Basescan only shows the original verified source at the proxy address and is not diamond-aware; Louper enumerates the loupe and links to each facet's verified source.\n\n### Base Sepolia (testnet, chainId 84532)\n\n**Diamond:** [`0x31a4126aec35b36d46dd371eb0f0d5b71e1c2292`](https://sepolia.basescan.org/address/0x31a4126aec35b36d46dd371eb0f0d5b71e1c2292) — full manifest in [`deployments/base-sepolia/latest.json`](./deployments/base-sepolia/latest.json), facet graph on [Louper](https://louper.dev/diamond/0x31a4126AEc35b36D46Dd371eb0F0d5b71e1C2292?network=base-sepolia).\n\n## Build\n\nRequires [Foundry](https://book.getfoundry.sh/getting-started/installation).\n\n```bash\nforge build\n```\n\n## Test\n\n```bash\nforge test -vvv\n```\n\n423 tests covering matching, settlement, fees, market groups, resolution, access control, and edge cases.\n\n## Security\n\nThis protocol handles real funds. The matching engine, fee calculations, and settlement paths are designed to be provably correct.\n\nIf you find a vulnerability, please report it responsibly to **team@oddmaki.com**.\n\n## Related Repositories\n\n- [oddmaki-sdk](https://github.com/OddMaki/oddmaki-sdk) — TypeScript SDK\n- [oddmaki-subgraph](https://github.com/OddMaki/oddmaki-subgraph) — Subgraph for indexed reads\n- [oddmaki-venue-starter](https://github.com/OddMaki/oddmaki-venue-starter) — Starter template for venue operators\n\n## Links\n\n- **Protocol** — [oddmaki.com](https://oddmaki.com)\n- **Maintainer** — [predictablereality.com](https://predictablereality.com)\n- **Contact** — team@oddmaki.com\n\n## License\n\n[Business Source License 1.1](./LICENSE) — see LICENSE for details. Converts to MIT on January 1, 2030. Copyright (c) 2025-2026 Predictable Reality, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foddmaki%2Foddmaki-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foddmaki%2Foddmaki-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foddmaki%2Foddmaki-core/lists"}