<!-- tempo-docs-context -->
> Source: [/docs/guide/bridge-bungee](https://tempo.xyz/developers/docs/guide/bridge-bungee.md)
> Section: [Partners](https://tempo.xyz/developers/docs/partners.md). Find wallet providers, bridges, RPC infrastructure, data services, and other third-party integrations.
> [Documentation index](https://tempo.xyz/developers/llms.txt) · [Docs skill](https://tempo.xyz/developers/SKILL.md)

> Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation.
> If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.xyz/developers/llms.txt) and Markdown pages directly.

# Bridging stablecoins with Bungee

Bungee's legacy API has been replaced by the [Socket Swap V3 API](https://docs.socket.tech/integrate/migration-guide). Use Socket to quote a transfer between Tempo and another network, submit the source transaction, and track delivery. Tempo's chain ID is **`4217`**.

:::warning[Bungee API migration]
The `public-backend.bungee.exchange/api/v1` endpoints return `410 Gone`. Socket V3 uses new endpoints and response fields; changing the hostname alone is insufficient. Follow the [migration guide](https://docs.socket.tech/integrate/migration-guide) for existing integrations.
:::

## How Bungee Deposit works

The Socket deposit flow has five steps:

1. Request `/v3/swap/quote` with `userOps=deposit` and a `refundAddress`.
2. Select a route from `result.routes` and save its `quoteId`.
3. If `activationRequired` is `true`, activate the route before showing deposit instructions.
4. Submit the activated route's source transaction, or display its deposit instructions.
5. Track `/v3/swap/status` with `quoteId` until delivery or a terminal failure.

See [Socket's deposit guide](https://docs.socket.tech/integrate/integration-guides/deposit-addresses). Route availability depends on the source chain, token, amount, and destination.

## Common tokens

Use the [Tempo token list](https://tempo.xyz/developers/docs/quickstart/tokenlist) for verified network and token metadata. Query Socket's token list and request a quote to check which assets the selected route supports.

| Asset | Tempo Mainnet address |
| --- | --- |
| OUSD | `0x20c0000000000000000000006a37da5c996874be` |
| pathUSD | `0x20c0000000000000000000000000000000000000` |
| USDC.e | `0x20c000000000000000000000b9537d11c60e8b50` |
| USDT0 | `0x20c00000000000000000000014f22ca97301eb73` |

A token appearing in Tempo's registry does not guarantee a Socket route for it.

<span id="api-endpoints" />

## Socket API access

For local prototyping, Socket documents `https://public-backend.socket.tech`. Production backends use `https://dedicated-backend.socket.tech` with `x-api-key` and `affiliate` headers. Request access and choose the endpoint in [Socket's API access guide](https://docs.socket.tech/integrate/get-api-access).

| Operation | Path |
| --- | --- |
| Supported chains | `GET /v3/swap/supported-chains` |
| Token list | `GET /v3/swap/tokens/list?chainIds=4217&list=full` |
| Deposit quote | `GET /v3/swap/quote?userOps=deposit&...` |
| Activate a preview route | `POST /v3/swap/quote/{quoteId}/activate` |
| Transfer status | `GET /v3/swap/status?quoteId=...` |

The examples below use production backend credentials. Set `SOCKET_API_KEY` and `SOCKET_AFFILIATE_ID` in your backend environment; keep the key out of browser code.

## Bridge to Tempo

<span id="using-the-bungee-app" />

<span id="using-curl--cast-foundry" />

This example requests a deposit route from native USDC on Base to USDC.e on Tempo. Set `SOURCE_ADDRESS` and `TEMPO_RECIPIENT` to the sender and destination addresses.

:::steps
### Get a deposit quote

`inputAmount=1000000` is one USDC in base units. The quote determines the amount received after fees.

```bash
curl --fail-with-body -G https://dedicated-backend.socket.tech/v3/swap/quote \
  -H "x-api-key: $SOCKET_API_KEY" -H "affiliate: $SOCKET_AFFILIATE_ID" \
  --data-urlencode "userOps=deposit" \
  --data-urlencode "originChainId=8453" --data-urlencode "destinationChainId=4217" \
  --data-urlencode "inputToken=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913" \
  --data-urlencode "outputToken=0x20c000000000000000000000b9537d11c60e8b50" \
  --data-urlencode "inputAmount=1000000" --data-urlencode "userAddress=$SOURCE_ADDRESS" \
  --data-urlencode "receiverAddress=$TEMPO_RECIPIENT" --data-urlencode "refundAddress=$SOURCE_ADDRESS"
```

Select a route from `result.routes`. Check its output amount, token, recipient, and expiry, then store `quoteId` as `QUOTE_ID`.

### Activate the route when required

If `activationRequired` is `true`, obtain the final transaction and deposit instructions:

```bash
curl --fail-with-body -X POST \
  "https://dedicated-backend.socket.tech/v3/swap/quote/$QUOTE_ID/activate" \
  -H "x-api-key: $SOCKET_API_KEY" -H "affiliate: $SOCKET_AFFILIATE_ID"
```

Use the activated route for the remaining steps. If `activationRequired` is `false`, the quote already contains those instructions.

### Submit the source-chain transaction

Use the returned `txData` for the selected source network. Follow any returned approval requirements before submitting. For a manual deposit UI, display `depositData` exactly as returned, including its address, token, amount, chain, and any memo.

Wait for a successful source receipt. Source confirmation is separate from delivery on Tempo.

### Track status

```bash
curl --fail-with-body \
  "https://dedicated-backend.socket.tech/v3/swap/status?quoteId=$QUOTE_ID" \
  -H "x-api-key: $SOCKET_API_KEY" -H "affiliate: $SOCKET_AFFILIATE_ID"
```

Read `result.status`. `COMPLETED` means delivery succeeded. Stop on `FAILED`, `EXPIRED`, or `REFUNDED`; show the outcome rather than crediting a destination payment. Handle `REFUNDING`, `REFUND_FAILED`, and `MANUAL_REVIEW_REQUIRED` as refund or support states. Poll at the returned interval and set a timeout.
:::

## Bridge from Tempo

Request a new quote with `originChainId=4217`, the Tempo input token, and your destination chain and token. Set `refundAddress` to the sender's Tempo address. Activate when required, submit the returned Tempo transaction, and track the same `quoteId`.

Preserve any memo in the deposit instructions. Tempo pays transaction fees in a supported stablecoin; leave enough balance for fees when the bridge spends that same token.

## Using TypeScript (viem)

For an EVM transaction response, Socket's current API represents calldata as `route.txData.object`. Use the activated route and a Viem client configured for its source chain. Complete any `route.approval` first.

```ts
if (route.txData.kind !== 'evm_tx') throw new Error('Expected an EVM route')
const tx = route.txData.object
if (tx.chainId !== walletClient.chain.id) throw new Error('Wrong source chain')
const hash = await walletClient.sendTransaction({
  to: tx.to, data: tx.data, value: BigInt(tx.value),
})
const receipt = await publicClient.waitForTransactionReceipt({ hash })
if (receipt.status !== 'success') throw new Error('Source transaction failed')
```

Use a [Tempo client](https://tempo.xyz/developers/docs/accounts/examples) when Tempo is the source. See the [Socket API reference](https://docs.socket.tech/api-reference/swap/get-quotes) for full response types and the [integration guide](https://docs.socket.tech/integrate/integration-guides/socket-api) for approval and execution handling.

## Production checklist

* Keep production API keys on your backend.
* Validate source and destination networks, token contracts, recipients, amount, and expiry before signing.
* Persist `quoteId` and any `server-req-id` for status checks and support.
* Distinguish source confirmation, destination delivery, refund, and failure.
* Requote expired routes and display a returned deposit memo when one is required.

## Further reading

* [Bungee to Socket V3 migration](https://docs.socket.tech/integrate/migration-guide)
* [Socket deposit addresses](https://docs.socket.tech/integrate/integration-guides/deposit-addresses)
* [Socket API access](https://docs.socket.tech/integrate/get-api-access)
* [Fund an account on Tempo](https://tempo.xyz/developers/docs/guide/getting-funds)
