Polymarket
Fund a Polymarket account with pUSD on Polygon from any chain, in one signature.
A user on any chain tops up their Polymarket account. Their funds become pUSD on Polygon, paid straight into the Polymarket account (a proxy contract), ready to trade. They don't need MATIC, a bridge or a Polygon wallet.
At a glance
Destination
Polygon
Protocol
Uniswap SwapRouter02 0x68b34658…Fc45: USDC → pUSD (0xC011a7E1…2DFB), 0.01% pool
Bridged asset
Native Polygon USDC 0x3c499c…3359 (nep245:v2_1.omni.hot.tg:137_qiSt…L)
Output
pUSD in the user's Polymarket account (not the signing wallet)
Flow / fee
bridge-in · placeholder (EVM default) · fee paid in USDC
What the user does
Connects a wallet (EVM or Solana).
Pastes their Polymarket account address. On polymarket.com, hover the account icon to find it. The button stays disabled until the address is valid.
Picks a source token and amount, and chooses to send from the wallet or deposit via QR.
Clicks Deposit to Polymarket, signs, and approves the transfer.
Sees the account's pUSD balance update on success.
How it works
Preflight. The SDK resolves the user's Polygon intermediary and checks that no other execution is in flight.
Plan.
buildStepsruns withamount = '{MIN_AMOUNT_OUT}'. The Polymarket account goes inparams, because the SDK rejectsquote.recipienton a bridge-in.Create. Two steps. The destination is a token, so a step must call USDC: the
approvedoes.Sign. The origin wallet signs:
erc191for EVM,raw_ed25519for Solana.Deposit. The deposit address appears after signing, and the source token is sent there.
Bridge. NEAR Intents / 1Click delivers native USDC to the intermediary on Polygon.
Execute. The intermediary approves SwapRouter02, then calls
exactInputSingle(USDC → pUSD)withrecipient = Polymarket account. The service then appends its fee transfer in USDC.Settle. The SDK polls until
SUCCESS. The pUSD is already in the Polymarket account.
Why pay the account inside the swap? Under the placeholder strategy, the swap's output amount can't be known in advance, so a separate "transfer pUSD" step couldn't name an amount. Paying the recipient directly also leaves no dust in the intermediary.
The demo sets
amountOutMinimum = 0. Set a real minimum in production.
Core code
Recipe: approve, then swap to the user's account.
Plan and run:
Related
Recipes & fees: the destination-token and recipient rules
Hydrex: the same flow with a native destination
Last updated
