- Go to app.safe.global
- Connect your wallet (the owner wallet whose private key you'll use)
- Select Polygon network
- Deploy a new Safe with:
- 1 owner (your trading wallet)
- Threshold: 1/1
- Record the Safe address → this is your
GNOSIS_SAFE_ADDRESS
- Bridge USDC to Polygon as USDCe (
0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174) - Send USDCe to your Safe address
- Recommended minimum: $100 for testing, scale up after verification
- Send a small amount of MATIC to the Safe address for settlement transaction gas
- ~5 MATIC is sufficient for extensive testing
The Safe must approve the CTF Exchange contract to spend USDCe on its behalf.
Option A: Via Safe Transaction Builder
- Open your Safe at app.safe.global
- Go to Apps → Transaction Builder
- Add a transaction:
- To:
0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174(USDCe) - ABI: ERC20
approve(address,uint256) - spender:
0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E(CTF Exchange) - amount:
115792089237316195423570985008687907853269984665640564039457584007913129639935(max uint256)
- To:
- Submit and confirm the transaction
Option B: Via Polymarket UI
- Connect your Safe wallet to polymarket.com
- The UI will prompt you to approve spending
CLOB API keys are IP-bound. Derive them from the same server or egress IP that will run execution.
ssh ubuntu@<INSTANCE_IP>
cd /opt/tradingbot
PRIVATE_KEY=0x... node scripts/derive-keys.jsCLOB_API_KEY=<your-api-key>
CLOB_API_SECRET=<your-secret>
CLOB_PASSPHRASE=<your-passphrase>
Add these to /opt/tradingbot/.env.
The first-run-setup.sh script automates this — it reads PRIVATE_KEY from .env, derives the keys, and updates the .env file automatically.
After completing all steps, your .env should have:
PRIVATE_KEY=0x... # Your wallet private key
GNOSIS_SAFE_ADDRESS=0x... # Safe address from step 1
CLOB_API_KEY=... # Derived in step 4
CLOB_API_SECRET=... # Derived in step 4
CLOB_PASSPHRASE=... # Derived in step 4
WALLET_ADDRESS=0x... # Optional: EOA to track in dashboard
POLYMARKET_PROXY_WALLET_ADDRESSES=0x...,0x...
CHAIN_HOLDINGS_EXTRA_TOKEN_IDS=123...,456...
For the dashboard, you can also set CHAIN_HOLDINGS_ADDRESSES as a comma-separated
label=address list when you want explicit EOA / Safe / Proxy labeling in the
on-chain holdings panel.