DeFi Attribution: A Growth Marketer's ROI Framework
How to connect off-chain campaigns to on-chain wallet behavior. A 4-layer DeFi attribution framework with tool comparisons and an automated reporting architecture.
By Gabriel Mangabeira — Published 2026-05-19
Last quarter I asked every protocol I worked with the same question: "Where did your last 100 on-chain users actually come from?"
Not one team gave me a specific answer. They had Discord member counts, GA4 sessions, KOL click reports, Twitter follower growth. None of it traced to a wallet. By the time a user completed their first on-chain transaction, the acquisition source was gone.
This is the problem. Web2 attribution tools lose the trail the moment a user hits the wallet connect screen. Fixing it requires a different model — not a different dashboard. This article covers why the break happens, the three methods that actually work, and how to know if your current stack is doing its job.
For the broader growth stack this layer sits inside, see the Web3 Growth Marketer's DeFi Playbook.
Why Web2 Attribution Breaks in DeFi
Web2 attribution makes one foundational assumption: a user has a persistent identity from first touch to conversion. An email address. A cookie. Every step in the funnel is trackable because the identity persists across sessions.
Web3 breaks that assumption at three specific points.
Break point 1: Email replaced by wallet connect. In DeFi, users connect a wallet — no email, no persistent ID you control. Every click and session before that event is orphaned.
Break point 2: Session tracking ends at the on-chain action. GA4 follows a user from session through form fill through conversion. It cannot follow any on-chain transaction. You see the session that preceded the wallet connect. You don't see what happened after.
Break point 3: UTMs don't survive the wallet. UTM parameters work right up to the wallet connect event. After that, there's no persistent tracking mechanism. The parameter disappears.
Key Insight
DeFi attribution isn't a tool problem. It's an identity model problem. The wallet address is the identity anchor — and you only learn it if your front end captures it at the connect event. Every analytics dashboard you buy is built on the wrong assumption until you fix the model underneath it.
Protocols that close this gap first build a compounding advantage. Every campaign becomes sharper. Every channel decision is defensible. If you want to understand how this gap emerged, see Web2 vs Web3 Marketing: Why Ownership Beats Attention.
The 3 Attribution Methods, Ranked
After testing six tools while building an attribution stack for a DeFi protocol in Q4 2025, four hit the same wall: they either dropped the trail at wallet connect or couldn't connect the on-chain action back to an acquisition source. Two approaches produced usable data. A third rounds out the picture for behavioral analysis.
| Method | Dev Effort | Accuracy | Tools | Best for |
|---|---|---|---|---|
| UTM-to-Wallet Bridge | Low | Medium | Spindl, Cookie3 | Start here. Front-end campaigns. |
| SIWE + Event Tracking | High | High | Formo | Mature protocols with dev resources. |
| Cohort Forensics | Medium | Low (source) | Dune Analytics | Behavioral patterns, post-airdrop QA. |
Method 1: UTM-to-Wallet Bridge. Capture the UTM parameter at the moment of wallet connect and map it to the wallet address. That connection lives in your database. When that wallet transacts, you trace the action back to the acquisition source. Lowest dev overhead — start here.
Method 2: SIWE + Custom Event Tracking. Sign-In with Ethereum (SIWE) links the wallet to a verified session. Custom events then fire at each significant action (stake, swap, deposit) with the wallet address attached. Highest accuracy, but requires dev resources and product instrumentation. The fix lives in your front end, not your analytics dashboard.
Method 3: Cohort-Based Forensics. Export wallet addresses during a specific campaign window and run Dune queries to see how those wallets behaved on-chain. Low accuracy for source attribution, high accuracy for behavioral patterns. Particularly useful for post-airdrop analysis: were airdrop recipients real users or extractors?
The honest takeaway
Attribution in Web3 isn't a marketing tool problem. It's a product instrumentation problem. If your growth team is building an attribution stack without touching the product codebase, you'll hit the same walls I did.
Community-to-Chain: Closing the Discord Gap
The most common question from growth teams at post-PMF protocols: "We have 30,000 Discord members. How many are actually using the protocol on-chain?"
Discord shows membership — not conversions. A member who joined via a giveaway and a member who became a liquidity provider look identical in your community dashboard. On-chain, they're completely different users.
The key diagnostic is the ratio of active community members to active on-chain wallets over the same 30-day window. If community membership grows 20% while on-chain wallets grow 2%, you're building an audience, not a user base.
The Web3 Email vs Discord vs Telegram breakdown covers when each channel produces wallets and when it produces noise.
Warning
Don't optimize for the ratio by cutting inactive community members. That inflates the metric without improving growth. You want both numbers growing — with on-chain growing faster.
The Attribution Agent: Architecture and What It Automates
Once your data layer is in place, the reporting cycle can be fully automated. The goal: a scheduled agent that pulls wallet acquisition data by source, computes week-over-week changes, flags anomalies, and posts a summary to Slack — no human trigger needed.
The architecture has four components:
Dune query reads from your contract's event logs, groups wallet first-transactions by acquisition source tag, and computes 7-day and 28-day rolling counts.
The agent compares each source bucket's current week to the prior 4-week rolling average. Flags sources deviating more than 25% above or below baseline.
Formats flagged anomalies as a Slack summary: source name, current count, 4-week average, percentage change. One line per flagged source.
Runs every Monday morning. No manual trigger. Multi-chain and aggregator traffic require additional handling — covered in the deployment guide.
One important constraint: the agent handles data movement and anomaly detection. It cannot close instrumentation gaps. If your front end isn't capturing UTMs at wallet connect, the agent has nothing to analyze. Get the data layer right first. Then automate the reporting.
Get the full stack, ready to deploy
The Dune SQL query, Claude Code agent template, Slack output formatter, and front-end UTM capture snippet — packaged as a GitHub repo you can clone and configure in an afternoon.
Get the Attribution Starter Kit →The 4 Weekly Reports: What to Track
Four reports give you a complete weekly view of whether your growth spend is producing the user behavior your protocol needs. The mock below shows what each panel should surface — the DeFi Growth KPI Stack covers the metric definitions in full.
Attribution Dashboard
Week of May 26, 2026
1 · Wallet Acquisition by Source
Watch: untagged % — high = instrumentation gap.
2 · TVL Inflow by Source
KOL drove 37% of wallets but only 20% of TVL.
3 · Retention Cohort by Channel
| Source | 7d | 30d | 90d |
|---|---|---|---|
| community | 71% | 45% | 28% |
| kol_campaign | 38% | 12% | 4% |
| organic | 62% | 39% | 22% |
KOL cohort 30d retention is 3.7× worse than community.
4 · Cost Per Qualified Wallet
Qualified = wallet completing a target action within 30 days.
Report 4 — cost per qualified wallet — is the hardest to build and the most useful to show leadership. Define "qualified" as a wallet completing a target action (first stake, first liquidity deposit, first governance vote) within 30 days. Total channel spend divided by qualified wallets from that channel. Once you have this number per channel, every budget decision has a data anchor.
Self-Check: Find Your Attribution Gap
Read each question. If your answer is No, expand it — you'll see exactly what to fix before moving to the next step. Work top to bottom.
1. Can you identify the acquisition source of your last 10 on-chain transactions? (If No, expand)
Gap: No source tagging in place
Your front end isn't capturing UTMs at wallet connect or writing source tags to calldata. Every dashboard you add on top of this gap produces theater, not signal.
Fix first: Implement UTM-to-wallet bridge (Spindl or Cookie3, low dev effort). Stop here until transactions show source tags in Dune.
2. Is less than 30% of your on-chain transaction volume untagged? (If No, expand)
Gap: Instrumentation coverage too low
High untagged volume means most of your acquisition data is invisible. UTM capture is working partially but breaking on returning wallets, direct on-chain users, or aggregator routes.
Fix first: Audit your UTM-to-wallet capture for the main breakage points — returning wallets and aggregator traffic. Target under 30% untagged before building reports on top.
3. Do you know the 30-day retention rate for each acquisition channel? (If No, expand)
Gap: Data exists, reporting doesn't
You have source-tagged transactions but no cohort tracking. You can see where wallets came from — you can't yet see whether they stayed. This is where most protocols are stuck.
Fix next: Build Report 3 (Retention Cohort by Channel) in Dune. This is the single most valuable report for budget allocation decisions.
4. Can you calculate cost per qualified wallet for at least two channels? (If No, expand)
Gap: No ROI anchor for budget decisions
You have retention data but no cost layer. Budget allocation is still based on volume metrics (wallet count, TVL) rather than efficiency (cost per qualified wallet). You're optimizing for scale, not quality.
Fix next: Define "qualified" (wallet completing a target action in 30 days), pull channel spend, divide by qualified wallets per channel. Even a rough estimate changes how you allocate budget.
5. Does someone on your team own attribution end-to-end — from front-end instrumentation through weekly reporting? (If No, expand)
Gap: No owner, no shipping
Attribution requires three distinct pieces: front-end instrumentation (product), Dune query writing (data or growth), and budget decisions (marketing leadership). When no one owns all three, nothing ships.
Fix: Name one person responsible for the full loop. If that's you, the 4-report dashboard in this article is your weekly template.
If you answered Yes to all five
Your attribution foundation is solid. The next step is SIWE + custom event tracking for product-level attribution — connecting individual on-chain actions (stake, swap, governance vote) directly to acquisition source. That's the precision layer covered in the Attribution Starter Kit.
Frequently Asked Questions
How do you measure DeFi marketing ROI?
Track cost per qualified wallet (CPQW): total channel spend divided by wallets that completed a target on-chain action within 30 days. This requires front-end instrumentation to capture acquisition source at wallet connect, a definition of "qualified" tied to a meaningful transaction, and a Dune query to pull wallet-level behavior data. Without all three, ROI calculations are based on proxy metrics that don't map to on-chain outcomes.
What's the best DeFi attribution tool?
It depends on dev capacity. Spindl and Cookie3 (UTM-to-wallet bridge) are the lowest-effort starting point. Formo (SIWE + event tracking) gives higher accuracy but requires more front-end integration. Dune Analytics is free and works for behavioral cohort analysis but can't attribute individual wallet sources. Start with Method 1, layer in Dune once you have baseline data.
How does Web3 attribution differ from Web2?
Web2 tracks a persistent identity (email or cookie) across the full conversion funnel. Web3 breaks that at three points: wallet connect replaces email capture, session tracking ends at the on-chain action, and UTMs don't survive the wallet connect screen. The identity anchor in Web3 is the wallet address — and you only learn it if your front end captures it at connect.
Can AI agents automate DeFi attribution reporting?
Yes, once the data layer is in place. An agent can run a Dune query on schedule, compute week-over-week changes by source tag, flag anomalies, and post a Slack summary — no human trigger needed. The constraint: agents handle data movement and detection. They can't close instrumentation gaps. Get the front end right first.
References
- Spindl: on-chain attribution platform — spindl.xyz
- Formo: SIWE-based analytics — formo.so
- Cookie3: Web3 marketing analytics — cookie3.co
- Dune Analytics: on-chain SQL analytics — dune.com
- Web3 Email vs Discord vs Telegram
- DeFi Growth KPIs: What Replaces TVL
- Web2 vs Web3 Marketing: Why Ownership Beats Attention
- The Web3 Growth Marketer's DeFi Playbook
Want the attribution stack, ready to deploy?
Dune query + Claude Code agent + UTM capture snippet — packaged as a GitHub repo. Plus a full attribution audit of your current setup.
Get the Audit + Starter Kit