The
@Dune dbt migration is done. 287 models. 42 dashboards. All hourly. 🧵
Over the past several weeks — entirely outside my regular work hours — I migrated all 287 dbt models powering
@sparkfinance's analytics infrastructure on
@dune.
42 dashboards. All refreshing hourly. Production-grade. Done.
➢ What this means for Spark
@sparkfinance is one of the most data-driven protocol teams I've worked with. Data here directly informs protocol decisions — numbers need to be right before they're trusted, not after.
Over the past year I built 42
@Dune dashboards for
@sparkfinance from scratch — covering P&L, user behavior, and protocol-level analytics. The migration made all of that durable, maintainable, and accessible to the whole team — not just to me.
➢ What changed
Before: ~100K credits/month. Daily refresh. Logic living in my head.
After: Hourly refresh. Incremental models. Full dependency resolution. Every model QA'd against its legacy query before cutover.
And one net-new capability: EOH (end-of-hour) snapshots powering Time-Weighted Average P&L — capturing intraday rate spikes that daily snapshots miss entirely. Not possible before.
➢ What made it possible
@cursor_ai+
@claudeai +
@Dune MCP + a living SOP.
By the end: SOP v2.43. 31 dated incidents. Each one root-caused, traced to a specific query, documented, and encoded as a permanent guardrail before moving on.
No incident was closed until the root cause was understood. Not the symptom — the cause.
That patience is the only reason the pipeline is stable now.
Bug → rule → Cursor keeps it in Claude's context → fewer bugs per model.
The document became the system's memory.
➢ Why Dune made this possible
None of this works without
@dune's dbt + Trino stack.
Hourly incremental jobs on complex DeFi financials — per-user balances, multi-chain borrow rates, supply indices — at sustainable cost. That's not a given.
Thanks to
@kdotkrisp @onchain_ben @fr0zensun for the technical support throughout. 🙏
All data logic is now version-controlled in Git. Dune MCP closes the loop — AI can understand not just how the data is built, but how it's consumed in dashboards.
The goal was never to be the person who knows everything. It was to build a system that doesn't depend on any one person knowing anything.
That's what makes this valuable — the knowledge is in the system now, not in my head. Queryable by anyone on the team, or by AI directly.
287 models. Done. 🚀