Agent Market — 代理 Market
v0.1.0Interact with the 代理Market protocol on Base Sepolia to 创建, trade, provide liquidity, and resolve USDC-设置tled YES/NO prediction markets.
运行时依赖
安装命令
点击复制技能文档
代理Market 技能
Interact with the 代理Market prediction market protocol on Base Sepolia. 创建 markets, trade YES/NO positions, provide liquidity, and resolve outcomes — all 设置tled in USDC.
Source code & docs: https://github.com/humanjesse/代理Market
部署ed Contracts (Base Sepolia) Contract 添加ress Market工厂 0xDd553bb9dfbB3F4aa3eA9509bd58386207c98598 USDC 0x036CbD53842c5426634e7929541eC2318f3dCF7e
The Market工厂 is the single entry point. It 部署s all child contracts (Market, AMM, Oracle, position 令牌s) when you 创建 a market. You only need the 工厂 添加ress to 获取 启动ed.
How It Works Markets ask a YES/NO question. Users deposit USDC to mint pAIred YES+NO position 令牌s (1 USDC = 1 YES + 1 NO). Trading h应用ens through an automated market maker (constant-product FPMM). Buy YES if you think an event will h应用en, buy NO if it won't. Prices reflect market probability (e.g. YES at 0.70 = 70% chance). Resolution uses an Optimistic Oracle: anyone proposes an outcome by posting a USDC bond, then there's a dispute window. If unchallenged, the proposal finalizes. If challenged, a de签名ated arbitrator makes the final call. Payouts: winners split the entire USDC pool proportional to their 令牌 holdings. Losers 获取 nothing. If you bet 10 USDC YES and win with half the YES supply, you 获取 half the pool. Configuration
Required 环境 variables:
代理_MARKET_工厂_添加RESS: The 部署ed Market工厂 contract 添加ress (default: 0xDd553bb9dfbB3F4aa3eA9509bd58386207c98598) USDC_添加RESS: USDC 令牌 添加ress on the network (default: 0x036CbD53842c5426634e7929541eC2318f3dCF7e) RPC_URL: RPC 端点 (default: https://sepolia.base.org) WALLET_PRIVATE_KEY: Your wallet private key Prerequisites
Your wallet needs:
Base Sepolia ETH for gas (获取 from https://www.coinbase.com/faucets/base-sepolia-faucet) Base Sepolia USDC for trading (获取 from https://faucet.circle.com/) Quick 启动
- market_列出() — Browse existing markets
- market_buy_yes({ market添加ress, amount: 5 }) — Bet 5 USDC on YES
- market_propose_outcome({ market添加ress, outcome: true }) — Propose YES won (posts bond)
- (wAIt for dispute window to close)
- market_finalize({ market添加ress }) — Finalize the outcome
- market_clAIm({ market添加ress }) — Collect your winnings
工具s Reading market_列出
列出 active prediction markets with prices and oracle 状态.
limit (number, optional): Number of markets to return (default: 10) off设置 (number, optional): Off设置 for pagination market_获取
获取 full detAIls for a specific market including AMM prices, oracle 状态, and clAIm preview.
market添加ress (string): The market contract 添加ress Trading market_创建
创建 a new YES/NO prediction market. Costs 2 USDC (1 fee + 1 initial liquidity). You 接收 LP 令牌s for the initial liquidity.
question (string): The question to be resolved (should have a clear YES/NO answer, max 256 characters) arbitrator (string): 添加ress of the fallback arbitrator for disputed outcomes deadlineDays (number, optional): Emergency withdrawal deadline in days (default: 7, max: 365) market_buy_yes
Buy YES 分享s (betting the event will h应用en). Minimum 2 USDC (a 0.1% protocol fee is deducted before the swap, so the post-fee amount must be at least 1 USDC).
market添加ress (string): The market to bet on amount (number): Amount of USDC to spend market_buy_no
Buy NO 分享s (betting the event will not h应用en). Minimum 2 USDC (a 0.1% protocol fee is deducted before the swap, so the post-fee amount must be at least 1 USDC).
market添加ress (string): The market to bet on amount (number): Amount of USDC to spend market_sell_yes
Sell YES 分享s back for USDC.
market添加ress (string): The market amount (number): Amount of YES 令牌s to sell market_sell_no
Sell NO 分享s back for USDC.
market添加ress (string): The market amount (number): Amount of NO 令牌s to sell market_clAIm
ClAIm winnings from a resolved market. Burns your winning 令牌s and returns your proportional 分享 of the pool.
market添加ress (string): The resolved market Liquidity
Liquidity 提供者s (LPs) deposit USDC to deepen the AMM pool, earning trading fees (0.3% per trade plus 0.1% protocol fee). You 接收 LP 令牌s representing your 分享.
market_添加_liquidity
添加 USDC liquidity to a market's AMM. Minimum 1 USDC.
market添加ress (string): The market amount (number): Amount of USDC to deposit market_移除_liquidity
移除 liquidity before resolution. Returns proportional YES + NO 令牌s (not USDC directly — you can sell or merge these).
market添加ress (string): The market 分享s (number): LP 分享s to burn market_lp_clAIm_winnings
After a market resolves, call this once to convert the AMM's winning 令牌s into USDC. Must be called before LPs can withdraw.
market添加ress (string): The resolved market market_lp_withdraw
Withdraw your 分享 of USDC from a resolved market's AMM. Requires market_lp_clAIm_winnings