Dune Banner
/Development

How to Build a Solana Data Dashboard with Dune

6 min read

Solana’s blockchain is a powerhouse of speed and scalability, processing thousands of transactions per second.

This creates a treasure trove of data for analysts and developers—but harnessing it requires the right tools. Enter Dune, a leading onchain data platform that transforms raw blockchain data into actionable insights and developer APIs. 

In this guide, you’ll learn how to build a comprehensive Solana dashboard on Dune, leveraging real-time metrics, historical trends, and decoded program data.

Understanding Solana’s Data Volumes

Solana’s high throughput—often exceeding 3,000 transactions per second—generates staggering amounts of data. This includes everything from block production and transaction logs to program-specific interactions like token swaps or NFT mints.

Dune captures Solana’s real-time activity with minimal latency. Raw data streams, such as block headers and transaction signatures, update in under a minute. For instance, querying solana.transactions lets you monitor network activity, such as spikes in user engagement during a token launch.

Visualizing this data is straightforward on Dune’s platform. Dune indexes Solana’s entire history, from its genesis block in 2020 to the latest slot. This allows for analyzing long-term trends, such as the growth in total transactions (now exceeding 300 billion) or seasonal fluctuations in DeFi activity. For example, this query tracks cumulative transactions since the network’s inception, while another identifies the earliest and latest recorded blocks.

When stacked against Ethereum, BSC, or Polygon, Solana’s data volume stands out due to its high throughput. A side-by-side comparison reveals Solana’s dominance in daily transactions, though Ethereum still leads in fees and DeFi liquidity.

Foundational Concepts: Solana’s Data Structure

Let’s explore Solana’s account model, the anatomy of a transaction, and how to analyze Solana transactions with Dune.

The Solana Account Model

At Solana’s core lies its unique account model. Every piece of data on-chain is stored in accounts, including program logic, token balances, and executable code. Here’s what makes Solana’s accounts distinct:

Account Addresses

A 32-byte identifier derived from a public key or seeds for Program Derived Addresses (PDAs). For example, Raydium liquidity pool addresses are PDAs generated from token mints and other parameters.

Data Storage

Accounts can hold up to 10MB of data for executable bytecode programs or 10KB for state information in PDAs.

Ownership and Rent

Accounts must hold lamports (fractions of SOL) to pay storage costs (rent) proportional to their data size. The owner field specifies the program or wallet that controls the account. Only the owner can modify its data or deduct lamports. An executable flag marks whether the account contains executable code.

For a practical example, an SPL token account stores its associated wallet balance in the data field while its owner is the Token Program.

Anatomy of a Solana Transaction

Transactions are the vehicle for interacting with Solana programs. Each transaction includes:

  • A signature (unique identifier) and fee paid in lamports
  • One or more instructions (ixs), which specify:
    • The program to execute (e.g., Raydium’s swap function).
    • Accounts to read from and write to (e.g., token vaults, user wallets).
    • Instruction-specific arguments (e.g., swap amount, fees).

Key characteristics of transactions are:

  • Atomic Execution: Transactions succeed entirely or fail—no partial states.
  • Cross-Program Invocation (CPI): Programs can call other programs, creating nested instructions.
  • Logs and Errors: Failed transactions include error messages, while logs capture runtime events (e.g., swap details).

Analyzing Transactions on Dune

Dune’s solana.transactions table provides granular insights:

  • block_slot: The slot number when the transaction was processed.
  • fee: Transaction cost in lamports.
  • error: Reason for failure (if applicable).
  • accounts: Addresses of all accounts involved.
  • log_messages: Emitted event logs (e.g., token minting).

For deeper inspection, use solana.instruction_calls:

  • outer_instruction_index: Position of the instruction within the transaction.
  • inner_instruction_index: Tracks CPI hierarchy. This is the position of the inner_instruction in the respective instruction, which is different from stack_height. Dune is currently working on adding stack_height.
  • executing_account: Program executing the instruction.
  • data: Raw instruction bytes (hex-encoded).

Dune supports over 150 decoded Solana programs, including major protocols like Raydium and Magic Eden. The community has built over 2,000 dashboards, covering metrics from validator performance to meme coin trends. New programs are added regularly. Users can submit decoding requests via Dune’s website.

Dune categorizes Solana data into three layers:

1. Raw Data

Tables like solana.blocks and solana.instruction_calls provide unfiltered access to on-chain activity.

2. Cleaned Data

Pre-processed abstractions, such as token prices or USD equivalents, simplify analysis.

3. Decoded Data

Protocol-specific datasets (e.g., dex.trades for DEX swaps or nft.trades for NFT sales) offer plug-and-play metrics.

For asset tracking, explore tables like staking.actions for validator activity or prices.usd for token prices. Trading analysts can leverage dex.trades to compare volumes across platforms like Orca and Raydium.

Behind the Scenes: How Dune Processes Data

Dune ingests Solana data via Geyser plugins, which stream on-chain updates to its indexing system. From there, raw data is decoded using program IDLs and organized into query-friendly tables. For a detailed look at Solana’s data infrastructure, check out Helius’ guide to Solana data tools.

Step-by-Step: Building Your Solana Dashboard

Step 1: Define Your Objective

Start by identifying a focus area. Are you analyzing NFT sales, DeFi yields, or network performance? For this example, we’ll build a dashboard tracking daily DEX volumes.

Step 2: Query the Data

Navigate to Dune’s query editor and pull trading data from dex.trades:

Code
SELECT DATE(block_time) AS date, SUM(amount_usd) AS volume  
FROM solana.dex.trades  
WHERE project = 'orca'  
GROUP BY 1  
ORDER BY date DESC

This fetches Orca’s daily trading volume. Save the query and visualize it as a bar chart.

Step 3: Assemble and Customize

Create a new dashboard and add your chart. Enhance it with additional widgets, such as a counter for total trades or a table ranking the top tokens by volume. Use text boxes to annotate trends, such as spikes driven by a new token launch.

Check out this short video series for a complete walkthrough of building a Solana dashboard on Dune.

Pro Tips for Advanced Analysis

Tip 1: Combine Raw and Decoded Data

If a program isn’t fully decoded (e.g., a new NFT marketplace), use solana.instruction_calls to parse logs manually. Then, cross-reference with decoded token tables to identify asset details.

Tip 2: Optimize for Speed

Solana’s data volume can slow down queries.

Filter early by block_slot or block_time, and use materialized views for frequently accessed metrics.

Tip 3: Leverage Price Feeds

Convert token amounts to USD by joining trades with prices.usd. This contextualizes volumes, especially for volatile assets.

Final Thoughts

Dune transforms Solana’s firehose of data into a structured, accessible resource. By mastering its datasets and tools, you can uncover insights that drive decisions—whether you’re optimizing a protocol or tracking market trends.

For further reading, explore Solana’s Geyser plugin architecture and watch the video tutorials in this Solana Data YouTube playlist.

Related Articles

Subscribe to Helius

Stay up-to-date with the latest in Solana development and receive updates when we post