> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqd.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Portal with Ponder

> Backfill Ponder indexers from SQD Portal while keeping Ponder handlers, schema, and realtime behavior.

<Info>
  The Portal integration for Ponder is in beta. Report bugs and feedback in the [portal-ponder issue tracker](https://github.com/subsquid-labs/portal-ponder/issues).
</Info>

`@subsquid/ponder` is a distribution of [Ponder](https://ponder.sh) that can fetch historical data from [SQD Portal](/en/portal/overview). It keeps Ponder's handlers, schema, virtual modules, database, API layer, and CLI.

Set `portal` on a chain to use its Portal dataset for historical backfill:

```ts theme={"system"}
import { createConfig } from "@subsquid/ponder";

export default createConfig({
  chains: {
    mainnet: {
      id: 1,
      rpc: process.env.PONDER_RPC_URL_1,
      portal: "https://portal.sqd.dev/datasets/ethereum-mainnet",
    },
  },
});
```

Portal serves the backfill as an ordered HTTP stream. Your RPC remains configured for realtime indexing, chain setup, `readContract`, and any interval beyond Portal's current finalized head.

## What changes

|                                | Stock Ponder | `@subsquid/ponder`                              |
| ------------------------------ | ------------ | ----------------------------------------------- |
| Historical backfill            | JSON-RPC     | SQD Portal, with RPC fallback at a finality gap |
| Realtime                       | JSON-RPC     | JSON-RPC by default                             |
| Chain setup and `readContract` | JSON-RPC     | JSON-RPC                                        |
| Handlers, schema, and CLI      | unchanged    | unchanged                                       |

The historical path supports logs, factories, transactions, receipts, traces, block intervals, and accounts. Dataset capabilities vary by network and block range. Check the [EVM network list](/en/data/evm) before migrating a source that needs traces or receipts.

## Why use it

In the repository's full-history Ethereum benchmark, the Portal-backed fork completed in **1,819 seconds** and stock Ponder completed in **6,543 seconds** over a metered RPC endpoint on the same host. The Portal run was **3.6x faster**.

A separate 15-chain Euler V2 run indexed **28,405,932 events in 51 minutes 47 seconds** against dedicated Portal capacity with zero external RPC calls. These are results from the published workloads, not a general speed estimate. See [Benchmarks and validation](/en/sdk/alternative-clients/ponder/benchmarks-and-validation) for the conditions and correctness evidence.

## Start here

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/en/sdk/alternative-clients/ponder/quickstart">
    Run the repository's Ponder and Portal example, then inspect its result.
  </Card>

  <Card title="Migrate an app" icon="arrow-right-arrow-left" href="/en/sdk/alternative-clients/ponder/guides/migrate">
    Move an existing Ponder app to the Portal-backed package.
  </Card>

  <Card title="Examples" icon="code" href="/en/sdk/alternative-clients/ponder/examples">
    Run factory, multichain, receipt, trace, block, and account sources.
  </Card>

  <Card title="Configuration" icon="sliders" href="/en/sdk/alternative-clients/ponder/configuration">
    Configure Portal access, memory, metrics, and experimental realtime.
  </Card>
</CardGroup>
