bullpen polymarket migrate-collateral¶
Last updated: May 29, 2026
Migrate stranded pUSD from your Safe wallet to your deposit wallet.
Usage¶
Live Help¶
Migrate stranded pUSD from your Safe wallet to your deposit wallet.
When `bullpen polymarket deploy-deposit-wallet` (or auto-recovery on a "maker address not allowed" rejection) flips your account to the deposit- wallet flow, any pUSD already on your old Safe proxy is left behind — trades route through the deposit wallet, but the collateral is in the Safe.
This command transfers your full Safe-held pUSD balance to your deposit wallet via a gasless Safe `execTransaction` through Polymarket's relayer (no MATIC required). Idempotent: running it after a successful migration (or on an account that never held Safe pUSD) is a no-op.
Usage: bullpen polymarket migrate-collateral [OPTIONS]
Options:
--output <OUTPUT>
Output format for command results
[possible values: table, json]
--yes
Skip the confirmation prompt
--env <ENV>
Target environment to connect to (overrides config.toml)
[env: BULLPEN_ENV=]
[possible values: staging, production]
--safe <ADDRESS>
Override the Safe wallet address. Use when Bullpen cannot resolve your legacy proxy (e.g. account-recovery edge cases) and the cached `polymarket_address` has been rewritten to the deposit wallet. Must be a 0x-prefixed Ethereum address
--config <CONFIG>
Path to a custom config.toml file (overrides $BULLPEN_CONFIG and the default location).
Explicit --config and BULLPEN_CONFIG paths fail closed: if the file is missing, the CLI exits validation instead of silently loading defaults. Credentials still resolve via BULLPEN_HOME, so set BULLPEN_HOME too when isolating a session.
--dry-run
Print the planned migration — Safe address, deposit wallet, balance, pUSD transfer calldata, and Safe `eth_call` simulation result — without submitting to the relayer. Useful for previewing the operation
--amount <AMOUNT>
Optional partial amount to migrate, in pUSD (6-decimal). When omitted, migrates the full balance. Useful for testing or for keeping some collateral on the source wallet
--include-usdc-e
Also wrap any Safe-held USDC.e to pUSD before migrating, in a single Safe execTransaction. Without this flag, USDC.e on the Safe is left behind. With this flag, USDC.e is wrapped (Onramp call) then the full pUSD balance (existing + just-wrapped) is transferred to the deposit wallet — all in one gasless batch. Idempotent: with no Safe USDC.e, behaves exactly like the no-flag form. Ignored when `--reverse` is set
--read-only
Enable read-only mode: blocks all mutating commands
--reverse
Reverse direction: move pUSD from your Deposit Wallet back to the legacy Safe (gasless via WALLET-batch relayer). Use this if you accidentally migrated to the Deposit Wallet, or if you want to consolidate all collateral on the Safe for multi-sig or other reasons. When set, `--include-usdc-e` is ignored and the `--safe` flag is required if Bullpen cannot resolve your legacy Safe automatically
--i-know-this-strands-funds-from-trading
Bypass the deployed-deposit-wallet strand guard when running `--reverse`. ONLY pass this if you understand that your Deposit Wallet is deployed and that both the web app and the CLI prefer it over the Safe — meaning funds moved to the Safe will be invisible to both surfaces until you run `migrate-collateral` (forward) to move them back
--non-interactive
Suppress interactive prompts; does NOT imply --yes for money-moving commands
[env: BULLPEN_NON_INTERACTIVE=]
-h, --help
Print help (see a summary with '-h')
EXAMPLES:
bullpen polymarket migrate-collateral --help
Show options for this command without signing, submitting, or changing state.
Example Commands¶
bullpen polymarket migrate-collateral [OPTIONS]
bullpen polymarket migrate-collateral --help
bullpen polymarket migrate-collateral --output json
JSON Output¶
Contract: JSON Output Contract.
This command supports --output json, but this generated reference page intentionally does not include a synthetic success schema or example.
Use the live command in your target environment to inspect command-specific success fields. Error output follows the shared JSON output contract linked above.
Error Envelope¶
When a Polymarket CLOB or gasless-relayer rejection coincides with a degraded Polymarket status page, the error envelope may include a polymarket_status object:
{
"polymarket_status": {
"page_status": "HASISSUES",
"status_url": "https://status.polymarket.com",
"affected_components": [
{"name": "CLOB API", "status": "PARTIALOUTAGE"}
],
"advisory": "Polymarket is experiencing issues; this rejection is most likely a Polymarket-side outage."
}
}
The field is omitted on local validation/auth/balance errors and when the status-page fetch times out or reports healthy relevant components.
Schema version: 1 when a command emits schema_version; otherwise treat the current command shape as contract version 1.
Stability¶
Patch releases may add nullable or optional fields. Minor releases may add required fields or increment schema_version. Major releases may remove or rename fields.