-
Notifications
You must be signed in to change notification settings - Fork 0
Update workflows according to benchmarking tests #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,49 @@ | |
|
|
||
| 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. | ||
|
|
||
| Reference command syntax in `../references/predict.md`. | ||
| Reference command syntax in `../references/predict.md`. Cross-chain funding: [bridge.md](bridge.md) (§ Fund prediction markets on Polygon). | ||
|
|
||
| ## End-to-end flow | ||
|
|
||
| Typical order: | ||
|
|
||
| 1. One-time setup (if needed) — `predict setup`, credentials, approvals. | ||
| 2. Fund — ensure pUSD or USDC.e on Polygon; bridge from other chains when needed. | ||
| 3. Resolve market and outcome token ID. | ||
| 4. Quote and place. | ||
| 5. Manage orders/positions; close or cancel when the user asks to exit. | ||
|
|
||
| Complete **funding before** heavy market search when the user already gave you an amount to trade. | ||
|
|
||
| ## Mandatory: Polygon USDC.e before `predict deposit` | ||
|
|
||
| ```bash | ||
| mm-dev wallet balance --chain 137 --token 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 --json | ||
| mm-dev wallet balance --chain 137 --token 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359 --json | ||
| ``` | ||
|
|
||
| | Token | Polygon contract | Used by `predict deposit`? | | ||
| | --- | --- | --- | | ||
| | **USDC.e** (bridged) | `0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174` | **Yes** — wrap source for pUSD | | ||
| | Native USDC (Circle) | `0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359` | **No** — balance here does not fund deposit | | ||
|
Comment on lines
+26
to
+29
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we need to define, should work fine without this. |
||
|
|
||
| Required: USDC.e ≥ `--amount` (pUSD) + ~$1 POL on Polygon for gas. | ||
|
|
||
| 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. | ||
|
|
||
| ## Fund from another chain | ||
|
|
||
| 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)): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fitting to benchmarks. It should check wallet balance instead, giving option to swap and bridge. Fund from another chain is not accurate.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same for other SKILL file. |
||
|
|
||
| ```bash | ||
| mm-dev wallet balance --chain 8453 --token USDC | ||
| mm-dev swap quote --from USDC --to USDC --amount <amount> --from-chain 8453 --to-chain 137 | ||
| mm-dev swap execute --quote-id <quote-id> | ||
| mm-dev wallet balance --chain 137 --token 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 | ||
| mm-dev predict deposit --amount <pUSD> --wait | ||
| ``` | ||
|
|
||
| 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. | ||
|
|
||
| ## One-Time Setup | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check if pUSD is working? For me USDC.e was only working. Also, it can be swapped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah usdc.e is only working. I kept pusd thinking it worked for you
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you pUSD, you can directly transfer it to the deposit wallet