|
2 | 2 |
|
3 | 3 | Use this workflow when the user wants to set up prediction market trading, fund the deposit wallet, quote/place orders, or manage Predict orders and positions. |
4 | 4 |
|
5 | | -Reference command syntax in `../references/predict.md`. |
| 5 | +Reference command syntax in `../references/predict.md`. Cross-chain funding: [bridge.md](bridge.md) (§ Fund prediction markets on Polygon). |
| 6 | + |
| 7 | +## End-to-end flow |
| 8 | + |
| 9 | +Typical order: |
| 10 | + |
| 11 | +1. One-time setup (if needed) — `predict setup`, credentials, approvals. |
| 12 | +2. Fund — ensure pUSD or USDC.e on Polygon; bridge from other chains when needed. |
| 13 | +3. Resolve market and outcome token ID. |
| 14 | +4. Quote and place. |
| 15 | +5. Manage orders/positions; close or cancel when the user asks to exit. |
| 16 | + |
| 17 | +Complete **funding before** heavy market search when the user already gave you an amount to trade. |
| 18 | + |
| 19 | +## Mandatory: Polygon USDC.e before `predict deposit` |
| 20 | + |
| 21 | +```bash |
| 22 | +mm-dev wallet balance --chain 137 --token 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 --json |
| 23 | +mm-dev wallet balance --chain 137 --token 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359 --json |
| 24 | +``` |
| 25 | + |
| 26 | +| Token | Polygon contract | Used by `predict deposit`? | |
| 27 | +| --- | --- | --- | |
| 28 | +| **USDC.e** (bridged) | `0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174` | **Yes** — wrap source for pUSD | |
| 29 | +| Native USDC (Circle) | `0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359` | **No** — balance here does not fund deposit | |
| 30 | + |
| 31 | +Required: USDC.e ≥ `--amount` (pUSD) + ~$1 POL on Polygon for gas. |
| 32 | + |
| 33 | +If USDC.e is too low: do **not** retry `predict deposit` in a loop — `execution reverted` usually means native USDC only or insufficient USDC.e. |
| 34 | + |
| 35 | +## Fund from another chain |
| 36 | + |
| 37 | +Polymarket predict uses Polygon (`137`). If USDC.e on the owner EOA is insufficient but USDC exists elsewhere, bridge before `predict deposit` (see [swap.md](swap.md), [bridge.md](../workflows/bridge.md)): |
| 38 | + |
| 39 | +```bash |
| 40 | +mm-dev wallet balance --chain 8453 --token USDC |
| 41 | +mm-dev swap quote --from USDC --to USDC --amount <amount> --from-chain 8453 --to-chain 137 |
| 42 | +mm-dev swap execute --quote-id <quote-id> |
| 43 | +mm-dev wallet balance --chain 137 --token 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 |
| 44 | +mm-dev predict deposit --amount <pUSD> --wait |
| 45 | +``` |
| 46 | + |
| 47 | +Use the chain ID where the wallet actually holds USDC (`8453` Base, `42161` Arbitrum, `1` Ethereum). Include slippage buffer in the bridge amount. Re-check USDC.e (`0x2791…`), not native USDC (`0x3c499…`), before depositing. |
6 | 48 |
|
7 | 49 | ## One-Time Setup |
8 | 50 |
|
|
0 commit comments