{"id":"d9f5e95e-f846-4dc1-8dd0-48197a9f4921","entityType":"agent","slug":"clawhub-tariqsumatri82-create-prediction-markets-1-0-0","name":"Create Prediction Markets 1.0.0","canonicalUrl":"https://www.xpersona.co/agent/clawhub-tariqsumatri82-create-prediction-markets-1-0-0","canonicalPath":"/agent/clawhub-tariqsumatri82-create-prediction-markets-1-0-0","generatedAt":"2026-10-10T01:22:50.894Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"description":"Create, trade, and settle prediction markets on Base with any ERC20 collateral. Use when building prediction market infrastructure, running contests, crowdsourcing probability estimates, adding utility to tokens, or tapping into true information finance via market-based forecasting. Skill: Create Prediction Markets 1.0.0 Owner: tariqsumatri82 Summary: Create, trade, and settle prediction markets on Base with any ERC20 collateral. Use when building prediction market infrastructure, running contests, crowdsourcing probability estimates, adding utility to tokens, or tapping into true information finance via market-based forecasting. Tags: latest:1.0.0 Version history: v1.0.0 | 2026-02-08T11:53:46.4","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 725 downloads reported by the source. Last updated 4/15/2026.","installCommand":"clawhub skill install kn70jfw8xqy0vmfwfvk7brkz1180r73s:create-prediction-markets-1-0-0","sourceUrl":"https://clawhub.ai/tariqsumatri82/create-prediction-markets-1-0-0","homepage":"https://clawhub.ai/tariqsumatri82/create-prediction-markets-1-0-0","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/tariqsumatri82/create-prediction-markets-1-0-0","kind":"source"}],"safetyScore":84,"overallRank":62,"popularityScore":57,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Create, trade, and settle prediction markets on Base with any ERC20 collateral. Use when building prediction market infrastructure, running contests, crowdsourc"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"stars":null,"forks":null,"downloads":725,"packageName":null,"latestVersion":"1.0.0","tractionLabel":"725 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-03-01T02:48:01.022Z","emptyReason":null},"lastUpdatedAt":"2026-04-15T00:45:39.800Z","lastCrawledAt":"2026-03-01T02:48:01.022Z","lastIndexedAt":null,"nextCrawlAt":"2026-03-02T02:48:01.022Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.0","createdAt":"2026-02-08T11:53:46.417Z","changelog":"- Initial release of pnp-markets. - Create, trade, settle, and redeem prediction markets on Base Mainnet using any ERC20 collateral. - Command line scripts and programmatic SDK usage for full market lifecycle management. - Supports custom and common tokens (USDC, WETH, cbETH) with standard ERC20 approvals. - Includes troubleshooting tips and documentation references for rapid onboarding.","fileCount":11,"zipByteSize":16276}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install kn70jfw8xqy0vmfwfvk7brkz1180r73s:create-prediction-markets-1-0-0","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-tariqsumatri82-create-prediction-markets-1-0-0/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-tariqsumatri82-create-prediction-markets-1-0-0/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-tariqsumatri82-create-prediction-markets-1-0-0/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-tariqsumatri82-create-prediction-markets-1-0-0/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-tariqsumatri82-create-prediction-markets-1-0-0/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-tariqsumatri82-create-prediction-markets-1-0-0/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T01:22:50.894Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-tariqsumatri82-create-prediction-markets-1-0-0/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-tariqsumatri82-create-prediction-markets-1-0-0/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-tariqsumatri82-create-prediction-markets-1-0-0/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-tariqsumatri82-create-prediction-markets-1-0-0/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"readme":"Skill: Create Prediction Markets 1.0.0\n\nOwner: tariqsumatri82\n\nSummary: Create, trade, and settle prediction markets on Base with any ERC20 collateral. Use when building prediction market infrastructure, running contests, crowdsourcing probability estimates, adding utility to tokens, or tapping into true information finance via market-based forecasting.\n\nTags: latest:1.0.0\n\nVersion history:\n\nv1.0.0 | 2026-02-08T11:53:46.417Z | auto\n\n- Initial release of pnp-markets.\n- Create, trade, settle, and redeem prediction markets on Base Mainnet using any ERC20 collateral.\n- Command line scripts and programmatic SDK usage for full market lifecycle management.\n- Supports custom and common tokens (USDC, WETH, cbETH) with standard ERC20 approvals.\n- Includes troubleshooting tips and documentation references for rapid onboarding.\n\nArchive index:\n\nArchive v1.0.0: 11 files, 16276 bytes\n\nFiles: _meta.json (150b), references/api-reference.md (4775b), references/examples.md (5145b), references/use-cases.md (3589b), scripts/create-market.ts (5398b), scripts/package.json (501b), scripts/redeem.ts (3181b), scripts/settle.ts (5056b), scripts/trade.ts (5699b), scripts/tsconfig.json (263b), SKILL.md (5788b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: pnp-markets\ndescription: Create, trade, and settle prediction markets on Base with any ERC20 collateral. Use when building prediction market infrastructure, running contests, crowdsourcing probability estimates, adding utility to tokens, or tapping into true information finance via market-based forecasting.\n---\n\n# PNP Markets\n\nCreate and manage prediction markets on Base Mainnet with any ERC20 collateral token.\n\n## Quick Decision\n\n```\nNeed prediction markets?\n├─ Create market     → npx ts-node scripts/create-market.ts --help\n├─ Trade (buy/sell)  → npx ts-node scripts/trade.ts --help\n├─ Settle market     → npx ts-node scripts/settle.ts --help\n└─ Redeem winnings   → npx ts-node scripts/redeem.ts --help\n```\n\n## Environment\n\n```bash\nexport PRIVATE_KEY=<wallet_private_key>    # Required\nexport RPC_URL=<base_rpc_endpoint>         # Optional (defaults to public RPC)\n```\n\nFor production, use a dedicated RPC (Alchemy, QuickNode) to avoid rate limits.\n\n## Scripts\n\nRun any script with `--help` first to see all options.\n\n### Create Market\n\n```bash\nnpx ts-node scripts/create-market.ts \\\n  --question \"Will ETH reach $10k by Dec 2025?\" \\\n  --duration 168 \\\n  --liquidity 100\n```\n\nOptions: `--collateral <USDC|WETH|address>`, `--decimals <n>`\n\n### Trade\n\n```bash\n# Buy YES tokens\nnpx ts-node scripts/trade.ts --buy --condition 0x... --outcome YES --amount 10\n\n# Sell NO tokens  \nnpx ts-node scripts/trade.ts --sell --condition 0x... --outcome NO --amount 5 --decimals 18\n\n# View prices only\nnpx ts-node scripts/trade.ts --info --condition 0x...\n```\n\n### Settle\n\n```bash\n# Settle as YES winner\nnpx ts-node scripts/settle.ts --condition 0x... --outcome YES\n\n# Check status\nnpx ts-node scripts/settle.ts --status --condition 0x...\n```\n\n### Redeem\n\n```bash\nnpx ts-node scripts/redeem.ts --condition 0x...\n```\n\n## Programmatic Usage\n\n```typescript\nimport { PNPClient } from \"pnp-evm\";\nimport { ethers } from \"ethers\";\n\nconst client = new PNPClient({\n  rpcUrl: process.env.RPC_URL || \"https://mainnet.base.org\",\n  privateKey: process.env.PRIVATE_KEY!,\n});\n\n// Create market\nconst { conditionId } = await client.market.createMarket({\n  question: \"Will X happen?\",\n  endTime: Math.floor(Date.now() / 1000) + 86400 * 7,\n  initialLiquidity: ethers.parseUnits(\"100\", 6).toString(),\n});\n\n// Trade\nawait client.trading.buy(conditionId, ethers.parseUnits(\"10\", 6), \"YES\");\n\n// Settle (after endTime)\nconst tokenId = await client.trading.getTokenId(conditionId, \"YES\");\nawait client.market.settleMarket(conditionId, tokenId);\n\n// Redeem\nawait client.redemption.redeem(conditionId);\n```\n\n## Collateral Tokens\n\nUse any ERC20. Common Base Mainnet tokens:\n\n| Token | Address | Decimals |\n|-------|---------|----------|\n| USDC | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | 6 |\n| WETH | `0x4200000000000000000000000000000000000006` | 18 |\n| cbETH | `0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22` | 18 |\n\nCustom tokens add utility—holders can participate in your markets.\n\n## ERC20 Approvals\n\nBefore interacting with PNP contracts, you must approve them to spend your collateral tokens. This is standard for all EVM dApps.\n\n### How It Works\n\n1. **First interaction requires approval**: When you create a market or trade for the first time with a token, an approval transaction is sent\n2. **Infinite approvals**: The SDK uses `type(uint256).max` approvals (standard EVM pattern) so you only approve once per token\n3. **Subsequent interactions**: No approval needed—transactions execute directly\n\n### Timing Considerations\n\nThe approval transaction must be confirmed on-chain before the main transaction executes. If you see:\n\n```\nERC20: transfer amount exceeds allowance\n```\n\nThis means the approval hasn't been mined yet. **Simply wait a few seconds and retry**—the approval will be confirmed and subsequent attempts will succeed.\n\n### Why Infinite Approvals?\n\n- **Gas efficiency**: Approve once, trade forever without extra transactions\n- **Better UX**: No repeated approval popups\n- **Industry standard**: Used by Uniswap, Aave, and most major DeFi protocols\n\nFor maximum security-conscious users, you can manually set specific approval amounts, but this requires an approval transaction before each interaction.\n\n## Contracts\n\n| Contract | Address |\n|----------|---------|\n| PNP Factory | `0x5E5abF8a083a8E0c2fBf5193E711A61B1797e15A` |\n| Fee Manager | `0x6f1BffB36aC53671C9a409A0118cA6fee2b2b462` |\n\n## Why Prediction Markets?\n\n- **Information Discovery**: Market prices reveal collective probability estimates\n- **Token Utility**: Use your token as collateral to drive engagement\n- **Contests**: Run competitions where participants stake on outcomes\n- **Forecasting**: Aggregate crowd wisdom for decision-making\n\nThe pAMM virtual liquidity model ensures smooth trading even with minimal initial liquidity.\n\n## Troubleshooting\n\n### \"ERC20: transfer amount exceeds allowance\"\nThe approval transaction hasn't been confirmed yet. Wait 5-10 seconds and retry.\n\n### \"Market doesn't exist\"\nThe market creation transaction may have failed or is still pending. Verify on BaseScan that your transaction was confirmed successfully.\n\n### \"over rate limit\" / RPC errors\nThe public Base RPC has rate limits. Use a dedicated RPC provider:\n```bash\nexport RPC_URL=https://base-mainnet.g.alchemy.com/v2/YOUR_KEY\n```\n\n### Transaction stuck or slow\nBase Mainnet can occasionally have congestion. Check gas prices and consider increasing if needed.\n\n## Reference Files\n\n- **API Reference**: See [references/api-reference.md](references/api-reference.md) for complete SDK documentation\n- **Use Cases**: See [references/use-cases.md](references/use-cases.md) for detailed use case patterns\n- **Examples**: See [references/examples.md](references/examples.md) for complete code examples\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn70jfw8xqy0vmfwfvk7brkz1180r73s\",\n  \"slug\": \"create-prediction-markets-1-0-0\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1770551626417\n}\n\nFile v1.0.0:references/api-reference.md\n\n# PNP SDK API Reference\n\nComplete API documentation for the PNP Protocol SDK.\n\n## Installation\n\n```bash\nnpm install pnp-evm ethers\n```\n\n## PNPClient\n\nMain entry point for all operations.\n\n```typescript\nimport { PNPClient } from \"pnp-evm\";\n\nconst client = new PNPClient({\n  rpcUrl: string,           // RPC endpoint (defaults to Base mainnet)\n  privateKey: string,       // Wallet private key\n  contractAddresses?: {     // Optional custom addresses\n    marketFactory: string,\n    usdcToken: string,\n    feeManager: string,\n  }\n});\n```\n\n## Market Module (`client.market`)\n\n### createMarket(params)\n\nCreate a new prediction market.\n\n```typescript\nconst { conditionId, hash, receipt } = await client.market.createMarket({\n  question: string,           // Prediction question\n  endTime: number,            // Unix timestamp when trading ends\n  initialLiquidity: string,   // Amount in wei\n  collateralToken?: string,   // ERC20 address (defaults to USDC)\n});\n```\n\n**Returns:**\n- `conditionId`: Unique market identifier\n- `hash`: Transaction hash\n- `receipt`: Full transaction receipt\n\n### getMarketInfo(conditionId)\n\nGet market details.\n\n```typescript\nconst info = await client.market.getMarketInfo(conditionId);\n// Returns:\n// {\n//   question: string,\n//   endTime: string,\n//   isCreated: boolean,\n//   isSettled: boolean,\n//   reserve: string,\n//   collateral: string,\n//   winningToken: string\n// }\n```\n\n### getMarketPrices(conditionId)\n\nGet current YES/NO token prices.\n\n```typescript\nconst prices = await client.market.getMarketPrices(conditionId);\n// Returns:\n// {\n//   yesPrice: string,        // e.g., \"0.65\"\n//   noPrice: string,         // e.g., \"0.35\"\n//   yesPricePercent: string, // e.g., \"65.00%\"\n//   noPricePercent: string,  // e.g., \"35.00%\"\n//   yesPriceRaw: string,\n//   noPriceRaw: string\n// }\n```\n\n### settleMarket(conditionId, winningTokenId)\n\nSettle a market with the winning outcome. Only callable by market creator after end time.\n\n```typescript\nconst winningTokenId = await client.trading.getTokenId(conditionId, \"YES\");\nconst result = await client.market.settleMarket(conditionId, winningTokenId);\n```\n\n## Trading Module (`client.trading`)\n\n### getTokenId(conditionId, outcome)\n\nGet the token ID for a specific outcome.\n\n```typescript\nconst yesTokenId = await client.trading.getTokenId(conditionId, \"YES\");\nconst noTokenId = await client.trading.getTokenId(conditionId, \"NO\");\n```\n\n### buy(conditionId, amount, outcome, minTokensOut?)\n\nBuy outcome tokens with collateral.\n\n```typescript\nimport { ethers } from \"ethers\";\n\nconst amount = ethers.parseUnits(\"10\", 6); // 10 USDC\nconst minTokensOut = 0n; // Slippage protection (0 = no limit)\n\nconst result = await client.trading.buy(\n  conditionId,\n  amount,\n  \"YES\",        // or \"NO\"\n  minTokensOut\n);\n```\n\n**Parameters:**\n- `conditionId`: Market identifier\n- `amount`: Collateral amount in wei\n- `outcome`: \"YES\" or \"NO\"\n- `minTokensOut`: Minimum tokens to receive (slippage protection)\n\n### sell(conditionId, amount, outcome, minCollateralOut?)\n\nSell outcome tokens for collateral.\n\n```typescript\nconst tokenAmount = ethers.parseUnits(\"5\", 18); // 5 outcome tokens\nconst minCollateralOut = 0n;\n\nconst result = await client.trading.sell(\n  conditionId,\n  tokenAmount,\n  \"YES\",\n  minCollateralOut\n);\n```\n\n**Note:** Outcome tokens always have 18 decimals.\n\n## Redemption Module (`client.redemption`)\n\n### isResolved(conditionId)\n\nCheck if market is settled.\n\n```typescript\nconst isSettled = await client.redemption.isResolved(conditionId);\n```\n\n### getWinningToken(conditionId)\n\nGet the winning token ID after settlement.\n\n```typescript\nconst winningTokenId = await client.redemption.getWinningToken(conditionId);\n```\n\n### redeem(conditionId)\n\nRedeem winning tokens for collateral.\n\n```typescript\nconst result = await client.redemption.redeem(conditionId);\n```\n\n## Contract Addresses (Base Mainnet)\n\n| Contract | Address |\n|----------|---------|\n| PNP Factory | `0x5E5abF8a083a8E0c2fBf5193E711A61B1797e15A` |\n| Fee Manager | `0x6f1BffB36aC53671C9a409A0118cA6fee2b2b462` |\n| USDC | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` |\n| WETH | `0x4200000000000000000000000000000000000006` |\n| cbETH | `0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22` |\n\n## Error Handling\n\n```typescript\ntry {\n  await client.market.createMarket({ ... });\n} catch (error: any) {\n  if (error.message.includes(\"insufficient funds\")) {\n    // Not enough collateral balance\n  } else if (error.message.includes(\"Slippage\")) {\n    // Price moved too much\n  } else if (error.message.includes(\"Only creator\")) {\n    // Not authorized to settle\n  }\n}\n```\n\n## Rate Limiting\n\nThe SDK includes built-in retry logic for RPC rate limits. For production use, use a dedicated RPC provider (Alchemy, QuickNode, Infura) instead of the public endpoint.\n\nFile v1.0.0:references/examples.md\n\n# PNP Markets - Complete Examples\n\n## Full Market Lifecycle\n\n```typescript\nimport { PNPClient } from \"pnp-evm\";\nimport { ethers } from \"ethers\";\n\nasync function fullLifecycle() {\n  const client = new PNPClient({\n    rpcUrl: process.env.RPC_URL || \"https://mainnet.base.org\",\n    privateKey: process.env.PRIVATE_KEY!,\n  });\n\n  // 1. CREATE MARKET\n  console.log(\"Creating market...\");\n  const { conditionId, hash } = await client.market.createMarket({\n    question: \"Will our community reach 1000 members this month?\",\n    endTime: Math.floor(Date.now() / 1000) + 86400 * 7,\n    initialLiquidity: ethers.parseUnits(\"50\", 6).toString(),\n  });\n  console.log(\"Market created:\", conditionId);\n\n  // 2. CHECK PRICES\n  const prices = await client.market.getMarketPrices(conditionId!);\n  console.log(\"YES:\", prices.yesPricePercent);\n  console.log(\"NO:\", prices.noPricePercent);\n\n  // 3. BUY TOKENS\n  const buyAmount = ethers.parseUnits(\"10\", 6);\n  await client.trading.buy(conditionId!, buyAmount, \"YES\");\n  console.log(\"Bought YES tokens\");\n\n  // 4. SELL TOKENS (partial)\n  const sellAmount = ethers.parseUnits(\"2\", 18);\n  await client.trading.sell(conditionId!, sellAmount, \"YES\");\n  console.log(\"Sold some YES tokens\");\n\n  // 5. SETTLE (after endTime)\n  const winningTokenId = await client.trading.getTokenId(conditionId!, \"YES\");\n  await client.market.settleMarket(conditionId!, winningTokenId);\n  console.log(\"Market settled as YES\");\n\n  // 6. REDEEM\n  await client.redemption.redeem(conditionId!);\n  console.log(\"Winnings redeemed\");\n}\n```\n\n## Custom Token Collateral\n\n```typescript\nimport { PNPClient } from \"pnp-evm\";\nimport { ethers } from \"ethers\";\n\nasync function customTokenMarket() {\n  const client = new PNPClient({\n    rpcUrl: process.env.RPC_URL || \"https://mainnet.base.org\",\n    privateKey: process.env.PRIVATE_KEY!,\n  });\n\n  const MY_TOKEN = \"0xYourTokenAddress\";\n  const TOKEN_DECIMALS = 18;\n\n  const { conditionId } = await client.market.createMarket({\n    question: \"Will our DAO pass Proposal #42?\",\n    endTime: Math.floor(Date.now() / 1000) + 86400 * 14,\n    initialLiquidity: ethers.parseUnits(\"10000\", TOKEN_DECIMALS).toString(),\n    collateralToken: MY_TOKEN,\n  });\n\n  console.log(\"Market with custom token:\", conditionId);\n}\n```\n\n## Market Monitoring\n\n```typescript\nimport { PNPClient } from \"pnp-evm\";\n\nasync function monitorMarket(conditionId: string) {\n  const client = new PNPClient({\n    rpcUrl: process.env.RPC_URL || \"https://mainnet.base.org\",\n    privateKey: process.env.PRIVATE_KEY!,\n  });\n\n  const info = await client.market.getMarketInfo(conditionId);\n  const prices = await client.market.getMarketPrices(conditionId);\n  const isSettled = await client.redemption.isResolved(conditionId);\n\n  return {\n    question: info.question,\n    endTime: new Date(parseInt(info.endTime) * 1000),\n    yesPrice: prices.yesPricePercent,\n    noPrice: prices.noPricePercent,\n    reserve: info.reserve,\n    isSettled,\n  };\n}\n```\n\n## Batch Market Creation\n\n```typescript\nimport { PNPClient } from \"pnp-evm\";\nimport { ethers } from \"ethers\";\n\ninterface MarketConfig {\n  question: string;\n  durationHours: number;\n  liquidity: string;\n}\n\nasync function createBatchMarkets(configs: MarketConfig[]) {\n  const client = new PNPClient({\n    rpcUrl: process.env.RPC_URL || \"https://mainnet.base.org\",\n    privateKey: process.env.PRIVATE_KEY!,\n  });\n\n  const results = [];\n\n  for (const config of configs) {\n    const endTime = Math.floor(Date.now() / 1000) + config.durationHours * 3600;\n    const liquidity = ethers.parseUnits(config.liquidity, 6);\n\n    const { conditionId, hash } = await client.market.createMarket({\n      question: config.question,\n      endTime,\n      initialLiquidity: liquidity.toString(),\n    });\n\n    results.push({ question: config.question, conditionId, hash });\n    \n    // Wait between creations to avoid rate limits\n    await new Promise(r => setTimeout(r, 2000));\n  }\n\n  return results;\n}\n\n// Usage\nconst markets = await createBatchMarkets([\n  { question: \"Will BTC hit $100k in 2025?\", durationHours: 720, liquidity: \"100\" },\n  { question: \"Will ETH flip BTC by 2026?\", durationHours: 8760, liquidity: \"100\" },\n  { question: \"Will Solana TPS exceed 100k?\", durationHours: 2160, liquidity: \"50\" },\n]);\n```\n\n## Trading Bot Pattern\n\n```typescript\nimport { PNPClient } from \"pnp-evm\";\nimport { ethers } from \"ethers\";\n\nasync function simpleTradingStrategy(conditionId: string) {\n  const client = new PNPClient({\n    rpcUrl: process.env.RPC_URL || \"https://mainnet.base.org\",\n    privateKey: process.env.PRIVATE_KEY!,\n  });\n\n  // Get current prices\n  const prices = await client.market.getMarketPrices(conditionId);\n  const yesPrice = parseFloat(prices.yesPrice);\n\n  // Simple strategy: buy YES if price < 0.3, buy NO if price > 0.7\n  const tradeAmount = ethers.parseUnits(\"5\", 6);\n\n  if (yesPrice < 0.3) {\n    console.log(\"YES undervalued, buying...\");\n    await client.trading.buy(conditionId, tradeAmount, \"YES\");\n  } else if (yesPrice > 0.7) {\n    console.log(\"NO undervalued, buying...\");\n    await client.trading.buy(conditionId, tradeAmount, \"NO\");\n  } else {\n    console.log(\"No trade signal\");\n  }\n}\n```\n\nFile v1.0.0:references/use-cases.md\n\n# PNP Markets Use Cases\n\nPrediction markets are versatile infrastructure. Here are key use cases for AI agents.\n\n## 1. True Information Finance\n\nAggregate collective intelligence into probability estimates. Market prices reveal crowd beliefs about uncertain events.\n\n```typescript\n// Create market to discover sentiment probability\nawait client.market.createMarket({\n  question: \"Will positive sentiment about Project X exceed 70% this week?\",\n  endTime: Math.floor(Date.now() / 1000) + 86400 * 7,\n  initialLiquidity: ethers.parseUnits(\"100\", 6).toString(),\n});\n```\n\n**Applications:**\n- Crowdsource probability estimates on uncertain events\n- Discover collective beliefs about future outcomes\n- Gather market-based forecasts for decision making\n\n## 2. Token Utility & Engagement\n\nUse your project's token as collateral to drive utility and engagement.\n\n```typescript\nconst MY_TOKEN = \"0xYourTokenContractAddress\";\n\nawait client.market.createMarket({\n  question: \"Will we ship v2.0 by end of month?\",\n  endTime: Math.floor(Date.now() / 1000) + 86400 * 30,\n  initialLiquidity: ethers.parseUnits(\"1000\", 18).toString(),\n  collateralToken: MY_TOKEN,\n});\n```\n\n**Benefits:**\n- Create immediate utility for token holders\n- Drive engagement through prediction participation\n- Align community incentives with project outcomes\n\n## 3. Contests & Competitions\n\nRun prediction contests where participants compete by trading on outcomes.\n\n```typescript\nawait client.market.createMarket({\n  question: \"Which feature will get the most community votes: A, B, or C?\",\n  endTime: Math.floor(Date.now() / 1000) + 86400 * 7,\n  initialLiquidity: ethers.parseUnits(\"50\", 6).toString(),\n});\n```\n\n**Applications:**\n- Community prediction competitions\n- Gamified governance decisions\n- Tournament-style events\n\n## 4. Automated Market Making\n\nCreate markets programmatically based on data feeds or events.\n\n```typescript\nasync function createTrendingMarket(topic: string) {\n  const question = `Will \"${topic}\" remain trending for 24 hours?`;\n  \n  return await client.market.createMarket({\n    question,\n    endTime: Math.floor(Date.now() / 1000) + 86400,\n    initialLiquidity: ethers.parseUnits(\"25\", 6).toString(),\n  });\n}\n\n// Create markets based on trending topics\nfor (const topic of trendingTopics) {\n  await createTrendingMarket(topic);\n}\n```\n\n## 5. Conditional Decision Markets\n\nCreate markets to inform decisions based on predicted outcomes.\n\n```typescript\n// Market to inform product decision\nawait client.market.createMarket({\n  question: \"If we launch Feature X, will DAU increase by >20% in 30 days?\",\n  endTime: Math.floor(Date.now() / 1000) + 86400 * 45,\n  initialLiquidity: ethers.parseUnits(\"200\", 6).toString(),\n});\n```\n\n## 6. Event-Driven Markets\n\nCreate markets around specific events with known resolution dates.\n\n```typescript\n// Sports, elections, product launches, etc.\nawait client.market.createMarket({\n  question: \"Will Company X announce earnings above $5B on Q4 call?\",\n  endTime: earningsCallTimestamp,\n  initialLiquidity: ethers.parseUnits(\"500\", 6).toString(),\n});\n```\n\n## pAMM Virtual Liquidity Model\n\nThe PNP Protocol uses a **pAMM (Prediction AMM) virtual liquidity model** that ensures:\n\n1. **Smooth Tradeability**: Even with minimal initial liquidity\n2. **Self-Balancing**: Markets adjust through trading activity\n3. **Capital Efficiency**: Virtual liquidity amplifies real deposits\n4. **Fair Pricing**: Constant-product formula for price discovery\n\nThis makes it practical to create markets with relatively small initial liquidity while still providing good trading experiences.\n\nFile v1.0.0:scripts/package.json\n\n{\n  \"name\": \"pnp-markets-scripts\",\n  \"version\": \"1.0.0\",\n  \"type\": \"module\",\n  \"description\": \"CLI scripts for PNP Prediction Markets\",\n  \"scripts\": {\n    \"create\": \"npx ts-node create-market.ts\",\n    \"trade\": \"npx ts-node trade.ts\",\n    \"settle\": \"npx ts-node settle.ts\",\n    \"redeem\": \"npx ts-node redeem.ts\"\n  },\n  \"dependencies\": {\n    \"pnp-evm\": \"^0.1.2\",\n    \"ethers\": \"^6.0.0\"\n  },\n  \"devDependencies\": {\n    \"ts-node\": \"^10.9.0\",\n    \"typescript\": \"^5.0.0\",\n    \"@types/node\": \"^20.0.0\"\n  }\n}\n\nFile v1.0.0:scripts/tsconfig.json\n\n{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"node\",\n    \"esModuleInterop\": true,\n    \"strict\": true,\n    \"skipLibCheck\": true,\n    \"outDir\": \"./dist\"\n  },\n  \"include\": [\"*.ts\"],\n  \"exclude\": [\"node_modules\"]\n}","readmeExcerpt":"Skill: Create Prediction Markets 1.0.0 Owner: tariqsumatri82 Summary: Create, trade, and settle prediction markets on Base with any ERC20 collateral. Use when building prediction market infrastructure, running contests, crowdsourcing probability estimates, adding utility to tokens, or tapping into true information finance via market-based forecasting. Tags: latest:1.0.0 Version history: v1.0.0 | 2026-02-08T11:53:46.4","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"Need prediction markets?\n├─ Create market     → npx ts-node scripts/create-market.ts --help\n├─ Trade (buy/sell)  → npx ts-node scripts/trade.ts --help\n├─ Settle market     → npx ts-node scripts/settle.ts --help\n└─ Redeem winnings   → npx ts-node scripts/redeem.ts --help"},{"language":"bash","snippet":"export PRIVATE_KEY=<wallet_private_key>    # Required\nexport RPC_URL=<base_rpc_endpoint>         # Optional (defaults to public RPC)"},{"language":"bash","snippet":"npx ts-node scripts/create-market.ts \\\n  --question \"Will ETH reach $10k by Dec 2025?\" \\\n  --duration 168 \\\n  --liquidity 100"},{"language":"bash","snippet":"# Buy YES tokens\nnpx ts-node scripts/trade.ts --buy --condition 0x... --outcome YES --amount 10\n\n# Sell NO tokens  \nnpx ts-node scripts/trade.ts --sell --condition 0x... --outcome NO --amount 5 --decimals 18\n\n# View prices only\nnpx ts-node scripts/trade.ts --info --condition 0x..."},{"language":"bash","snippet":"# Settle as YES winner\nnpx ts-node scripts/settle.ts --condition 0x... --outcome YES\n\n# Check status\nnpx ts-node scripts/settle.ts --status --condition 0x..."},{"language":"bash","snippet":"npx ts-node scripts/redeem.ts --condition 0x..."}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: pnp-markets\ndescription: Create, trade, and settle prediction markets on Base with any ERC20 collateral. Use when building prediction market infrastructure, running contests, crowdsourcing probability estimates, adding utility to tokens, or tapping into true information finance via market-based forecasting.\n---\n\n# PNP Markets\n\nCreate and manage prediction markets on Base Mainnet with any ERC20 collateral token.\n\n## Quick Decision\n\n```\nNeed prediction markets?\n├─ Create market     → npx ts-node scripts/create-market.ts --help\n├─ Trade (buy/sell)  → npx ts-node scripts/trade.ts --help\n├─ Settle market     → npx ts-node scripts/settle.ts --help\n└─ Redeem winnings   → npx ts-node scripts/redeem.ts --help\n```\n\n## Environment\n\n```bash\nexport PRIVATE_KEY=<wallet_private_key>    # Required\nexport RPC_URL=<base_rpc_endpoint>         # Optional (defaults to public RPC)\n```\n\nFor production, use a dedicated RPC (Alchemy, QuickNode) to avoid rate limits.\n\n## Scripts\n\nRun any script with `--help` first to see all options.\n\n### Create Market\n\n```bash\nnpx ts-node scripts/create-market.ts \\\n  --question \"Will ETH reach $10k by Dec 2025?\" \\\n  --duration 168 \\\n  --liquidity 100\n```\n\nOptions: `--collateral <USDC|WETH|address>`, `--decimals <n>`\n\n### Trade\n\n```bash\n# Buy YES tokens\nnpx ts-node scripts/trade.ts --buy --condition 0x... --outcome YES --amount 10\n\n# Sell NO tokens  \nnpx ts-node scripts/trade.ts --sell --condition 0x... --outcome NO --amount 5 --decimals 18\n\n# View prices only\nnpx ts-node scripts/trade.ts --info --condition 0x...\n```\n\n### Settle\n\n```bash\n# Settle as YES winner\nnpx ts-node scripts/settle.ts --condition 0x... --outcome YES\n\n# Check status\nnpx ts-node scripts/settle.ts --status --condition 0x...\n```\n\n### Redeem\n\n```bash\nnpx ts-node scripts/redeem.ts --condition 0x...\n```\n\n## Programmatic Usage\n\n```typescript\nimport { PNPClient } from \"pnp-evm\";\nimport { ethers } from \"ethers\";\n\nconst client = new PNPClient({\n  rpcUrl: process.env.RPC_URL || \"https://mainnet.base.org\",\n  privateKey: process.env.PRIVATE_KEY!,\n});\n\n// Create market\nconst { conditionId } = await client.market.createMarket({\n  question: \"Will X happen?\",\n  endTime: Math.floor(Date.now() / 1000) + 86400 * 7,\n  initialLiquidity: ethers.parseUnits(\"100\", 6).toString(),\n});\n\n// Trade\nawait client.trading.buy(conditionId, ethers.parseUnits(\"10\", 6), \"YES\");\n\n// Settle (after endTime)\nconst tokenId = await client.trading.getTokenId(conditionId, \"YES\");\nawait client.market.settleMarket(conditionId, tokenId);\n\n// Redeem\nawait client.redemption.redeem(conditionId);\n```\n\n## Collateral Tokens\n\nUse any ERC20. Common Base Mainnet tokens:\n\n| Token | Address | Decimals |\n|-------|---------|----------|\n| USDC | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | 6 |\n| WETH | `0x4200000000000000000000000000000000000006` | 18 |\n| cbETH | `0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22` | 18 |\n\nCustom tokens add utility—holders can participate in your markets.\n\n## ERC20 Approvals\n\nBefore interacti"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn70jfw8xqy0vmfwfvk7brkz1180r73s\",\n  \"slug\": \"create-prediction-markets-1-0-0\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1770551626417\n}"},{"path":"references/api-reference.md","content":"# PNP SDK API Reference\n\nComplete API documentation for the PNP Protocol SDK.\n\n## Installation\n\n```bash\nnpm install pnp-evm ethers\n```\n\n## PNPClient\n\nMain entry point for all operations.\n\n```typescript\nimport { PNPClient } from \"pnp-evm\";\n\nconst client = new PNPClient({\n  rpcUrl: string,           // RPC endpoint (defaults to Base mainnet)\n  privateKey: string,       // Wallet private key\n  contractAddresses?: {     // Optional custom addresses\n    marketFactory: string,\n    usdcToken: string,\n    feeManager: string,\n  }\n});\n```\n\n## Market Module (`client.market`)\n\n### createMarket(params)\n\nCreate a new prediction market.\n\n```typescript\nconst { conditionId, hash, receipt } = await client.market.createMarket({\n  question: string,           // Prediction question\n  endTime: number,            // Unix timestamp when trading ends\n  initialLiquidity: string,   // Amount in wei\n  collateralToken?: string,   // ERC20 address (defaults to USDC)\n});\n```\n\n**Returns:**\n- `conditionId`: Unique market identifier\n- `hash`: Transaction hash\n- `receipt`: Full transaction receipt\n\n### getMarketInfo(conditionId)\n\nGet market details.\n\n```typescript\nconst info = await client.market.getMarketInfo(conditionId);\n// Returns:\n// {\n//   question: string,\n//   endTime: string,\n//   isCreated: boolean,\n//   isSettled: boolean,\n//   reserve: string,\n//   collateral: string,\n//   winningToken: string\n// }\n```\n\n### getMarketPrices(conditionId)\n\nGet current YES/NO token prices.\n\n```typescript\nconst prices = await client.market.getMarketPrices(conditionId);\n// Returns:\n// {\n//   yesPrice: string,        // e.g., \"0.65\"\n//   noPrice: string,         // e.g., \"0.35\"\n//   yesPricePercent: string, // e.g., \"65.00%\"\n//   noPricePercent: string,  // e.g., \"35.00%\"\n//   yesPriceRaw: string,\n//   noPriceRaw: string\n// }\n```\n\n### settleMarket(conditionId, winningTokenId)\n\nSettle a market with the winning outcome. Only callable by market creator after end time.\n\n```typescript\nconst winningTokenId = await client.trading.getTokenId(conditionId, \"YES\");\nconst result = await client.market.settleMarket(conditionId, winningTokenId);\n```\n\n## Trading Module (`client.trading`)\n\n### getTokenId(conditionId, outcome)\n\nGet the token ID for a specific outcome.\n\n```typescript\nconst yesTokenId = await client.trading.getTokenId(conditionId, \"YES\");\nconst noTokenId = await client.trading.getTokenId(conditionId, \"NO\");\n```\n\n### buy(conditionId, amount, outcome, minTokensOut?)\n\nBuy outcome tokens with collateral.\n\n```typescript\nimport { ethers } from \"ethers\";\n\nconst amount = ethers.parseUnits(\"10\", 6); // 10 USDC\nconst minTokensOut = 0n; // Slippage protection (0 = no limit)\n\nconst result = await client.trading.buy(\n  conditionId,\n  amount,\n  \"YES\",        // or \"NO\"\n  minTokensOut\n);\n```\n\n**Parameters:**\n- `conditionId`: Market identifier\n- `amount`: Collateral amount in wei\n- `outcome`: \"YES\" or \"NO\"\n- `minTokensOut`: Minimum tokens to receive (slippage protection)\n\n### sell(conditionId, amount, outcome, "},{"path":"references/examples.md","content":"# PNP Markets - Complete Examples\n\n## Full Market Lifecycle\n\n```typescript\nimport { PNPClient } from \"pnp-evm\";\nimport { ethers } from \"ethers\";\n\nasync function fullLifecycle() {\n  const client = new PNPClient({\n    rpcUrl: process.env.RPC_URL || \"https://mainnet.base.org\",\n    privateKey: process.env.PRIVATE_KEY!,\n  });\n\n  // 1. CREATE MARKET\n  console.log(\"Creating market...\");\n  const { conditionId, hash } = await client.market.createMarket({\n    question: \"Will our community reach 1000 members this month?\",\n    endTime: Math.floor(Date.now() / 1000) + 86400 * 7,\n    initialLiquidity: ethers.parseUnits(\"50\", 6).toString(),\n  });\n  console.log(\"Market created:\", conditionId);\n\n  // 2. CHECK PRICES\n  const prices = await client.market.getMarketPrices(conditionId!);\n  console.log(\"YES:\", prices.yesPricePercent);\n  console.log(\"NO:\", prices.noPricePercent);\n\n  // 3. BUY TOKENS\n  const buyAmount = ethers.parseUnits(\"10\", 6);\n  await client.trading.buy(conditionId!, buyAmount, \"YES\");\n  console.log(\"Bought YES tokens\");\n\n  // 4. SELL TOKENS (partial)\n  const sellAmount = ethers.parseUnits(\"2\", 18);\n  await client.trading.sell(conditionId!, sellAmount, \"YES\");\n  console.log(\"Sold some YES tokens\");\n\n  // 5. SETTLE (after endTime)\n  const winningTokenId = await client.trading.getTokenId(conditionId!, \"YES\");\n  await client.market.settleMarket(conditionId!, winningTokenId);\n  console.log(\"Market settled as YES\");\n\n  // 6. REDEEM\n  await client.redemption.redeem(conditionId!);\n  console.log(\"Winnings redeemed\");\n}\n```\n\n## Custom Token Collateral\n\n```typescript\nimport { PNPClient } from \"pnp-evm\";\nimport { ethers } from \"ethers\";\n\nasync function customTokenMarket() {\n  const client = new PNPClient({\n    rpcUrl: process.env.RPC_URL || \"https://mainnet.base.org\",\n    privateKey: process.env.PRIVATE_KEY!,\n  });\n\n  const MY_TOKEN = \"0xYourTokenAddress\";\n  const TOKEN_DECIMALS = 18;\n\n  const { conditionId } = await client.market.createMarket({\n    question: \"Will our DAO pass Proposal #42?\",\n    endTime: Math.floor(Date.now() / 1000) + 86400 * 14,\n    initialLiquidity: ethers.parseUnits(\"10000\", TOKEN_DECIMALS).toString(),\n    collateralToken: MY_TOKEN,\n  });\n\n  console.log(\"Market with custom token:\", conditionId);\n}\n```\n\n## Market Monitoring\n\n```typescript\nimport { PNPClient } from \"pnp-evm\";\n\nasync function monitorMarket(conditionId: string) {\n  const client = new PNPClient({\n    rpcUrl: process.env.RPC_URL || \"https://mainnet.base.org\",\n    privateKey: process.env.PRIVATE_KEY!,\n  });\n\n  const info = await client.market.getMarketInfo(conditionId);\n  const prices = await client.market.getMarketPrices(conditionId);\n  const isSettled = await client.redemption.isResolved(conditionId);\n\n  return {\n    question: info.question,\n    endTime: new Date(parseInt(info.endTime) * 1000),\n    yesPrice: prices.yesPricePercent,\n    noPrice: prices.noPricePercent,\n    reserve: info.reserve,\n    isSettled,\n  };\n}\n```\n\n## Batch Market Creation\n\n```typescript\nimport { PNPClien"},{"path":"references/use-cases.md","content":"# PNP Markets Use Cases\n\nPrediction markets are versatile infrastructure. Here are key use cases for AI agents.\n\n## 1. True Information Finance\n\nAggregate collective intelligence into probability estimates. Market prices reveal crowd beliefs about uncertain events.\n\n```typescript\n// Create market to discover sentiment probability\nawait client.market.createMarket({\n  question: \"Will positive sentiment about Project X exceed 70% this week?\",\n  endTime: Math.floor(Date.now() / 1000) + 86400 * 7,\n  initialLiquidity: ethers.parseUnits(\"100\", 6).toString(),\n});\n```\n\n**Applications:**\n- Crowdsource probability estimates on uncertain events\n- Discover collective beliefs about future outcomes\n- Gather market-based forecasts for decision making\n\n## 2. Token Utility & Engagement\n\nUse your project's token as collateral to drive utility and engagement.\n\n```typescript\nconst MY_TOKEN = \"0xYourTokenContractAddress\";\n\nawait client.market.createMarket({\n  question: \"Will we ship v2.0 by end of month?\",\n  endTime: Math.floor(Date.now() / 1000) + 86400 * 30,\n  initialLiquidity: ethers.parseUnits(\"1000\", 18).toString(),\n  collateralToken: MY_TOKEN,\n});\n```\n\n**Benefits:**\n- Create immediate utility for token holders\n- Drive engagement through prediction participation\n- Align community incentives with project outcomes\n\n## 3. Contests & Competitions\n\nRun prediction contests where participants compete by trading on outcomes.\n\n```typescript\nawait client.market.createMarket({\n  question: \"Which feature will get the most community votes: A, B, or C?\",\n  endTime: Math.floor(Date.now() / 1000) + 86400 * 7,\n  initialLiquidity: ethers.parseUnits(\"50\", 6).toString(),\n});\n```\n\n**Applications:**\n- Community prediction competitions\n- Gamified governance decisions\n- Tournament-style events\n\n## 4. Automated Market Making\n\nCreate markets programmatically based on data feeds or events.\n\n```typescript\nasync function createTrendingMarket(topic: string) {\n  const question = `Will \"${topic}\" remain trending for 24 hours?`;\n  \n  return await client.market.createMarket({\n    question,\n    endTime: Math.floor(Date.now() / 1000) + 86400,\n    initialLiquidity: ethers.parseUnits(\"25\", 6).toString(),\n  });\n}\n\n// Create markets based on trending topics\nfor (const topic of trendingTopics) {\n  await createTrendingMarket(topic);\n}\n```\n\n## 5. Conditional Decision Markets\n\nCreate markets to inform decisions based on predicted outcomes.\n\n```typescript\n// Market to inform product decision\nawait client.market.createMarket({\n  question: \"If we launch Feature X, will DAU increase by >20% in 30 days?\",\n  endTime: Math.floor(Date.now() / 1000) + 86400 * 45,\n  initialLiquidity: ethers.parseUnits(\"200\", 6).toString(),\n});\n```\n\n## 6. Event-Driven Markets\n\nCreate markets around specific events with known resolution dates.\n\n```typescript\n// Sports, elections, product launches, etc.\nawait client.market.createMarket({\n  question: \"Will Company X announce earnings above $5B on Q4 call?\",\n  endTime: earningsCallTimest"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Create, trade, and settle prediction markets on Base with any ERC20 collateral. Use when building prediction market infrastructure, running contests, crowdsourcing probability estimates, adding utility to tokens, or tapping into true information finance via market-based forecasting. Skill: Create Prediction Markets 1.0.0 Owner: tariqsumatri82 Summary: Create, trade, and settle prediction markets on Base with any ERC20 collateral. Use when building prediction market infrastructure, running contests, crowdsourcing probability estimates, adding utility to tokens, or tapping into true information finance via market-based forecasting. Tags: latest:1.0.0 Version history: v1.0.0 | 2026-02-08T11:53:46.4","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":930,"uniquenessScore":52,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T01:22:50.894Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}