Developers

Deposits

Fund a Deposit Wallet either via a signed USDC.e permit on Polygon or by confirming a Relay bridge.

There are two ways to fund a Deposit Wallet. Pick one.

A. Sign a Polygon USDC.e permit + deposit intent

Use this when the user already has USDC.e on Polygon.

1. Provision the Deposit Wallet

Idempotent — safe to call every time:

POST /polymarket/wallet
{ "userAddress": "0x…" }
→ { "walletAddress": "0x… (the Deposit Wallet)", "approved": true, "clobReady": true, "isNew": false }

walletAddress is the EIP-2612 permit spender for the next step.

2. Get the deposit nonce and EIP-712 domain

GET /polymarket/nonce/{userAddress}
→ { "nonce": 0, "domain": { … }, "types": { "DepositIntent": [ … ] } }

3. Get the USDC.e permit domain

GET /polymarket/deposit-config
→ {
    "usdcAddress": "0x2791…",
    "chainId": 137,
    "maxLossPercent": 70,
    "usdcPermitDomain": {
      "name": "USD Coin (PoS)",
      "version": "1",
      "salt": "0x00…0089",               // bytes32(137) — used INSTEAD of chainId
      "verifyingContract": "0x2791…"
    }
  }

Polygon PoS USDC.e uses salt (not chainId) in its EIP-712 domain. Don't auto-fill the domain from the chain — read it from this endpoint.

4. Sign both messages

  • Permit(owner=user, spender=walletAddress, value=amount, nonce=usdc.nonces(user), deadline=...) against the usdcPermitDomain. Split into (v, r, s).
  • DepositIntent(userAddress, amount, nonce, deadline) against the Amplifi domain.

5. Submit the deposit

POST /polymarket/deposit
{
  "userAddress": "0x…",
  "amount": "10000000",          // base units = $10
  "nonce": 0,                    // from step 2
  "deadline": 1700000000,        // unix seconds for the Amplifi intent
  "signature": "0x…",            // DepositIntent signature
  "permit": {
    "spender":  "0x… (walletAddress from step 1)",
    "value":    "10000000",      // must equal amount
    "deadline": 1700000000,      // permit deadline (can differ)
    "v": 28, "r": "0x…", "s": "0x…"
  },
  "token": "USDC.e"              // optional; only "USDC.e" is allowed
}
→ { "depositId": 42, "amount": "10000000", "txHash": "0x…" }

The relayer runs permit + transferFrom + Onramp.wrap in one batch. Direct pUSD deposits are explicitly rejected by Polymarket's relayer call-filter.

B. Bridge from another chain via Relay

Bridge to USDC.e on Polygon to the Deposit Wallet, then confirm:

POST /polymarket/bridge/deposit-confirmed
{ "userAddress": "0x…", "txHash": "0x…" }
→ { "depositId": …, "amount": "10000000", "status": "SUCCESSFUL", "txHash": "0x…" }

The call is idempotent on (txHash, logIndex). Even if the integrator never makes this call, the next GET /polymarket/balance/{user} will read recent Transfer events to the wallet and reconcile (rate-limited to once per user per minute). The explicit call is faster.