Description
polymarket wallet show derives the proxy wallet address locally via derive_proxy_wallet() (CREATE2), but the derived address does not match the actual proxy wallet assigned by Polymarket's backend.
Steps to Reproduce
-
Import a private key that was used to register on Polymarket web UI:
polymarket wallet import <key> --force
-
Check wallet info:
polymarket wallet show -o json
Returns proxy_address: 0x938C... (locally derived)
-
Query the actual profile from Polymarket API:
polymarket profiles get <address> -o json
Returns proxyWallet: 0x943F... (server-assigned, different)
-
Check balance:
polymarket clob balance --asset-type collateral -o json
Returns balance: "0" — because it queries the wrong proxy address.
-
Meanwhile, querying positions with the correct proxy address works:
polymarket data positions 0x943F... -o json
Returns actual open positions with correct values.
Root Cause
The CLI uses derive_proxy_wallet(address, chain_id) from the SDK to compute the proxy address via CREATE2. However, accounts created through the Polymarket web UI (e.g., via Magic Link / social login) may have a different proxy wallet assigned by the backend. The locally derived address and the server-assigned address diverge.
Impact
clob balance always returns 0 (queries wrong proxy)
clob create-order / market-order may fail or operate on wrong proxy
- Any authenticated CLOB command that relies on the derived proxy is broken for these accounts
Suggested Fix
- Query the actual proxy from the API: Use the
profiles get endpoint to fetch the real proxyWallet and cache it, instead of relying solely on local derivation.
- Allow config override: Add a
proxy_wallet field to config.json so users can manually specify their actual proxy address.
- Add a CLI flag: e.g.,
--proxy-wallet <address> as a global option.
Environment
- CLI version: v0.1.4
- OS: macOS (arm64)
- Signature type: proxy
- Chain: Polygon (137)
Description
polymarket wallet showderives the proxy wallet address locally viaderive_proxy_wallet()(CREATE2), but the derived address does not match the actual proxy wallet assigned by Polymarket's backend.Steps to Reproduce
Import a private key that was used to register on Polymarket web UI:
Check wallet info:
Returns proxy_address:
0x938C...(locally derived)Query the actual profile from Polymarket API:
Returns proxyWallet:
0x943F...(server-assigned, different)Check balance:
Returns
balance: "0"— because it queries the wrong proxy address.Meanwhile, querying positions with the correct proxy address works:
Returns actual open positions with correct values.
Root Cause
The CLI uses
derive_proxy_wallet(address, chain_id)from the SDK to compute the proxy address via CREATE2. However, accounts created through the Polymarket web UI (e.g., via Magic Link / social login) may have a different proxy wallet assigned by the backend. The locally derived address and the server-assigned address diverge.Impact
clob balancealways returns 0 (queries wrong proxy)clob create-order/market-ordermay fail or operate on wrong proxySuggested Fix
profiles getendpoint to fetch the realproxyWalletand cache it, instead of relying solely on local derivation.proxy_walletfield toconfig.jsonso users can manually specify their actual proxy address.--proxy-wallet <address>as a global option.Environment