Ponder

/ponder-sh202

An open-source backend framework for crypto apps

Goal: By the end of 2025, even the largest Ponder app backfills will be fast enough to run in CI. Seconds or minutes, not hours or days.

It should feel like a build or reload, not a "backfill".
/Ponder
Ponder 0.9.3 adds a new event ordering strategy designed for low-latency apps that index 10+ chains.

The current ordering strategy is “omnichain” - events across all chains share a single queue, with blocks ordered by (block timestamp, chain ID, block number).
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/41d15452-e759-4462-f370-9003a922cb00/original
/Ponder
Introducing Ponder 0.9

We built a SQL-based alternative to GraphQL, with live query support and a TanStack Query integration.

Apps & websites that use Ponder for indexing are about to feel much faster →
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/eff4daa8-ba59-42ee-bce1-40b94705cd00/original
/Ponder
Fun debugging rabbit hole from this week.

Last week, a few Ponder users opened issues for an "invalid byte sequence for encoding "UTF8": 0x00" error. Most software ignores or removes null characters (\0, \x00, or \u0000), but the Postgres TEXT data type rejects them with that error.

We reproduced the issue with an ENS NameRegistered event log from 2022 (s/o @greg). Turns out, some EVM event logs contain null characters within decoded `string` parameter values.

Now, the framework removes null characters from all decoded ABI parameters before passing them to userland. We could have instead fixed this on the PG driver/Drizzle side, but it seemed more fragile (are we wrong?).

We're not certain why this only appeared recently - we haven't changed any relevant codepaths in recent releases. My best guess is that Viem used to remove them but stopped. Viem is a peer dep, so the version can change independently from Ponder's version.

PR: https://github.com/ponder-sh/ponder/pull/1414
/Ponder
Two of the top 20 built with ponder, possibly more
602
Jason Goldberg Ⓜ️ 💜
@betashop.eth·20:55 30/12/2024
these apps had the highest daily average # of transactions the past 7 days on Base

we're bringing the world onchain in 2025
/Ponder
Yes I have abandoned GraphQL despite supporting it in the past

/s (but not really)
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/cb2c0d2e-e71b-4798-ad00-f38215e13800/original
/Ponder
Introducing Ponder 0.8

Native transfer indexing, `ponder` NPM package, support for 16 new Viem actions, and a simpler pattern for Direct SQL →
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/0d9f27db-eede-42d1-ed90-ab0d5e76a300/original
/Ponder
Built with ponder - great execution of a data-intensive, realtime EVM app
/Ponder
The ponder client library will be very, very good

Write queries in your frontend codebase, type-safe with no codegen, realtime/reactive by default

Coming soon to a browser near you
/Ponder
We're hosting a Ponder holiday meetup in NYC next Thursday!

This is a developer-focused event for users, contributors and friends interested in crypto app development, TypeScript tooling, web frameworks, open-source, the holiday spirit, etc

Reply here or send me a DC if you'd like to join
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/85ce3a5b-e4e9-4bee-1ce5-96ec1443de00/original
/Ponder
Enjoyed working with @0age on this!

Most actors using The Compact need an indexer. It’s a great use case for Ponder - multichain, non-trivial indexing logic, 100% open-source

Use our endpoint (link in readme) or host an instance yourself
4262
0age
@0age·17:03 02/12/2024
open-sourced an indexer for The Compact built alongside the gigabrains at
ponder.sh: https://github.com/Uniswap/the-compact-indexer

very clutch for anyone building a frontend, tracking analytics, or running a filler or an allocator (link to hosted version in the README)

h/t @typedarray.eth @kjs
/Ponder
Just shipped 0.7.7 which adds a `totalCount` field to the GraphQL page type. This is actually pretty handy for some paginated UI patterns, and is also probably the fastest way to check how big the database is

https://github.com/ponder-sh/ponder/releases/tag/%40ponder%2Fcore%400.7.7
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/d252e763-e3e8-4e2b-d18d-c47dd843d900/original
/Ponder
Introducing Ponder 0.7

PGlite, Drizzle, raw SQL, portable table objects, and more. It’s our biggest release since 0.1 →
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/366e62ad-32df-4d01-1301-58867dfe1100/original
/Ponder
✅ shipping next week
651
Kevin
@typedarray.eth·16:01 13/08/2024
Should Ponder replace SQLite with PGlite (pglite.dev) as the dev database?

Pros:
1) Less magic/astonishment ("wait, what database am I using rn?")
2) Simpler schema definition API (currently stuck with the subset of stuff that both PG and SQLite support)
/Ponder
https://ponder.sh/docs/indexing/call-traces#register-an-indexing-function how does this work if you're trying to index eth xfrs to an EOA (or CREATE2 address that hasn't been deployed)?
New release! Ponder 0.6.0 improves observability, simplifies self hosting, and updates to the latest version of Viem.

- New /ready endpoint
- Terminal UI improvements (req/s, latest block)
- Better ETA formula
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/59e1b7de-cc58-4a97-57c3-a5bd4fd3c200/original
/Ponder
@typedarray.eth in what order do the events / call handlers execute in ponder?
biggest critique of ponder right now is the logging immediately jumps to the table and I can't scroll up to see any logs that I might have emitted from the indexing function bodies.

As a serial console.log debugger this is terrible 😩
Should Ponder replace SQLite with PGlite (pglite.dev) as the dev database?

Pros:
1) Less magic/astonishment ("wait, what database am I using rn?")
2) Simpler schema definition API (currently stuck with the subset of stuff that both PG and SQLite support)
/Ponder
This is my favorite weird edge case in our codebase. If you manage to crash a Ponder app with this error, I'll give you $100.

github.com/ponder-sh/ponder/blob/c19358158d3be13e0c8bab8450ba16ab3f71011d/packages/core/src/sync-store/postgres/store.ts#L222-L230
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/f94b3f0b-1880-4396-0ddd-59537282a200/original
/Ponder
You won't see it on GitHub, but it's a huge day here at Ponder HQ.
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/c1ae76c8-80ca-478f-cc4a-d63ae9223800/original
/Ponder
If you noticed "missing events" in your Ponder app recently, you may have been affected by this (rare) bug. Upgrade to 0.5.3 for the fix.

It's more common on low-throughput chains where bloom filters are mostly empty. S/o @kjs and Mateus - was a team effort!

https://x.com/devjoshstevens/status/1816567954521383339
/Ponder
Introducing API functions

With today's 0.5.0 release, you can build custom API endpoints directly in your Ponder app.

Use cases
- Replace GraphQL with tRPC or REST
- Build SQL queries with Drizzle
- Merge onchain & offchain data
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/66423d2c-1b7e-4d5f-b933-828a68efa900/original
/Ponder
We're hiring backend, infrastructure, and web framework engineers at Ponder (ponder.sh).

We have hundreds of production users, growing 40% per month.

NYC required. Team is 3 people, all engineers. DM with interest or referrals.
/Ponder
Anyone writing tests for your ponder indexer?

How are you doing it?
In solidity events uint256 types are returned as BigInts.

Is it best to convert these to strings when storing?
Not good to convert to int type?
/Ponder
Just got a project up and running in /ponder.

Really good dev experience so far!

Connects really well with Foundry too.
Just shipped a *very exciting* experimental feature in the Ponder telegram
/Ponder
Ponder is now 10-50x faster during historical indexing

0.4.37 introduces batched database writes & an in-memory cache for frequently accessed records

Apps that use a remote database will be much faster
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/78947e6a-d989-4007-f372-df73f5b9c600/original
/Ponder
Ponder 0.4.35 improves support for Foundry/Anvil

With a few lines of code, you can integrate Ponder with any Foundry development workflow using `forge script`

Build your indexer alongside your smart contracts, all on your local machine
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/8492e099-6553-47b4-efd6-fdd3774d7f00/original
/Ponder
New in Ponder: JSON columns

Use p.json() for
1) Solidity structs
2) Storing raw log/trace/receipt objects alongside application data
3) Any schema-less KV data

Include a custom TypeScript type to enjoy autocomplete + type checking across your app.
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/a8473b64-472f-4573-8ad1-ac351fb4f100/original
Shipped: Call trace indexing

This was a top requested feature from teams looking to migrate their subgraphs to Ponder.

Why use call traces?
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/87affe95-e882-4bf2-dfcc-fa53e18a3200/original
Ponder 0.4.16 introduces block indexing

Block indexing is great for cron / scheduled tasks:
- Read the latest price from an oracle contract every minute to build a price chart
- Aggregate data every hour to update protocol-wide statistics
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/00d63520-a5e9-46f9-eabb-2206f25f7600/original
Ponder 0.4.15 improves crash recovery behavior

Before, if a fully indexed app crashed (often due to a short-lived RPC reliability issue) it would need to reindex from scratch

Now, Ponder apps periodically checkpoint their indexing progress. After a crash, you can restart the app and it will pick up where it left off
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/3f844923-a115-4762-c44a-c4479dce8100/original
In the next version of Ponder, error logs for SQL constraint violations are more human-friendly
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/1200d613-bc69-4ea1-d454-44a0e2108800/original
0.4.9 adds support for transaction receipts and speeds up historical indexing by ~50%, thanks to @kjs

https://x.com/kyscott18/status/1782826942908997653
With today's release, Ponder runs on Windows via PowerShell and command prompt (cmd.exe).

Huge thanks to Mateus (not on FC yet) who found the key bug!

We’re also running the entire test suite on Windows runners in CI.
PR: github.com/ponder-sh/ponder/pull/806
https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/897d6192-c034-4d78-223d-8a716cf88f00/original
It's never been easier to build and self-host a custom EVM indexer

Docker, DigitalOcean, Railway, local - Ponder runs nearly anywhere, using web technologies you already know
https://i.imgur.com/W54H19Y.jpg
Ponder 0.4.0
- Better direct SQL experience
- Faster indexing for apps with >10 contracts
- New terminal UI
- Express -> Hono
- Fixed annoying "there is a newer version of the record" bug

Migration guide: ponder.sh/docs/migration-guide#040
>100 open-source Ponder apps on GitHub as of today

Underrated advantage of Ponder over closed-source providers or rolling your own indexer: You get dozens of high-quality example apps that you can fork, run locally, browse for best practices, etc

github.com/ponder-sh/ponder/network/dependents
https://i.imgur.com/L7pxOzc.png
This remains unsolved. I think it's impossible - if anyone wants to learn more about traces and double check my work, would gladly chat
651
Kevin
@typedarray.eth·16:34 28/03/2024
Fun `trace_` API problem:

Write a function that accepts a single trace object and returns a uint256 representing its execution index within the transaction.

The index doesn't need to be absolutely accurate, but when used as a sort key, it must accurately order _any_ subset of traces within one transaction.
Ponder Ship Week, Day 3: Cached indexing

Thanks to @kjs, Ponder now caches indexing progress across hot reloads and redeploys.

If you restart a fully cached app with no code changes, it goes live in ~2 seconds.

(1/6)
https://i.imgur.com/t7BvLEt.png
Ponder Ship Week, Day 2

New Viem Transports: `loadBalance` and `rateLimit`
https://i.imgur.com/LtC51Rf.png